plateform stringclasses 1
value | repo_name stringlengths 13 113 | name stringlengths 3 74 | ext stringclasses 1
value | path stringlengths 12 229 | size int64 23 843k | source_encoding stringclasses 9
values | md5 stringlengths 32 32 | text stringlengths 23 843k |
|---|---|---|---|---|---|---|---|---|
github | samerlahoud/wireless-simulator-ua-pc-master | central_ee_maxlog_sinr_nointerf_power_allocation_gradient.m | .m | wireless-simulator-ua-pc-master/power_allocation_algos/central_ee_maxlog_sinr_nointerf_power_allocation_gradient.m | 5,358 | utf_8 | 01f9e26bffb1234719a126b7a9e78d25 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Simulation of Joint scheduling and power control for energy efficiency in
% multi-cell networks (2015)
% Samer Lahoud samer.lahoud@irisa.fr
% Kinda Khawam
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function [... |
github | samerlahoud/wireless-simulator-ua-pc-master | central_maxlog_sinr_power_allocation_gradient.m | .m | wireless-simulator-ua-pc-master/power_allocation_algos/central_maxlog_sinr_power_allocation_gradient.m | 4,797 | utf_8 | bd89e4bae5bfc102c551a40d0323fb0b | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Simulation of Joint scheduling and power control for energy efficiency in
% multi-cell networks (2015)
% Samer Lahoud samer.lahoud@irisa.fr
% Kinda Khawam
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function [... |
github | samerlahoud/wireless-simulator-ua-pc-master | central_gee_noise_limited_joint_scheduling_power_allocation_rb.m | .m | wireless-simulator-ua-pc-master/power_allocation_algos/central_gee_noise_limited_joint_scheduling_power_allocation_rb.m | 1,539 | utf_8 | 0a37df309e29f019fdabe0474f0d2072 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Maximize GEE in a downlink multi-cell network in noise limited regime
% Centralized approach
% VENTURINO et al.: SCHEDULING AND POWER ALLOCATION IN OFDMA NETWORKS WITH BS COORDINATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%... |
github | mfkasim1/invert-shadowgraphy-master | invert_shadowgraphy.m | .m | invert-shadowgraphy-master/invert_shadowgraphy.m | 7,934 | utf_8 | 31cc220f50bb8571fd99a53c6924fb3a | % Invert the grayscale shadowgraphy image
% Input:
% * filename: string to a filename
% Options:
% * 'num_sites': number of sites (default: min(100000, 0.8*number of pixels of the image))
% * 'source_map': 0 - uniform with the same size as the file (default)
% >0 - using tvdenoise with lambda = ... |
github | mfkasim1/invert-shadowgraphy-master | main_forward.m | .m | invert-shadowgraphy-master/main_forward.m | 5,332 | utf_8 | e7aaed4b743ec09777097ec25744253d | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Predict the intensity on the target plane given the deflection potential, Phi, and
% the intensity profile on the source plane, sourceMap.
% The beam from source plane is mapped to the target plane as function of its position on ... |
github | mfkasim1/invert-shadowgraphy-master | main_inverse_extended.m | .m | invert-shadowgraphy-master/main_inverse_extended.m | 6,127 | utf_8 | 6f0e240478856ed68eb0544f234d05de | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Computes the deflection potential from the sourceMap intensity, given the targetMap intensity.
% The beam from source plane is mapped to the target plane as function of its position on the source plane.
% The map... |
github | mfkasim1/invert-shadowgraphy-master | polyareaconvex.m | .m | invert-shadowgraphy-master/lib/polyareaconvex.m | 689 | utf_8 | 87f03b4f7cd2081bfcad066412d6739d | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% This function is to find area of convex polygons.
% Conditions:
% * All polygons must be convex
% * All coordinates must be ordered in CW direction
% * The last point is not the first point
% Input:
% * x1: (pxN) matrix to specify th... |
github | mfkasim1/invert-shadowgraphy-master | pixels_crossed_by_line.m | .m | invert-shadowgraphy-master/lib/pixels_crossed_by_line.m | 1,017 | utf_8 | 89ffd58e8291a48153c21e31e4dbfeb5 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% This function is to find pixels which is crossed by a general line.
% It uses pixels_crossed_by_specific_line algorithm but considering more general cases.
% Input:
% * x1: the x-coordinate of the initial point
% * y1: the y-coordinate ... |
github | mfkasim1/invert-shadowgraphy-master | pixels_enclosed_by_polygon.m | .m | invert-shadowgraphy-master/lib/pixels_enclosed_by_polygon.m | 2,072 | utf_8 | 8dc3b02e8acb415d51efad083e3f348a | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% This function is to find pixels which is enclosed by a polygon and crossed by its edges.
% Conditions:
% * The polygon must be convex
% * All coordinates must be ordered in CW direction
% * The last point is not the first point
% * W... |
github | mfkasim1/invert-shadowgraphy-master | clip_polygons.m | .m | invert-shadowgraphy-master/lib/clip_polygons.m | 5,411 | utf_8 | cedd968a3fb73d5a7e0da18fedd0b985 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% This function is to clip 2 polygons with at least one of them is convex.
% The algorithm uses Sutherland-Hodgman algorithm.
% Conditions:
% * The clipping polygon must be convex and the subject polygon can be non-convex.
% * All coordina... |
github | mfkasim1/invert-shadowgraphy-master | polycmconvex.m | .m | invert-shadowgraphy-master/lib/polycmconvex.m | 1,122 | utf_8 | 3febbf6d3c17b0f9e404d990d32e99b9 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% This function is to find area and centre of mass position of convex polygons.
% Conditions:
% * All polygons must be convex
% * All coordinates must be ordered in CW direction
% * The last point is not the first point
% Input:
% * x1... |
github | mfkasim1/invert-shadowgraphy-master | pixels_crossed_by_specific_line_2.m | .m | invert-shadowgraphy-master/lib/pixels_crossed_by_specific_line_2.m | 2,990 | utf_8 | 4db664bc2ec25e1ec7d76dfae616c872 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% This function is to find pixels which is crossed by a specific line.
% The difference is that this function use vectorization.
% Input:
% * x1: the x-coordinate of the initial point
% * y1: the y-coordinate of the initial point
% * x... |
github | mfkasim1/invert-shadowgraphy-master | penalty_function.m | .m | invert-shadowgraphy-master/lib/penalty_function.m | 3,276 | utf_8 | 2732d21299929ca5403fadc69cb4dbf1 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Computes the penalty function and its gradient from Q. Merigot 2011 of weights.
% Input:
% * p: coordinate of points from source (numPoints x 2)
% * lambdap: value of each point (numPoints x 1)
% * targetDensity: map of the den... |
github | mfkasim1/invert-shadowgraphy-master | poly_pixel_integrate.m | .m | invert-shadowgraphy-master/lib/poly_pixel_integrate.m | 1,901 | utf_8 | 50bd10c6c034fe31896d9a38117dd2af | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Evaluate the integral \int_P f(x) dx for a given polynomial vertices coordinate (Px, Py)
% with discretise function f(x) equals to valMap.
% Input:
% * Px, Py: the normalised coordinate of vertices of the polynomial (px1)
% * valMap: discr... |
github | mfkasim1/invert-shadowgraphy-master | clip_polygons_with_rect.m | .m | invert-shadowgraphy-master/lib/clip_polygons_with_rect.m | 6,313 | utf_8 | aa9937883c6e1258ff51b20e024726be | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% This function is to clip 2 polygons with clipping polygon as rectangle.
% The algorithm uses Sutherland-Hodgman algorithm.
% Conditions:
% * The clipping polygon must be rectangle and the subject polygon can be non-convex.
% * All coordi... |
github | mfkasim1/invert-shadowgraphy-master | power_bounded.m | .m | invert-shadowgraphy-master/lib/power_bounded.m | 3,088 | utf_8 | d455dee2e1a393b17985567d06ac2ef2 | % POWER_BOUNDED computes the power cells about the points (x,y) inside
% the bounding box (must be a rectangle or a square) crs. If crs is not supplied, an
% axis-aligned box containing (x,y) is used.
% It is optimised to work fast on large number of sites (e.g. 10000 sites or more)
% Input:
% * x, y: coordinate of ... |
github | mfkasim1/invert-shadowgraphy-master | visualise_pixels_polygon.m | .m | invert-shadowgraphy-master/lib/visualise_pixels_polygon.m | 972 | utf_8 | 39c628185a8fd12d8f8f92f516ad4184 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% This function is to visualise pixels, lines, and polygon
% Input:
% * x0, y0: x and y-coordinates of the points (1xN)
% * drawType: can be 'pixels', 'lines', or 'polygon'
% * color: the first letter of the color in string
function vis... |
github | mfkasim1/invert-shadowgraphy-master | polyinertiaconvex.m | .m | invert-shadowgraphy-master/lib/polyinertiaconvex.m | 889 | utf_8 | bc5fa99253b86861eb253489c3838798 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% This function is to find inertia with respect to origin of convex polygons.
% Conditions:
% * All polygons must be convex
% * All coordinates must be ordered in CW direction
% * The last point is not the first point
% Input:
% * x1: ... |
github | mfkasim1/invert-shadowgraphy-master | weighted_lloyds_algorithm.m | .m | invert-shadowgraphy-master/lib/weighted_lloyds_algorithm.m | 1,268 | utf_8 | c5a3c86bf0adf6f7bc27dfca7f7cb294 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Applying Lloyd's algorithm for weighted area parallelly.
% Input:
% * Px0, Py0: list of initial points coordinates (each numPoints x 1)
% * valMap: value of density per pixel (Ny x Nx)
% * options: TBD
% Output:
% * Px, Py: list of f... |
github | mfkasim1/invert-shadowgraphy-master | poly_pixel_area_cm_inertia.m | .m | invert-shadowgraphy-master/lib/poly_pixel_area_cm_inertia.m | 2,470 | utf_8 | 2275dcfe30eeddae69d7eeca1e04af21 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Get the weighted area, centre of mass position, and moment of inertia of a polygon (Px,Py)
% with weight per pixel described in valMap.
% Input:
% * Px, Py: the normalised coordinate of vertices of the polygon (px1)
% * valMap: discretised... |
github | mfkasim1/invert-shadowgraphy-master | powerDiagram2.m | .m | invert-shadowgraphy-master/lib/powerDiagram2.m | 3,414 | utf_8 | ea52e461fcdc3fb8607e0c2c110eea6f | % This function obtains the power diagram specified by sites E with weights wts.
% It is optimised to work fast on large number of sites (e.g. 10000 sites or more).
% Only works for 2 dimensions.
% Input:
% * E: a matrix that specifies the sites coordinates (Npts x 2)
% * wts: a column vector that specifies the sit... |
github | mfkasim1/invert-shadowgraphy-master | initial_random_sample.m | .m | invert-shadowgraphy-master/lib/initial_random_sample.m | 1,626 | utf_8 | 9f4e8ac442b1836c5bfe2b24f7969fa3 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Generating N random sample with probability distribution valMap using rejection algorithm.
% Input:
% * N: number of sample
% * valMap: discrete probability function
% Output:
% * Px, Py: normalised coordinate of the generated sa... |
github | mfkasim1/invert-shadowgraphy-master | WolfeLineSearch.m | .m | invert-shadowgraphy-master/lib/minFunc_2012/WolfeLineSearch.m | 10,590 | utf_8 | f962bc5ae0a1e9f80202a9aaab106dab | function [t,f_new,g_new,funEvals,H] = WolfeLineSearch(...
x,t,d,f,g,gtd,c1,c2,LS_interp,LS_multi,maxLS,progTol,debug,doPlot,saveHessianComp,funObj,varargin)
%
% Bracketing Line Search to Satisfy Wolfe Conditions
%
% Inputs:
% x: starting location
% t: initial step size
% d: descent direction
% f: function v... |
github | mfkasim1/invert-shadowgraphy-master | minFunc_processInputOptions.m | .m | invert-shadowgraphy-master/lib/minFunc_2012/minFunc_processInputOptions.m | 3,936 | utf_8 | 167c0b9848cba950f05d4efec5667d66 |
function [verbose,verboseI,debug,doPlot,maxFunEvals,maxIter,optTol,progTol,method,...
corrections,c1,c2,LS_init,cgSolve,qnUpdate,cgUpdate,initialHessType,...
HessianModify,Fref,useComplex,numDiff,LS_saveHessianComp,...
Damped,HvFunc,bbType,cycle,...
HessianIter,outputFcn,useMex,useNegCurv,precFunc,...
... |
github | starimpact/mxnet_basedv0.7.0-master | parse_json.m | .m | mxnet_basedv0.7.0-master/matlab/+mxnet/private/parse_json.m | 19,095 | utf_8 | 2d934e0eae2779e69f5c3883b8f89963 | function data = parse_json(fname,varargin)
%PARSE_JSON parse a JSON (JavaScript Object Notation) file or string
%
% Based on jsonlab (https://github.com/fangq/jsonlab) created by Qianqian Fang. Jsonlab is lisonced under BSD or GPL v3.
global pos inStr len esc index_esc len_esc isoct arraytoken
if(regexp(fname,'^\s*(... |
github | slee126/olg-master | getSS_func2.m | .m | olg-master/getSS_func2.m | 7,585 | utf_8 | 2c792d662da87792081a3d0595672d50 |
function [aoptMat, coptMat, noptMat, pentMat, kbart, nbart, gov_sur] = getSS_func2(partProj, wageProj, surv_, pop_, rates)
% Death Certainty
G = 80;
%fixed parameters---------------------------------------------------------
gama = 2; % Risk Aversion
eta = 2; % elasticity of... |
github | slee126/olg-master | clickableLegend.m | .m | olg-master/clickableLegend.m | 7,479 | utf_8 | c4a2ef5f86441b0b9c7232c47fffeb7e | function varargout = clickableLegend(varargin)
% clickableLegend Interactive legend for toggling or highlighting graphics
%
% clickableLegend is a wrapper around the LEGEND function that provides
% interactive display toggling or highlighting of lines or patches in a MATLAB
% plot. It enables you to,
% * Toggle ... |
github | gordonberman/MotionMapper_mouse-master | dftregistration.m | .m | MotionMapper_mouse-master/segmentation_alignment/dftregistration.m | 8,234 | utf_8 | 7dc727aebf333c1a5cef2b2821265218 |
function [output Greg] = dftregistration(buf1ft,buf2ft,usfac)
% function [output Greg] = dftregistration(buf1ft,buf2ft,usfac);
% Efficient subpixel image registration by crosscorrelation. This code
% gives the same precision as the FFT upsampled cross correlation in a
% small fraction of the computation time an... |
github | gordonberman/MotionMapper_mouse-master | derivative7.m | .m | MotionMapper_mouse-master/utilities/derivative7.m | 3,752 | utf_8 | 59ac2311726917925b934ce48b7ae87f | % DERIVATIVE5 - 7-Tap 1st and 2nd discrete derivatives
%
% This function computes 1st and 2nd derivatives of an image using the 7-tap
% coefficients given by Farid and Simoncelli. The results are significantly
% more accurate than MATLAB's GRADIENT function on edges that are at angles
% other than vertical or horizont... |
github | gordonberman/MotionMapper_mouse-master | d2p_sparse.m | .m | MotionMapper_mouse-master/t_sne/d2p_sparse.m | 3,955 | utf_8 | 7f28b70414120214724d18d5268c6326 | function [P, beta] = d2p_sparse(D, u, tol, maxNeighbors)
%D2P Identifies appropriate sigma's to get kk NNs up to some tolerance
%
% [P, beta] = d2p(D, kk, tol)
%
% Identifies the required precision (= 1 / variance^2) to obtain a Gaussian
% kernel with a certain uncertainty for every datapoint. The desired
% uncerta... |
github | m-a-y-a-n-k/Weather-Prediction-Using-Neural-Networks-master | TestMonth.m | .m | Weather-Prediction-Using-Neural-Networks-master/TestMonth.m | 2,221 | utf_8 | 25b381b6a03af64e4771213daad902a6 | ## Author: user <user@DELL>
## Created: 2016-11-05
function TestMonth ( OTP1, OTP2, OTC1, OTC2, OTC3 )
X = load("Weather2015.txt");
m = 31;
X = (X([1:31],[1:12]))';
[a1,a2,FP] = forwardPropPredictor (X,OTP1,OTP2);
X = 1:1:m;
for i=2:12
switch (i)
case 2
... |
github | m-a-y-a-n-k/Weather-Prediction-Using-Neural-Networks-master | sigmoid.m | .m | Weather-Prediction-Using-Neural-Networks-master/sigmoid.m | 123 | utf_8 | dbed05fb8a4d6baae94ca989cf55827c | ## Author: user <user@DELL>
## Created: 2016-10-01
function [s] = sigmoid (z)
s = 2./(1+e.^((-2)*z)) - 1;
endfunction |
github | m-a-y-a-n-k/Weather-Prediction-Using-Neural-Networks-master | loadYearlyWeather.m | .m | Weather-Prediction-Using-Neural-Networks-master/loadYearlyWeather.m | 1,167 | utf_8 | 1a2adb5dd701d9361c58944456b14465 | ## Author: user <user@DELL>
## Created: 2016-10-01
function [X,Y] = loadYearlyWeather()
#load all files
file = "Weather";
year = 1997;
load(strcat(file,num2str(year),".txt"),"-ascii");
X = eval( genvarname (strcat(file,num2str(year))) );
nof = size(X);
nof = nof(2); ... |
github | m-a-y-a-n-k/Weather-Prediction-Using-Neural-Networks-master | saveNN.m | .m | Weather-Prediction-Using-Neural-Networks-master/saveNN.m | 398 | utf_8 | 88167c0113775e1b23dac5580a671b78 | ## Author: user <user@DELL>
## Created: 2016-11-01
function saveNN(OT1,OT2,OTC1,OTC2,OTC3)
file = "OptimalTheta";
save("-ascii",strcat(file,'P1','.txt'),"OT1");
save("-ascii",strcat(file,'P2','.txt'),"OT1");
save("-ascii",strcat(file,'C1','.txt'),"OTC1");
save("-ascii",strcat(file,'C2','.tx... |
github | m-a-y-a-n-k/Weather-Prediction-Using-Neural-Networks-master | forwardPropPredictor.m | .m | Weather-Prediction-Using-Neural-Networks-master/forwardPropPredictor.m | 360 | utf_8 | 7d1174537019731912c2f1ca0df3a14b | ## Author: user <user@DELL>
## Created: 2016-10-01
function [a1,a2,a3] = forwardPropPredictor (x,iT1,iT2)
e = size(x,2);
a1 = x; # Layer 1 input features
z1 = iT1*a1;
a2 = [ ones(1,e); z1]; # Layer 2 with bias unit
z2 = iT2*a2;
a3 = [ ones(1,e); z2]; # Layer ... |
github | m-a-y-a-n-k/Weather-Prediction-Using-Neural-Networks-master | Classifier.m | .m | Weather-Prediction-Using-Neural-Networks-master/Classifier.m | 509 | utf_8 | 8bf441939d8aacc26715a96563c43fb8 | ## Author: user <user@DELL>
## Created: 2016-10-02
function [THETA1,THETA2,THETA3,FC] = Classifier (X, Y, alpha, IEPSILON)
THETA1 = 0;
THETA2 = 0;
THETA3 = 0;
M = size(X,2);
FC = 0;
J = 0;
[THETA1, THETA2, THETA3, J, FC] = nn(X(:,1), Y(:,1), THETA1, THETA2, THETA3, IEPSILON, 1, ... |
github | m-a-y-a-n-k/Weather-Prediction-Using-Neural-Networks-master | forwardPropClassifier.m | .m | Weather-Prediction-Using-Neural-Networks-master/forwardPropClassifier.m | 334 | utf_8 | d1f29c5b4e634dc3cdfc4372ddd2f120 | ## Author: user <user@DELL>
## Created: 2016-9-31
function [A2,A3,A4] = forwardPropClassifier (X,THETA1,THETA2,THETA3)
m = size(X,2);
A1 = X;
Z2 = THETA1 * A1;
A2 = [ones(1,m); sigmoid(Z2)];
Z3 = THETA2 * A2;
A3 = [ones(1,m); sigmoid(Z3)];
Z4 = THETA3 * A3;
A4 = sigmoid(Z4);
... |
github | m-a-y-a-n-k/Weather-Prediction-Using-Neural-Networks-master | backPropClassifier.m | .m | Weather-Prediction-Using-Neural-Networks-master/backPropClassifier.m | 365 | utf_8 | fd6a8106ce75671e71eb620421cb48ca | ## Author: user <user@DELL>
## Created: 2016-9-31
function [DELTA1,DELTA2,DELTA3] = backPropClassifier (Y, A3, A2, A1, h, THETA3, THETA2)
err4 = h - Y;
err3 = ((THETA3' * err4) .* (1-A3.^2) )(2:end);
err2 = ((THETA2' * err3) .* (1-A2.^2) )(2:end);
DELTA3 = (err4 * A3');
DELTA2 = (err3 * A2'... |
github | m-a-y-a-n-k/Weather-Prediction-Using-Neural-Networks-master | nn.m | .m | Weather-Prediction-Using-Neural-Networks-master/nn.m | 931 | utf_8 | a3e3183c43e2099b995fa25090bd211a | ## Author: user <user@DELL>
## Created: 2016-10-09
function [THETA1_new, THETA2_new, THETA3_new, J, FC] = nn (X, Y, THETA1, THETA2, THETA3, IEPSILON, init_w, alpha, J, FC)
if (init_w == 1)
nof = size(X,1);
K = size(Y,1);
J = 0;
FC = zeros(1,K);
THETA1 = 2*IEPSILON*rand( K, nof ) - I... |
github | m-a-y-a-n-k/Weather-Prediction-Using-Neural-Networks-master | predictionCostFunction.m | .m | Weather-Prediction-Using-Neural-Networks-master/predictionCostFunction.m | 780 | utf_8 | a8f36b22a6b15e1e93836153726d30c6 | ## Author: user <user@DELL>
## Created: 2016-10-01
function [jVal,gradientVec] = predictionCostFunction (thetaVec,nof,x,y,e,lambda)
# Use reshape to get theta matrices for each layer
theta1 = reshape( thetaVec( 1:(nof-1)*nof ), nof-1, nof );
theta2 = reshape( thetaVec( ( (nof-1)*nof )+1:(nof-1)*nof*2), nof-1... |
github | m-a-y-a-n-k/Weather-Prediction-Using-Neural-Networks-master | YearlyForecast.m | .m | Weather-Prediction-Using-Neural-Networks-master/YearlyForecast.m | 1,442 | utf_8 | 090c1cbab2afe81b57eef2985b795e44 | ## Author: user <user@DELL>
## Created: 2016-10-01
function YearlyForecast()
#load all the files having weather data each day
[X,Y] = loadYearlyWeather();
lambda = 0.01; # regularization parameter
IEPSILON = 1; # range for initial theta of each layer
... |
github | m-a-y-a-n-k/Weather-Prediction-Using-Neural-Networks-master | saveYearlyPrediction.m | .m | Weather-Prediction-Using-Neural-Networks-master/saveYearlyPrediction.m | 289 | utf_8 | 85cf5e1e9bbee5d3a209cfd85065ec5f | ## Author: user <user@DELL>
## Created: 2016-10-01
function saveYearlyPrediction (FP)
file = "PredictionYear";
for year = 1997:2015
fp = FP([(1+(year-1997)*365):((year-1996)*365)],:);
save("-ascii",strcat(file,num2str(year),'.txt'),"fp");
endfor
endfunction |
github | m-a-y-a-n-k/Weather-Prediction-Using-Neural-Networks-master | backPropPredictor.m | .m | Weather-Prediction-Using-Neural-Networks-master/backPropPredictor.m | 427 | utf_8 | 965129dee691982512229b4eef06cc86 | ## Author: user <user@DELL>
## Created: 2016-10-01
function [gradVec] = backPropPredictor (a1,a2,a3,theta1,theta2,y,e,lambda)
err3 = (a3 - y);
err3([1],:) = [];
err2 = theta2'*err3;
err2([1],:) = []; # removing 1st row of bias
Del2 = err3*a2';
Del1 = err2*a1';
D2 = (1/... |
github | emanueleg/rfid_epc_c1_gen2-master | UpdateTagStates.m | .m | rfid_epc_c1_gen2-master/UpdateTagStates.m | 9,646 | utf_8 | b7516248cd941a008f4510e07d3da881 | function [tagStates, rspNum, rdStates] = UpdateTagStates( rdStates, tagStates, t, frmDur, decodeAlg)
if rdStates.CurCommand ~= 0 % a command is fired
t1 = rdStates.CurCommandStrtTime; % beginning of the command
t2 = rdStates.CurCommandEndTime; % end of the command
rspNum = 0;
tagONnum = 0;
... |
github | emanueleg/rfid_epc_c1_gen2-master | SQPSim3.m | .m | rfid_epc_c1_gen2-master/SQPSim3.m | 2,417 | utf_8 | 75e3dc1b7e83ab72356fa5eec15a0eb2 | function [TRR TER TTR] = SQPSim3(frmDur, L, M, rau, Tsim, rdr_snr, decodeAlg)
% Generate Query packet and broadcast it to tags
% Each tag decode the message and responds accordingly
% Simulation starts at the beginning of Query commands ignoring for
% duration of selecet command
t = 0; % This holds current tim... |
github | uzh-rpg/ethzasl_msf-master | matfig2pgf_options.m | .m | ethzasl_msf-master/msf_eval/Matlab/matfig2pgf_options.m | 10,639 | utf_8 | 225a0b2d7d0cfbbe9932df3697d7cdf4 | function varargout = matfig2pgf_options(cmd, varargin)
% MATFIG2PGF_OPTIONS Manage Matfig2PGF options. Used by Matfig2PGF.
%
% matfig2pgf_options(<cmd>)
% matfig2pgf_options(<cmd>, <options_struct>)
% matfig2pgf_options(<cmd>, <option>, <value>, ...)
%
% Example:
% matfig2pgf_options('set_global', ... |
github | uzh-rpg/ethzasl_msf-master | matfig2pgf.m | .m | ethzasl_msf-master/msf_eval/Matlab/matfig2pgf.m | 81,036 | utf_8 | 0d9c4792492ed15466d4a3ecbb06c481 | function matfig2pgf( varargin )
%MATFIG2PGF Convert figures to PGF for inclusion in LaTeX documents.
%
% Matfig2PGF converts a figure to the Portable Graphics Format (PGF).
% The PGF file can be included in a LaTeX document.
%
% matfig2pgf(filename)
% matfig2pgf('option1', option_value1, 'option2', opti... |
github | uzh-rpg/ethzasl_msf-master | matfig2pgf_menu.m | .m | ethzasl_msf-master/msf_eval/Matlab/matfig2pgf_menu.m | 3,216 | utf_8 | 95b5ed22ee627ecafa95716d5593cb34 | function matfig2pgf_menu( varargin )
%Turns the Matfig2PGF menu in the figure windows on and off.
%
% Usage:
% matfig2pgf_menu <on/off>
%
% Example:
% matfig2pgf_menu
% matfig2pgf_menu on
% Turns the Matfig2PGF menu on.
%
% Example:
% matfig2pgf_menu off
% Turns the Matfig2PGF m... |
github | aosokin/gapBCFW-master | download_LSP.m | .m | gapBCFW-master/applications/pose_estimation/download_LSP.m | 3,055 | utf_8 | 0483dbf80d8336368ede8ac38bc66bea | function download_LSP( data_path, dataset_version )
% This function downloads the LSP dataset (http://www.comp.leeds.ac.uk/mat4saj/lsp.html)
% preprocessed for BCFW structured SVM code. The preprocessed features have
% been obtained with the code of Chen and Yuille
% (http://www.stat.ucla.edu/~xianjie.chen/projects/pos... |
github | aosokin/gapBCFW-master | poseEstimation_oracle.m | .m | gapBCFW-master/applications/pose_estimation/poseEstimation_oracle.m | 4,830 | utf_8 | f2fac27de7b9676ae27c51b1049f664c | function labels_struct = poseEstimation_oracle(param, model, X, Y)
% segmentation_pairwisePotts_oracle does the loss-augmented decoding on a
% given example (X, Y) using model.w as parameter
%
% [1] Articulated Pose Estimation by a Graphical Model with Image Dependent
% Pairwise Relations, Chen and Yuille
%
% This fun... |
github | aosokin/gapBCFW-master | download_horseSeg.m | .m | gapBCFW-master/applications/binary_segmentation/download_horseSeg.m | 2,648 | utf_8 | bc3e406ed5a17c5231a2bee16e8119e6 | function download_horseSeg( data_path, dataset_version )
% This function downloads the OCR dataset: https://pub.ist.ac.at/~akolesnikov/HDSeg/
% Input: (optional) data_path - path where to put the downloaded data (default: <package root path>/data/horseSeg)
% (optional) dataset_size - version of the dataset to do... |
github | aosokin/gapBCFW-master | load_dataset_horseSeg_featuresOnDisk.m | .m | gapBCFW-master/applications/binary_segmentation/load_dataset_horseSeg_featuresOnDisk.m | 12,620 | utf_8 | aecee35ec332c6d3491aa0f8329a9124 | function [patterns_train, labels_train, patterns_test, labels_test] = load_dataset_horseSeg_featuresOnDisk(data_name, data_path)
%lload_dataset_horseSeg_featuresOnDisk prepares the horseSeg data set in the BCFW format
%
% [patterns_train, labels_train, patterns_test, labels_test] = load_dataset_horseSeg_featuresOnDisk(... |
github | aosokin/gapBCFW-master | load_dataset_horseSeg.m | .m | gapBCFW-master/applications/binary_segmentation/load_dataset_horseSeg.m | 11,858 | utf_8 | 4495d49efef960582bf07d00ae749e1c | function [patterns_train, labels_train, patterns_test, labels_test] = load_dataset_horseSeg(data_name, data_path)
%load_dataset_horseSeg prepares the horseSeg data set in the BCFW format
%
% [patterns_train, labels_train, patterns_test, labels_test] = load_dataset_horseSeg(data_name, data_path)
%
% Inputs:
% data... |
github | aosokin/gapBCFW-master | pdist2.m | .m | gapBCFW-master/applications/binary_segmentation/helpers/pdist2.m | 5,461 | utf_8 | 173103b09eefbe457c081a3d41cddd3d | % This function belongs to Piotr Dollar's Toolbox
% http://vision.ucsd.edu/~pdollar/toolbox/doc/index.html
% Please refer to the above web page for definitions and clarifications
%
% Calculates the distance between sets of vectors.
%
% Let X be an m-by-p matrix representing m points in p-dimensional space
% and Y be an... |
github | aosokin/gapBCFW-master | download_conll.m | .m | gapBCFW-master/applications/text_chunking/download_conll.m | 1,282 | utf_8 | e4211e97f226ae42df8bcaabf36bafd5 | function download_conll( data_path )
% This function downloads the CONLL dataset preprocessed for BCFW structured
% SVM code.
% Input: (optional) data_path - path where to put the downloaded data (default: <package root path>/data/LSP)
if ~exist('data_path', 'var') || isempty(data_path)
% the default path
roo... |
github | aosokin/gapBCFW-master | download_ocr.m | .m | gapBCFW-master/applications/OCR/download_ocr.m | 1,245 | utf_8 | ff380081efe78681a932b56efe6e0cb5 | function download_ocr( data_path )
% This function downloads the OCR dataset: http://ai.stanford.edu/~btaskar/ocr/
% Input: (optional) data_path - path where to put the downloaded data (default: <package root path>/data/OCR)
if ~exist('data_path', 'var') || isempty(data_path)
% the default path
root_path = fil... |
github | aosokin/gapBCFW-master | chain_oracle.m | .m | gapBCFW-master/applications/OCR/chain_oracle.m | 1,899 | utf_8 | 0715ba6844d3971e3ee15abd5ff1d0b5 | function label = chain_oracle(param, model, xi, yi)
% do loss-augmented decoding on a given example (xi,yi) using
% model.w as parameter. Param is ignored (included for standard
% interface). The loss used is normalized Hamming loss.
%
% If yi is not given, then standard prediction is done (i.e. MAP decoding
% without... |
github | aosokin/gapBCFW-master | loadOCRData.m | .m | gapBCFW-master/applications/OCR/helpers/loadOCRData.m | 3,519 | utf_8 | 6791015f511737f8e73d7650ca807095 | function [patterns_train, labels_train, patterns_test, labels_test] = loadOCRData(data_name, data_path)
% load matlab-compatible OCR data, if it doesn't exist, create the .mat file
fname = fullfile(data_path, 'ocr.mat');
if (~exist(fname, 'file'))
fprintf('Creating ocr.mat for the first time...\n')
convertOCR(... |
github | aosokin/gapBCFW-master | solver_multiLambda_BCFW_hybrid.m | .m | gapBCFW-master/solvers/solver_multiLambda_BCFW_hybrid.m | 23,600 | utf_8 | 16f596e6d3acf3fecd2d8a661e04cc84 | function [model, gap_vec_heuristic, num_passes, progress] = solver_multiLambda_BCFW_hybrid( param, options )
% [model, gap_vec_heuristic, num_passes, progress] = solver_multiLambda_BCFW_hybrid( param, options )
%
% solver_multiLambda_BCFW_hybrid solves the SSVM problem for multiple values of regularization parameter... |
github | aosokin/gapBCFW-master | solver_BCFW_hybrid.m | .m | gapBCFW-master/solvers/solver_BCFW_hybrid.m | 29,623 | utf_8 | f587ae9c7ce51ccc337310ac9d0019f0 | function [model, gap_vec_heuristic, num_passes, progress, cache, exact_gap_flag] = solver_BCFW_hybrid(param, options, model, gap_vec_heuristic, cache)
% [model, gap_vec_heuristic, num_passes, progress, cache, exact_gap_flag] = solver_BCFW_hybrid(param, options, model, gap_vec_heuristic, cache)
%
% Solves the structu... |
github | aosokin/gapBCFW-master | download_results.m | .m | gapBCFW-master/experiments/plots_icml2016/download_results.m | 1,435 | utf_8 | c6c1d9b90bf381cd1cab8576e0a163a3 | function download_results( data_path )
% This function downloads the results in order to get the plots of the ICML paper.
if ~exist('data_path', 'var') || isempty(data_path)
% the default path
root_path = fileparts( mfilename('fullpath') );
while ~exist( fullfile( root_path, 'setup_BCFW.m' ), 'file' )
... |
github | weiyangedward/IMMBoost-master | make.m | .m | IMMBoost-master/src/libsvm-3.21/matlab/make.m | 888 | utf_8 | 4a2ad69e765736f8cca8e3b721fb7ebd | % This make.m is for MATLAB and OCTAVE under Windows, Mac, and Unix
function make()
try
% This part is for OCTAVE
if (exist ('OCTAVE_VERSION', 'builtin'))
mex libsvmread.c
mex libsvmwrite.c
mex -I.. svmtrain.c ../svm.cpp svm_model_matlab.c
mex -I.. svmpredict.c ../svm.cpp svm_model_matlab.c
% This part is fo... |
github | weiyangedward/IMMBoost-master | make.m | .m | IMMBoost-master/src/liblinear-2.1/matlab/make.m | 1,198 | utf_8 | 72532ef957c850421c786167742d0912 | % This make.m is for MATLAB and OCTAVE under Windows, Mac, and Unix
function make()
try
% This part is for OCTAVE
if(exist('OCTAVE_VERSION', 'builtin'))
mex libsvmread.c
mex libsvmwrite.c
mex -I.. train.c linear_model_matlab.c ../linear.cpp ../tron.cpp ../blas/daxpy.c ../blas/ddot.c ../blas/dnrm2.c ../blas/dsca... |
github | darren1231/Simple-DQN-master | myOctaveVersion.m | .m | Simple-DQN-master/DeepLearnToolbox-master/util/myOctaveVersion.m | 169 | utf_8 | d4603482a968c496b66a4ed4e7c72471 | % return OCTAVE_VERSION or 'undefined' as a string
function result = myOctaveVersion()
if isOctave()
result = OCTAVE_VERSION;
else
result = 'undefined';
end
|
github | darren1231/Simple-DQN-master | isOctave.m | .m | Simple-DQN-master/DeepLearnToolbox-master/util/isOctave.m | 108 | utf_8 | 4695e8d7c4478e1e67733cca9903f9ef | %detects if we're running Octave
function result = isOctave()
result = exist('OCTAVE_VERSION') ~= 0;
end |
github | darren1231/Simple-DQN-master | makeLMfilters.m | .m | Simple-DQN-master/DeepLearnToolbox-master/util/makeLMfilters.m | 1,895 | utf_8 | 21950924882d8a0c49ab03ef0681b618 | function F=makeLMfilters
% Returns the LML filter bank of size 49x49x48 in F. To convolve an
% image I with the filter bank you can either use the matlab function
% conv2, i.e. responses(:,:,i)=conv2(I,F(:,:,i),'valid'), or use the
% Fourier transform.
SUP=49; % Support of the largest filter (must be... |
github | darren1231/Simple-DQN-master | myOctaveVersion.m | .m | Simple-DQN-master/DeepLearnToolbox-master/tests/myOctaveVersion.m | 169 | utf_8 | d4603482a968c496b66a4ed4e7c72471 | % return OCTAVE_VERSION or 'undefined' as a string
function result = myOctaveVersion()
if isOctave()
result = OCTAVE_VERSION;
else
result = 'undefined';
end
|
github | darren1231/Simple-DQN-master | isOctave.m | .m | Simple-DQN-master/DeepLearnToolbox-master/tests/isOctave.m | 108 | utf_8 | 4695e8d7c4478e1e67733cca9903f9ef | %detects if we're running Octave
function result = isOctave()
result = exist('OCTAVE_VERSION') ~= 0;
end |
github | darren1231/Simple-DQN-master | makeLMfilters.m | .m | Simple-DQN-master/DeepLearnToolbox-master/tests/makeLMfilters.m | 1,895 | utf_8 | 21950924882d8a0c49ab03ef0681b618 | function F=makeLMfilters
% Returns the LML filter bank of size 49x49x48 in F. To convolve an
% image I with the filter bank you can either use the matlab function
% conv2, i.e. responses(:,:,i)=conv2(I,F(:,:,i),'valid'), or use the
% Fourier transform.
SUP=49; % Support of the largest filter (must be... |
github | darren1231/Simple-DQN-master | caenumgradcheck.m | .m | Simple-DQN-master/DeepLearnToolbox-master/CAE/caenumgradcheck.m | 3,618 | utf_8 | 6c481fc15ab7df32e0f476514100141a | function cae = caenumgradcheck(cae, x, y)
epsilon = 1e-4;
er = 1e-6;
disp('performing numerical gradient checking...')
for i = 1 : numel(cae.o)
p_cae = cae; p_cae.c{i} = p_cae.c{i} + epsilon;
m_cae = cae; m_cae.c{i} = m_cae.c{i} - epsilon;
[m_cae, p_cae] = caerun(m_cae, p_cae, x... |
github | weiwu5/UIOPS-master | calc_sa_randombins.m | .m | UIOPS-master/calc_sa_randombins.m | 1,535 | utf_8 | a38fcc5a3914371307f3740bbadd1327 | % Calculate image sample area assuming Heymsfield and Parish (1978)
% bins_mid - mid-point of each bins in doide number
% res - photodiode resolution, bin width in microns
% armdst - distance between probe arms in millimeters
% num_diodes - number of photodiodes (does not need to equal number of bins)
% SAme... |
github | weiwu5/UIOPS-master | dropsize.m | .m | UIOPS-master/dropsize.m | 10,889 | utf_8 | eb28935658e58b45634f6c09cbd7a712 | function [center_in,axis_ratio,diameter_circle_fit,diameter_horiz_chord,diameter_vert_chord,diameter_horiz_mean, diameter_spheroid]=...
dropsize(max_horizontal_length,max_vertical_length,image_area,largest_edge_touching,...
smallest_edge_touching,diode_size,corrected_horizontal_diode_size,number_diodes_in_array... |
github | weiwu5/UIOPS-master | read_binary_SPEC.m | .m | UIOPS-master/read_binary_SPEC.m | 12,137 | utf_8 | 4ae527d3d4217ff12be1d66a1ac2d8ee | function read_binary_SPEC(infilename,outfilename)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% Read the raw base*.2DS file, and then write into NETCDF file
%% Follow the SPEC manual
%% by Will Wu, 08/01/2014
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%... |
github | weiwu5/UIOPS-master | read_binary_SEA.m | .m | UIOPS-master/read_binary_SEA.m | 12,340 | utf_8 | 3d7e92cc325973ca7580749e35bbeb78 | function read_binary_SEA(infilename,outfilename)
%% Function to decompress SEA raw files
% Need to double check the file format and code for each probes
% This only works for MC3E filed campaign
% * July 11, 2016, Created this new interface function, Wei Wu
starpos = find(infilename == '*',1,'last');
nWierdTotal = 0... |
github | weiwu5/UIOPS-master | ParticlePerimeter.m | .m | UIOPS-master/ParticlePerimeter.m | 572 | utf_8 | a4d9612a610598df7fa2589693967992 | % Get the single particle perimeter
%
% Inputs:
% image_buffer - n x photodiodes/8 raw image buffer without timestamps
% Outputs:
% Perimeter
%
% * Created by Wei Wu, July 4th, 2014
function [pperimeter] = ParticlePerimeter(image_buffer)
[m, n] = size(image_buffer);
pperimeter = 0;
c1=[49*ones(1,n+2... |
github | weiwu5/UIOPS-master | holroyd.m | .m | UIOPS-master/holroyd.m | 7,084 | utf_8 | 1b223ee839e6a8546bb6a2133e6eb1fa | % holroyd - identified particle habit according to Holroyd (1987)
% inputs:
% handles - handles structure outlined in run_img_processing.m
% image_buffer - n x photodiodes/8 raw image buffer without timestamps
% outputs:
% holroyd_habit - habit code as listed below
function [holroyd_habit] = holroyd(handles, ... |
github | weiwu5/UIOPS-master | sizeDist.m | .m | UIOPS-master/sizeDist.m | 83,832 | utf_8 | c46d3e519779ed33a0d5bdce1f12d8c8 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Derive the area and size distribution for entire-in particles
% Include the IWC calculation
% Include the effective radius
% Created by Will Wu, 09/18/2013
%
% **************************
% *** Modification Notes ***
% *****... |
github | weiwu5/UIOPS-master | single_vt.m | .m | UIOPS-master/single_vt.m | 1,440 | utf_8 | 6d3b5eb59b4c5ec6a86a3aa87c2bead2 | %% Returns terminal velocity for a single particle
% Both options to calculate the terminal velocity
% Default is to use the Heymsfield and Westbrook (2010) method,
% but you can also choose to to use Mitchel (1996)
% Created by Will Wu, 2014/01/15
% - Mass and Diameter uses metric system
% - Pressure use hPa
% ... |
github | weiwu5/UIOPS-master | calculate_reject_unified.m | .m | UIOPS-master/calculate_reject_unified.m | 20,696 | utf_8 | 4438b2dee44f70bdd279914cf9ee9ec0 | function [p_length,width,area,longest_y,max_top,max_bottom,touching_edge,reject_status,is_hollow,percent_shadow_area,part_z,size_factor,area_hole_ratio,handles]=calculate_reject_unified(image_buffer,handles,habit)
% /* RETURN CODE */
% /* 0 = not rejected ... |
github | tangzhenyu/Various-Boltzmann-master | rbmtrain.m | .m | Various-Boltzmann-master/DBN/rbmtrain.m | 12,594 | utf_8 | 62da1ad8d81229058ed9deef0d4d2fe9 | function rbm = rbmtrain(rbm, x, opts)
assert(isfloat(x), 'x must be a float');
assert(all(x(:)>=0) && all(x(:)<=1), 'all data in x must be in [0:1]');
m = size(x, 1);
numbatches = m / opts.batchsize;
assert(rem(numbatches, 1) == 0, 'numbatches not integer');
[nh,nv]=size(rbm.W);
... |
github | tangzhenyu/Various-Boltzmann-master | myOctaveVersion.m | .m | Various-Boltzmann-master/util/myOctaveVersion.m | 176 | utf_8 | 7fd68bd8301917e88f9e48ee744a9fe6 | % return OCTAVE_VERSION or 'undefined' as a string
function result = myOctaveVersion()
if isOctave()
result = OCTAVE_VERSION;
else
result = 'undefined';
end
|
github | tangzhenyu/Various-Boltzmann-master | isOctave.m | .m | Various-Boltzmann-master/util/isOctave.m | 111 | utf_8 | afaef0cf373d31f7c4e7c5ff46b37ad9 | %detects if we're running Octave
function result = isOctave()
result = exist('OCTAVE_VERSION') ~= 0;
end |
github | tangzhenyu/Various-Boltzmann-master | makeLMfilters.m | .m | Various-Boltzmann-master/util/makeLMfilters.m | 1,956 | utf_8 | 7c7c72d8640bbf5b80f84d3736bfac4a | function F=makeLMfilters
% Returns the LML filter bank of size 49x49x48 in F. To convolve an
% image I with the filter bank you can either use the matlab function
% conv2, i.e. responses(:,:,i)=conv2(I,F(:,:,i),'valid'), or use the
% Fourier transform.
SUP=49; % Support of the largest filter (m... |
github | trikitrok/machine-learning-octave-master | findClosestCentroids.m | .m | machine-learning-octave-master/Week8/machine-learning-ex7/ex7/findClosestCentroids.m | 1,343 | utf_8 | 0bf7c3d09704a1f61670bb42b5eceb67 | function idx = findClosestCentroids(X, centroids)
%FINDCLOSESTCENTROIDS computes the centroid memberships for every example
% idx = FINDCLOSESTCENTROIDS (X, centroids) returns the closest centroids
% in idx for a dataset X where each row is a single example. idx = m x 1
% vector of centroid assignments (i.e. eac... |
github | trikitrok/machine-learning-octave-master | porterStemmer.m | .m | machine-learning-octave-master/Week7/machine-learning-ex6/ex6/porterStemmer.m | 9,902 | utf_8 | 7ed5acd925808fde342fc72bd62ebc4d | function stem = porterStemmer(inString)
% Applies the Porter Stemming algorithm as presented in the following
% paper:
% Porter, 1980, An algorithm for suffix stripping, Program, Vol. 14,
% no. 3, pp 130-137
% Original code modeled after the C version provided at:
% http://www.tartarus.org/~martin/PorterStemmer/c.tx... |
github | yihui-he/Exemplar-CNN-master | compute_features_matcaffe_new.m | .m | Exemplar-CNN-master/code/testing/compute_features_matcaffe_new.m | 1,859 | utf_8 | 8fa01ccb066d406878ddc14322746cfb | function all_features = compute_features_matcaffe_new(images, params)
params.image_size = [size(images,1); size(images,2); size(images,3)];
params = make_new_config_and_net(params);
all_features = compute_features_matcaffe_given_config(images, params);
end
function params = make_new_config_and_net(params)
% the... |
github | yihui-he/Exemplar-CNN-master | sample_patches_multiscale.m | .m | Exemplar-CNN-master/code/make_data/sample_patches_multiscale.m | 7,864 | utf_8 | da5a22bc6a3e172042ea1a55a9433d70 | function [patches, pos] = sample_patches_multiscale(image_names, params, selected_images)
scales = params.scales;
subsample_probmaps = params.subsample_probmaps;
patchsize = params.patchsize;
nchannels = params.nchannels;
if ~isfield(params, 'one_patch_per_image')
params.one_patch_per_image = false;
end
if nargin... |
github | epfl-lasa/ML_toolbox-master | freezeColors.m | .m | ML_toolbox-master/functions/extra/freezeColors_v23_cbfreeze/freezeColors/freezeColors.m | 9,815 | utf_8 | 2068d7a4f7a74d251e2519c4c5c1c171 | function freezeColors(varargin)
% freezeColors Lock colors of plot, enabling multiple colormaps per figure. (v2.3)
%
% Problem: There is only one colormap per figure. This function provides
% an easy solution when plots using different colomaps are desired
% in the same figure.
%
% freezeColors freeze... |
github | epfl-lasa/ML_toolbox-master | ml_generate_mouse_data.m | .m | ML_toolbox-master/functions/data_generation/ml_generate_mouse_data.m | 5,127 | utf_8 | f36735afea3b25a195558f5a6d35f4bd | function data = ml_generate_mouse_data(limits, varargin)
% GENERATE_MOUSE_DATA(NTH_ORDER, N_DOWNSAMPLE) request the user to give
% demonstrations of a trajectories in a 2D workspace using the mouse cursor
% The data is stored in an [x ; dx/dt] structure
% The data isdownsampled by N_DOWNSAMPLE samples
% # Au... |
github | epfl-lasa/ML_toolbox-master | ml_clusters_data.m | .m | ML_toolbox-master/functions/data_generation/ml_clusters_data.m | 3,290 | utf_8 | 7f2f0fe7f7875b029a41762416da5f92 | function [X,labels,gmm] = ml_clusters_data(num_samples,dim,num_classes, varargin)
%ML_CLUSTERS_DATA Generates a set of Clusters, where one cluster is one
% class. The data is samples from a Gaussian Mixture Model
%
% input ----------------------------------------------------------------
%
% o num_samples : (1 x... |
github | epfl-lasa/ML_toolbox-master | ml_generate_manifold_dataset.m | .m | ML_toolbox-master/functions/data_generation/ml_generate_manifold_dataset.m | 11,859 | utf_8 | 0d2c906e2ffd0b5752cabe1383f09dc7 | % DATASET GENERATION
%
% This file generates different 3D datasets (the code name is specified inside the brackets) :
% - spheric (sphere)
% - spheric with hole (sphere_hole)
% - swiss roll (swissroll)
% - swiss roll with hole (swissroll_hole)
% - broken swiss roll (swissroll_broken)
% - S curve (scurve)
... |
github | epfl-lasa/ML_toolbox-master | ml_draw_data.m | .m | ML_toolbox-master/functions/data_generation/ml_draw_data.m | 662 | utf_8 | b7fb951746da2d9837459cc40d20751b | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% DEMO SCRIPT FOR USING ML_TOOLBOX DRAWING GUI %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function [X, labels] = ml_draw_data()
%% Bring up Drawing GUI
clear all; close all;
limits = [-50 50 -50 50];
data = ml_generate_mouse_data(limits, ... |
github | epfl-lasa/ML_toolbox-master | ml_circles_data.m | .m | ML_toolbox-master/functions/data_generation/ml_circles_data.m | 2,457 | utf_8 | e95f6292025b068d1c6f87ce52de2c0a | function [X,labels] = ml_circles_data(num_samples,dim,num_classes, varargin)
% ML_CIRCLES_DATA Generates data which is in the patter of circles
%
% input ----------------------------------------------------------------
%
% o num_samples : (1 x 1), number of data points to generate.
%
% o dim : (1 ... |
github | epfl-lasa/ML_toolbox-master | ml_scholkopf_data.m | .m | ML_toolbox-master/functions/data_generation/ml_scholkopf_data.m | 867 | utf_8 | 47873f39e259f67df531ffc141133a4e | function [ X ] = ml_scholkopf_data( num_samples )
%ML_SCHOLKOPF_DATA
%
% Nonlinear Component Analysis as a Kernel Eigenvalue problem
% Data from Figure 2
%
% input -----------------------------------------------------------------
%
% o num_samples : (1 x 1), the number of samples to be generated.
%
% out... |
github | epfl-lasa/ML_toolbox-master | ml_plot_gmm_contour.m | .m | ML_toolbox-master/functions/plot_functions/gmm_plot/ml_plot_gmm_contour.m | 1,582 | utf_8 | 53f5d8f07eeb49f7cbe9df91c8ddd0af | function handle = ml_plot_gmm_contour(haxes,Priors,Mu,Sigma,color,STD,handle)
%PLOT_GMM_CONTOUR Summary of this function goes here
% Detailed explanation goes here
K = size(Priors,2);
if ~exist('STD','var'), STD=1;end
if ~exist('color','var'), color=repmat([0 0 1],K,1);end
if size(color,1) ~= K
color = repmat(c... |
github | epfl-lasa/ML_toolbox-master | patchline.m | .m | ML_toolbox-master/functions/plot_functions/gmm_plot/Extra_functions/patchline.m | 3,812 | utf_8 | eb106a55c884f31c460bacfead7472aa | function p = patchline(xs,ys,varargin)
% Plot lines as patches (efficiently)
%
% SYNTAX:
% patchline(xs,ys)
% patchline(xs,ys,zs,...)
% patchline(xs,ys,zs,'PropertyName',propertyvalue,...)
% p = patchline(...)
%
% PROPERTIES:
% Accepts all parameter-values accepted by PATCH.
%
% DESCRI... |
github | epfl-lasa/ML_toolbox-master | rescale.m | .m | ML_toolbox-master/functions/plot_functions/gmm_plot/Extra_functions/rescale.m | 151 | utf_8 | 4ea3615e62c350c9b3e1f4a6e91c8bd0 | % Rescale x to run from c to d when its values run from a to b:
function z = rescale(x,a,b,c,d)
z = -(-b*c + a*d)/(-a + b) + (-c + d)*x/(-a + b);
end
|
github | epfl-lasa/ML_toolbox-master | plot_gmm_contour.m | .m | ML_toolbox-master/functions/plot_functions/gmm_plot/plotGaussians/plot_gmm_contour.m | 1,927 | utf_8 | 6a07ecac265543dae2f764a128e4baec | function handle = plot_gmm_contour(haxes,Priors,Mu,Sigma,color,STD,handle)
%PLOT_GMM_CONTOUR Summary of this function goes here
% Detailed explanation goes here
K = size(Priors,2);
M = size(Mu,1);
if ~exist('STD','var'), STD=1;end
if ~exist('color','var'), color=repmat([0 0 1],K,1);end
if size(color,1) ~= K
col... |
github | epfl-lasa/ML_toolbox-master | plot_gaussian_ellipsoid.m | .m | ML_toolbox-master/functions/plot_functions/gmm_plot/plotGaussians/plot_gaussian_ellipsoid.m | 4,816 | utf_8 | 9f3605dd3cd604910f87962c0479b36d | function h = plot_gaussian_ellipsoid(m, C, sdwidth, npts, axh,alphaChannel,color)
% PLOT_GAUSSIAN_ELLIPSOIDS plots 2-d and 3-d Gaussian distributions
%
% H = PLOT_GAUSSIAN_ELLIPSOIDS(M, C) plots the distribution specified by
% mean M and covariance C. The distribution is plotted as an ellipse (in
% 2-d) or an ... |
github | epfl-lasa/ML_toolbox-master | draw_gmms.m | .m | ML_toolbox-master/functions/plot_functions/gmm_plot/plotGaussians/plot_2d_gaussian/draw_gmms.m | 1,761 | utf_8 | 7ba6836243e42e55466c0ff9a3c13af8 | function [X,Y,I] = draw_gmms(GMMs,colormaps,x_range,y_range,spacing )
% DRAW_GMMS Draws the scales likelihood of a set of GMMs with different
% colormaps
%
% input ----------------------------------------------------------------
%
%
%
nbGMMs = size(GMMs,1);
disp(['number of GMMs: ' num2str(nbGMMs)]);
xs=lins... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.