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
jthiem/SparseAuditoryEnvelopeCoding-master
FBsetup.m
.m
SparseAuditoryEnvelopeCoding-master/FBsetup.m
2,873
utf_8
6eaee7b3b68c9a175d42e84d555d4260
function [ FD ] = FBsetup( FD ) %FBSETUP Setup filter data % % Input is a structure that will be filled with gammatone filter % data. % Accepted fields: % fs: sampling frequency (if not present, assume 16k) % Ms: vector containgin ERB indecies for filters % If empty, assume Ms = 1.5, 2, 2.5, ...,...
github
peiyunh/mat-vae-master
vae_mnist.m
.m
mat-vae-master/vae_mnist.m
1,975
utf_8
c2a4ac3f16872556d20f069f4013d30e
function [net, info] = vae_mnist(varargin) %% configure opts.optim = 'SGD'; opts.gpus = [1]; opts.hiddenSizes = [28*28, 500, 2]; [opts, varargin] = vl_argparse(opts, varargin) ; sfx = sprintfc('%d', opts.hiddenSizes); sfx = [sfx{1} '-' sfx{2} '-' sfx{3}]; opts.expDir = fullfile('models', ['mnist-' sfx '-' opts.optim])...
github
peiyunh/mat-vae-master
init_model.m
.m
mat-vae-master/init_model.m
2,321
utf_8
90a6544b528c79101d9a3f0338a51de0
% init_model.m % n0: input size % n1: hidden layer size % n2: encoding size function net = init_model(n0, n1, n2) net = dagnn.DagNN(); % set up input size net.meta.normalization.imageSize = [1,1,n0]; % first hidden layer net = add_layer(net, 'h1', n0, n1, 'input', 'h1'); % add tanh net.addLayer('tanh1', dagnn.Tanh...
github
peiyunh/mat-vae-master
rmsprop_train.m
.m
mat-vae-master/training/rmsprop_train.m
13,036
utf_8
951a9da55bf645f373630f3b82d23fe8
function [net,stats] = rmsprop_train(net, imdb, getBatch, varargin) %CNN_TRAIN_DAG Demonstrates training a CNN using the DagNN wrapper % CNN_TRAIN_DAG() is similar to CNN_TRAIN(), but works with % the DagNN wrapper instead of the SimpleNN wrapper. % Copyright (C) 2014-16 Andrea Vedaldi. % All rights reserved. % ...
github
peiyunh/mat-vae-master
sgd_train.m
.m
mat-vae-master/training/sgd_train.m
13,557
utf_8
bcb7e1cfde8641638689e13424864e6a
function [net,stats] = sgd_train(net, imdb, getBatch, varargin) %CNN_TRAIN_DAG Demonstrates training a CNN using the DagNN wrapper % CNN_TRAIN_DAG() is similar to CNN_TRAIN(), but works with % the DagNN wrapper instead of the SimpleNN wrapper. % Copyright (C) 2014-16 Andrea Vedaldi. % All rights reserved. % % Th...
github
peiyunh/mat-vae-master
adagrad_train.m
.m
mat-vae-master/training/adagrad_train.m
13,024
utf_8
b4637c43ec155e7024ca3b06ca1f94ef
function [net,stats] = adagrad_train(net, imdb, getBatch, varargin) %CNN_TRAIN_DAG Demonstrates training a CNN using the DagNN wrapper % CNN_TRAIN_DAG() is similar to CNN_TRAIN(), but works with % the DagNN wrapper instead of the SimpleNN wrapper. % Copyright (C) 2014-16 Andrea Vedaldi. % All rights reserved. % ...
github
peiyunh/mat-vae-master
adam_train.m
.m
mat-vae-master/training/adam_train.m
13,198
utf_8
2043c620668c147da652e1052c8be01c
function [net,stats] = adam_train(net, imdb, getBatch, varargin) %CNN_TRAIN_DAG Demonstrates training a CNN using the DagNN wrapper % CNN_TRAIN_DAG() is similar to CNN_TRAIN(), but works with % the DagNN wrapper instead of the SimpleNN wrapper. % Copyright (C) 2014-16 Andrea Vedaldi. % All rights reserved. % % T...
github
avoldsund/watershed-v2-master
pdftops.m
.m
watershed-v2-master/mrst-code/export_fig/pdftops.m
6,161
utf_8
5edac4bbbdae30223cb246a4ec7313d6
function varargout = pdftops(cmd) %PDFTOPS Calls a local pdftops executable with the input command % % Example: % [status result] = pdftops(cmd) % % Attempts to locate a pdftops executable, finally asking the user to % specify the directory pdftops was installed into. The resulting path is % stored for futur...
github
avoldsund/watershed-v2-master
crop_borders.m
.m
watershed-v2-master/mrst-code/export_fig/crop_borders.m
5,133
utf_8
b744bf935914cfa6d9ff82140b48291e
function [A, vA, vB, bb_rel] = crop_borders(A, bcol, padding, crop_amounts) %CROP_BORDERS Crop the borders of an image or stack of images % % [B, vA, vB, bb_rel] = crop_borders(A, bcol, [padding]) % %IN: % A - HxWxCxN stack of images. % bcol - Cx1 background colour vector. % padding - scalar indicating ...
github
avoldsund/watershed-v2-master
isolate_axes.m
.m
watershed-v2-master/mrst-code/export_fig/isolate_axes.m
4,851
utf_8
611d9727e84ad6ba76dcb3543434d0ce
function fh = isolate_axes(ah, vis) %ISOLATE_AXES Isolate the specified axes in a figure on their own % % Examples: % fh = isolate_axes(ah) % fh = isolate_axes(ah, vis) % % This function will create a new figure containing the axes/uipanels % specified, and also their associated legends and colorbars. The o...
github
avoldsund/watershed-v2-master
im2gif.m
.m
watershed-v2-master/mrst-code/export_fig/im2gif.m
6,234
utf_8
8ee74d7d94e524410788276aa41dd5f1
%IM2GIF Convert a multiframe image to an animated GIF file % % Examples: % im2gif infile % im2gif infile outfile % im2gif(A, outfile) % im2gif(..., '-nocrop') % im2gif(..., '-nodither') % im2gif(..., '-ncolors', n) % im2gif(..., '-loops', n) % im2gif(..., '-delay', n) % % This function c...
github
avoldsund/watershed-v2-master
pdf2eps.m
.m
watershed-v2-master/mrst-code/export_fig/pdf2eps.m
1,522
utf_8
4c8f0603619234278ed413670d24bdb6
%PDF2EPS Convert a pdf file to eps format using pdftops % % Examples: % pdf2eps source dest % % This function converts a pdf file to eps format. % % This function requires that you have pdftops, from the Xpdf suite of % functions, installed on your system. This can be downloaded from: % http://www.foolabs.c...
github
avoldsund/watershed-v2-master
append_pdfs.m
.m
watershed-v2-master/mrst-code/export_fig/append_pdfs.m
2,759
utf_8
9b52be41aff48bea6f27992396900640
%APPEND_PDFS Appends/concatenates multiple PDF files % % Example: % append_pdfs(output, input1, input2, ...) % append_pdfs(output, input_list{:}) % append_pdfs test.pdf temp1.pdf temp2.pdf % % This function appends multiple PDF files to an existing PDF file, or % concatenates them into a PDF file if the o...
github
avoldsund/watershed-v2-master
eps2pdf.m
.m
watershed-v2-master/mrst-code/export_fig/eps2pdf.m
8,793
utf_8
474e976cf6454d5d7850baf14494fedf
function eps2pdf(source, dest, crop, append, gray, quality, gs_options) %EPS2PDF Convert an eps file to pdf format using ghostscript % % Examples: % eps2pdf source dest % eps2pdf(source, dest, crop) % eps2pdf(source, dest, crop, append) % eps2pdf(source, dest, crop, append, gray) % eps2pdf(source, de...
github
avoldsund/watershed-v2-master
ghostscript.m
.m
watershed-v2-master/mrst-code/export_fig/ghostscript.m
7,902
utf_8
ff62a40d651197dbea5d3c39998b3bad
function varargout = ghostscript(cmd) %GHOSTSCRIPT Calls a local GhostScript executable with the input command % % Example: % [status result] = ghostscript(cmd) % % Attempts to locate a ghostscript executable, finally asking the user to % specify the directory ghostcript was installed into. The resulting path...
github
avoldsund/watershed-v2-master
fix_lines.m
.m
watershed-v2-master/mrst-code/export_fig/fix_lines.m
6,441
utf_8
ffda929ebad8144b1e72d528fa5d9460
%FIX_LINES Improves the line style of eps files generated by print % % Examples: % fix_lines fname % fix_lines fname fname2 % fstrm_out = fixlines(fstrm_in) % % This function improves the style of lines in eps files generated by % MATLAB's print function, making them more similar to those seen on % scre...
github
avoldsund/watershed-v2-master
pdftops.m
.m
watershed-v2-master/mrst-code/export_fig/export_fig-master/pdftops.m
6,161
utf_8
5edac4bbbdae30223cb246a4ec7313d6
function varargout = pdftops(cmd) %PDFTOPS Calls a local pdftops executable with the input command % % Example: % [status result] = pdftops(cmd) % % Attempts to locate a pdftops executable, finally asking the user to % specify the directory pdftops was installed into. The resulting path is % stored for futur...
github
avoldsund/watershed-v2-master
crop_borders.m
.m
watershed-v2-master/mrst-code/export_fig/export_fig-master/crop_borders.m
5,133
utf_8
b744bf935914cfa6d9ff82140b48291e
function [A, vA, vB, bb_rel] = crop_borders(A, bcol, padding, crop_amounts) %CROP_BORDERS Crop the borders of an image or stack of images % % [B, vA, vB, bb_rel] = crop_borders(A, bcol, [padding]) % %IN: % A - HxWxCxN stack of images. % bcol - Cx1 background colour vector. % padding - scalar indicating ...
github
avoldsund/watershed-v2-master
isolate_axes.m
.m
watershed-v2-master/mrst-code/export_fig/export_fig-master/isolate_axes.m
4,851
utf_8
611d9727e84ad6ba76dcb3543434d0ce
function fh = isolate_axes(ah, vis) %ISOLATE_AXES Isolate the specified axes in a figure on their own % % Examples: % fh = isolate_axes(ah) % fh = isolate_axes(ah, vis) % % This function will create a new figure containing the axes/uipanels % specified, and also their associated legends and colorbars. The o...
github
avoldsund/watershed-v2-master
im2gif.m
.m
watershed-v2-master/mrst-code/export_fig/export_fig-master/im2gif.m
6,234
utf_8
8ee74d7d94e524410788276aa41dd5f1
%IM2GIF Convert a multiframe image to an animated GIF file % % Examples: % im2gif infile % im2gif infile outfile % im2gif(A, outfile) % im2gif(..., '-nocrop') % im2gif(..., '-nodither') % im2gif(..., '-ncolors', n) % im2gif(..., '-loops', n) % im2gif(..., '-delay', n) % % This function c...
github
avoldsund/watershed-v2-master
read_write_entire_textfile.m
.m
watershed-v2-master/mrst-code/export_fig/export_fig-master/read_write_entire_textfile.m
961
utf_8
775aa1f538c76516c7fb406a4f129320
%READ_WRITE_ENTIRE_TEXTFILE Read or write a whole text file to/from memory % % Read or write an entire text file to/from memory, without leaving the % file open if an error occurs. % % Reading: % fstrm = read_write_entire_textfile(fname) % Writing: % read_write_entire_textfile(fname, fstrm) % %IN: % fn...
github
avoldsund/watershed-v2-master
pdf2eps.m
.m
watershed-v2-master/mrst-code/export_fig/export_fig-master/pdf2eps.m
1,522
utf_8
4c8f0603619234278ed413670d24bdb6
%PDF2EPS Convert a pdf file to eps format using pdftops % % Examples: % pdf2eps source dest % % This function converts a pdf file to eps format. % % This function requires that you have pdftops, from the Xpdf suite of % functions, installed on your system. This can be downloaded from: % http://www.foolabs.c...
github
avoldsund/watershed-v2-master
print2array.m
.m
watershed-v2-master/mrst-code/export_fig/export_fig-master/print2array.m
10,376
utf_8
a2022c32ae3efa6007a326692227bd39
function [A, bcol] = print2array(fig, res, renderer, gs_options) %PRINT2ARRAY Exports a figure to an image array % % Examples: % A = print2array % A = print2array(figure_handle) % A = print2array(figure_handle, resolution) % A = print2array(figure_handle, resolution, renderer) % A = print2array(figur...
github
avoldsund/watershed-v2-master
append_pdfs.m
.m
watershed-v2-master/mrst-code/export_fig/export_fig-master/append_pdfs.m
2,759
utf_8
9b52be41aff48bea6f27992396900640
%APPEND_PDFS Appends/concatenates multiple PDF files % % Example: % append_pdfs(output, input1, input2, ...) % append_pdfs(output, input_list{:}) % append_pdfs test.pdf temp1.pdf temp2.pdf % % This function appends multiple PDF files to an existing PDF file, or % concatenates them into a PDF file if the o...
github
avoldsund/watershed-v2-master
using_hg2.m
.m
watershed-v2-master/mrst-code/export_fig/export_fig-master/using_hg2.m
1,100
utf_8
47ca10d86740c27b9f6b397373ae16cd
%USING_HG2 Determine if the HG2 graphics engine is used % % tf = using_hg2(fig) % %IN: % fig - handle to the figure in question. % %OUT: % tf - boolean indicating whether the HG2 graphics engine is being used % (true) or not (false). % 19/06/2015 - Suppress warning in R2015b; cache result for i...
github
avoldsund/watershed-v2-master
eps2pdf.m
.m
watershed-v2-master/mrst-code/export_fig/export_fig-master/eps2pdf.m
8,793
utf_8
474e976cf6454d5d7850baf14494fedf
function eps2pdf(source, dest, crop, append, gray, quality, gs_options) %EPS2PDF Convert an eps file to pdf format using ghostscript % % Examples: % eps2pdf source dest % eps2pdf(source, dest, crop) % eps2pdf(source, dest, crop, append) % eps2pdf(source, dest, crop, append, gray) % eps2pdf(source, de...
github
avoldsund/watershed-v2-master
ghostscript.m
.m
watershed-v2-master/mrst-code/export_fig/export_fig-master/ghostscript.m
7,902
utf_8
ff62a40d651197dbea5d3c39998b3bad
function varargout = ghostscript(cmd) %GHOSTSCRIPT Calls a local GhostScript executable with the input command % % Example: % [status result] = ghostscript(cmd) % % Attempts to locate a ghostscript executable, finally asking the user to % specify the directory ghostcript was installed into. The resulting path...
github
avoldsund/watershed-v2-master
fix_lines.m
.m
watershed-v2-master/mrst-code/export_fig/export_fig-master/fix_lines.m
6,441
utf_8
ffda929ebad8144b1e72d528fa5d9460
%FIX_LINES Improves the line style of eps files generated by print % % Examples: % fix_lines fname % fix_lines fname fname2 % fstrm_out = fixlines(fstrm_in) % % This function improves the style of lines in eps files generated by % MATLAB's print function, making them more similar to those seen on % scre...
github
avoldsund/watershed-v2-master
hydrographMovingDisc.m
.m
watershed-v2-master/mrst-code/+util/hydrographMovingDisc.m
3,192
utf_8
7951e97f7d6630952ff82814610cafa5
function discharge = hydrographMovingDisc(CG, tof, disc, maxTime) %CALCULATEHYDROGRAPH Calculate the discharge at the outlet given a moving %disc of precipitation. % DISCHARGE = HYDROGRAPHMOVINGFRONT(CG, TOF, DISC, MAXTIME) returns the % DISCHARGE from a watershed given a moving disc of precipitation, DISC. % The...
github
avoldsund/watershed-v2-master
hydrographMovingFrontFast.m
.m
watershed-v2-master/mrst-code/+util/hydrographMovingFrontFast.m
3,452
utf_8
0e521d3b45f8302d9a84d9731fb9aefa
function flow = hydrographMovingFrontFast(CG, tof, front, timeStep, maxTime)%, f) cellArea = CG.faceLength * CG.faceLength; flow = false; in = true; t = 1; while any(in) == 1 & t < maxTime t [flow, in] = getDischarge(CG, tof, flow, front, maxTime, cellArea, timeStep, t); if t == 9 hold on ...
github
avoldsund/watershed-v2-master
hydrographMovingFront.m
.m
watershed-v2-master/mrst-code/+util/hydrographMovingFront.m
3,162
utf_8
e10a17d0da03fce3f22939d6a3f18c7e
function discharge = hydrographMovingFront(CG, tof, front, maxTime)%, f) %CALCULATEHYDROGRAPH Calculate the discharge at the outlet given a moving %front of precipitation. % DISCHARGE = HYDROGRAPHMOVINGFRONT(CG, TOF, FRONT, MAXTIME) returns the % DISCHARGE from a watershed given a moving front with precipitation, ...
github
avoldsund/watershed-v2-master
hydrographMovingDiscFast.m
.m
watershed-v2-master/mrst-code/+util/hydrographMovingDiscFast.m
3,721
utf_8
5acb45ddb71994084ca8485027d0f257
function flow = hydrographMovingDiscFast(CG, tof, disc, timeStep, maxTime) %CALCULATEHYDROGRAPH Calculate the discharge at the outlet given a moving %disc of precipitation. % DISCHARGE = HYDROGRAPHMOVINGFRONT(CG, TOF, DISC, MAXTIME) returns the % DISCHARGE from a watershed given a moving disc of precipitation, DISC...
github
ymh1989/Heston-master
HestonCall.m
.m
Heston-master/code/HestonCall.m
1,171
utf_8
0ec2b7dd4bf53af2e498c84cab451cc8
function R3 = HestonCall(S,K,v,r,t,kp,et,sm,rh,ld,trunc,greek) if nargin < 11, trunc = 100; greek = 1; end I = sqrt(-1); x = log(S) + r*t; switch greek case 1 % Price inte = @(w) (exp(-I*w*x).*(K.^(1+I*w)).*Ffun(t,w,v,kp,ld,et,sm,rh)... ./(I*w-w.^2)); case 2 % delta inte = @(w) (-I...
github
andrew-nyu/migration-master
runMIDAS.m
.m
migration-master/runMIDAS.m
922
utf_8
5101dac9e3b3f452a1be92dee5ffb378
function mcScriptRun() clear functions clear classes addpath('./Core_MIDAS_Code'); addpath('./Override_Core_MIDAS_Code'); addpath('./Application_Specific_MIDAS_Code'); rng('shuffle'); runName = 'Whatever you want to call this one'; series = 'MC_Run_'; saveDirectory = './Outputs/'; input = []; %this next line run...
github
andrew-nyu/migration-master
newPopulation.m
.m
migration-master/gaFiles/newPopulation.m
27,801
utf_8
5ccec820c140bea6b7ba634bfe358d59
function [bestCalibrationSet, fitnessHistory, population] = newPopulation(gAParameters) %some fitness function data - %use just 2002 data for now %migrationData = reshape(interDistrictMovesMat(:,:,1),64,64); %popData = reshape(popMat(:,1),64,1); load migrationCounts_2002_2011; load midasLocations; %average data fro...
github
mcreel/NeuralNetsForIndirectInference.jl-master
II_estimate.m
.m
NeuralNetsForIndirectInference.jl-master/CTSV/IndirectInferenceEstimationExample/II_estimate.m
2,822
utf_8
06027253caf6a324d4c98bcd78b2e37c
1; function m = moments(theta, Zn, S, RNGstate) E_Z = theta-theta; theta = [theta; zeros(5,1)]; numok = 0; for s = 1:S rand("state", RNGstate + s); % reset seed to control chatter delta = 5; % time delta in minutes M = 24*60/delta; % number of delta minute periods in a 24 hour d...
github
mcreel/NeuralNetsForIndirectInference.jl-master
NNstat.m
.m
NeuralNetsForIndirectInference.jl-master/CTSV/IndirectInferenceEstimationExample/NNstat.m
750
utf_8
7d12af62835998afbd819fc516d0a48c
# this function take a raw 40 element vector # of stats for the DSGE model and outputs # the fitted 300_40.jl neural net fittted # value # Z enters as a row vector, output stat is also a row vector function fit = NNstat(Z) # load the preprocess items and NN coefs load mZs; load sZs; lo...
github
mcreel/NeuralNetsForIndirectInference.jl-master
CreateAIS.m
.m
NeuralNetsForIndirectInference.jl-master/CTSV/AIS/CreateAIS.m
5,039
utf_8
10f3d94bb346114634a03d1d9f0100d4
## Copyright (C) 2014 Michael Creel ## ## This program is free software; you can redistribute it and/or modify it ## under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 3 of the License, or ## (at your option) any later version. ## ## This program is distr...
github
mcreel/NeuralNetsForIndirectInference.jl-master
NNstat.m
.m
NeuralNetsForIndirectInference.jl-master/CTSV/AIS/NNstat.m
986
utf_8
5747256fadba8b3ae85cf174604e19e0
# this function take a raw 40 element vector # of stats for the DSGE model and outputs # the fitted 300_40.jl neural net fittted # value # Z enters as a row vector, output stat is also a row vector function fit = NNstat(Z) # load the preprocess items and NN coefs load mZs; load sZs; lo...
github
mcreel/NeuralNetsForIndirectInference.jl-master
rq.m
.m
NeuralNetsForIndirectInference.jl-master/CTSV/AIS/rq.m
2,871
utf_8
482826be3a2e7c7394266203812d695d
# rq.m obtained from http://www.econ.uiuc.edu/~roger/research/rq/rq.m function b = rq_fnm(X, y, p) % Construct the dual problem of quantile regression % Solve it with lp_fnm % % [m n] = size(X); u = ones(m, 1); a = (1 - p) .* u; b = -lp_fnm(X', -y', X' * a, u, a)'; function y = lp_fnm(A, c, b, u, x) % Solve a linear ...
github
mcreel/NeuralNetsForIndirectInference.jl-master
SampleFromAIS.m
.m
NeuralNetsForIndirectInference.jl-master/CTSV/AIS/SampleFromAIS.m
2,939
utf_8
242ccf9af8cedf79becd4ec6bd56d9b9
## Copyright (C) 2014 Michael Creel ## ## This program is free software; you can redistribute it and/or modify it ## under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 3 of the License, or ## (at your option) any later version. ## ## This program is distr...
github
mcreel/NeuralNetsForIndirectInference.jl-master
aux_stat.m
.m
NeuralNetsForIndirectInference.jl-master/DSGE/aux_stat.m
4,768
utf_8
3ba03bd8fb7ae6287ee75cf523930e41
% These are the candidate auxiliary statistics for ABC estimation of % the simple DSGE model of Creel and Kristensen (2013) function Z = aux_stat(data) function bad = check_bad_data(data) bad = sum(any(isnan(data)))||sum(any(isinf(data)))||sum(any(std(data)==0)); end bad_data = false; % chec...
github
mcreel/NeuralNetsForIndirectInference.jl-master
lag.m
.m
NeuralNetsForIndirectInference.jl-master/DSGE/IndirectInferenceEstimationExample/lag.m
266
utf_8
ecd5f94517b473a5b49d961840bbd314
% returns the variable (or matrix), lagged p times, % with the first p rows filled with ones (to avoid divide errors) % remember to drop those rows before doing analysis function lagged_x = lag(x,p) k = size(x,2); lagged_x = [ones(p,k); x(1:size(x,1)-p,:)]; end
github
mcreel/NeuralNetsForIndirectInference.jl-master
NNstat.m
.m
NeuralNetsForIndirectInference.jl-master/DSGE/IndirectInferenceEstimationExample/NNstat.m
598
utf_8
b3dc897b01927e908b1d968ba23282ce
# this function take a raw 40 element vector # of stats for the DSGE model and outputs # the fitted 300_40.jl neural net fittted # value # Z enters as a row vector, output stat is also a row vector function fit = NNstat(Z) # load the preprocess items and NN coefs load NNitems; # get the NN fit...
github
mcreel/NeuralNetsForIndirectInference.jl-master
lags.m
.m
NeuralNetsForIndirectInference.jl-master/DSGE/IndirectInferenceEstimationExample/lags.m
327
utf_8
bef729bcfb66136a4571630984636985
% returns the variable (or matrix), lagged from 1 to p times, % with the first p rows filled with ones (to avoid divide errors) % remember to drop those rows before doing analysis function lagged_x = lags(x,p) k = size(x,2); lagged_x = lag(x,1); if p > 1 for i = 2:p lagged_x = [lagged_x, lag(x,i)]; end end ...
github
mcreel/NeuralNetsForIndirectInference.jl-master
lag.m
.m
NeuralNetsForIndirectInference.jl-master/DSGE/SimpleDirectEstimationExample/lag.m
266
utf_8
ecd5f94517b473a5b49d961840bbd314
% returns the variable (or matrix), lagged p times, % with the first p rows filled with ones (to avoid divide errors) % remember to drop those rows before doing analysis function lagged_x = lag(x,p) k = size(x,2); lagged_x = [ones(p,k); x(1:size(x,1)-p,:)]; end
github
mcreel/NeuralNetsForIndirectInference.jl-master
NNstat.m
.m
NeuralNetsForIndirectInference.jl-master/DSGE/SimpleDirectEstimationExample/NNstat.m
574
utf_8
e0cadb305442966860439b1f6a6cd720
# this function take a raw 40 element vector # of stats for the DSGE model and outputs # the fitted 300_40.jl neural net fittted # value # Z enters as a row vector, output stat is also a row vector function fit = NNstat(Z) # load the preprocess items and NN coefs load NNitems; # get the NN fit...
github
mcreel/NeuralNetsForIndirectInference.jl-master
lags.m
.m
NeuralNetsForIndirectInference.jl-master/DSGE/SimpleDirectEstimationExample/lags.m
327
utf_8
bef729bcfb66136a4571630984636985
% returns the variable (or matrix), lagged from 1 to p times, % with the first p rows filled with ones (to avoid divide errors) % remember to drop those rows before doing analysis function lagged_x = lags(x,p) k = size(x,2); lagged_x = lag(x,1); if p > 1 for i = 2:p lagged_x = [lagged_x, lag(x,i)]; end end ...
github
EasyMEG/EasyMEG-master
EasyMEG.m
.m
EasyMEG-master/EasyMEG.m
74,183
utf_8
3ca6e428202d81fdf034ecf596c3016a
function varargout = EasyMEG(varargin) % EASYMEG MATLAB code for EasyMEG.fig % EASYMEG, by itself, creates a new EASYMEG or raises the existing % singleton*. % % H = EASYMEG returns the handle to a new EASYMEG or the handle to % the existing singleton*. % % EASYMEG('CALLBACK',hObject,eventData,...
github
EasyMEG/EasyMEG-master
TopoPlotTFR.m
.m
EasyMEG-master/functions/TopoPlotTFR.m
8,463
utf_8
d1af1782cec011104ddb0aba1d4b4d68
function varargout = TopoPlotTFR(varargin) % TopoPlotTFR MATLAB code for TopoPlotTFR.fig % TopoPlotTFR, by itself, creates a new TopoPlotTFR or raises the existing % singleton*. % % H = TopoPlotTFR returns the handle to a new TopoPlotTFR or the handle to % the existing singleton*. % % TopoPlotT...
github
EasyMEG/EasyMEG-master
BandPassFilter.m
.m
EasyMEG-master/functions/BandPassFilter.m
4,356
utf_8
472be1c8ffd90c11a9f1cb65c9d7ebaa
function varargout = BandPassFilter(varargin) % LOWPASSFILTER MATLAB code for LowPassFilter.fig % LOWPASSFILTER, by itself, creates a new LOWPASSFILTER or raises the existing % singleton*. % % H = LOWPASSFILTER returns the handle to a new LOWPASSFILTER or the handle to % the existing singleton*. % %...
github
EasyMEG/EasyMEG-master
CorticoMuscularCoherence.m
.m
EasyMEG-master/functions/CorticoMuscularCoherence.m
5,896
utf_8
d16cf17d85936f5544aa8c8839c79e04
function varargout = CorticoMuscularCoherence(varargin) % CORTICOMUSCULARCOHERENCE MATLAB code for CorticoMuscularCoherence.fig % CORTICOMUSCULARCOHERENCE, by itself, creates a new CORTICOMUSCULARCOHERENCE or raises the existing % singleton*. % % H = CORTICOMUSCULARCOHERENCE returns the handle to a new C...
github
EasyMEG/EasyMEG-master
SourceModel.m
.m
EasyMEG-master/functions/SourceModel.m
9,040
utf_8
f1c775f4aaa0cbb576289226b2dd176b
function varargout = SourceModel(varargin) % SOURCEMODEL MATLAB code for SourceModel.fig % SOURCEMODEL, by itself, creates a new SOURCEMODEL or raises the existing % singleton*. % % H = SOURCEMODEL returns the handle to a new SOURCEMODEL or the handle to % the existing singleton*. % % SOURCEMOD...
github
EasyMEG/EasyMEG-master
LocalizingOscillatorySources.m
.m
EasyMEG-master/functions/LocalizingOscillatorySources.m
9,904
utf_8
c887311c02ebfc1fd4cf89b77ee2ba01
function varargout = LocalizingOscillatorySources(varargin) % LOCALIZINGOSCILLATORYSOURCES MATLAB code for LocalizingOscillatorySources.fig % LOCALIZINGOSCILLATORYSOURCES, by itself, creates a new LOCALIZINGOSCILLATORYSOURCES or raises the existing % singleton*. % % H = LOCALIZINGOSCILLATORYSOURCES retur...
github
EasyMEG/EasyMEG-master
SelectData.m
.m
EasyMEG-master/functions/SelectData.m
4,171
utf_8
09f54113be633e3d040c827810d864d5
function varargout = SelectData(varargin) % SELECTDATA MATLAB code for SelectData.fig % SELECTDATA, by itself, creates a new SELECTDATA or raises the existing % singleton*. % % H = SELECTDATA returns the handle to a new SELECTDATA or the handle to % the existing singleton*. % % SELECTDATA('CALL...
github
EasyMEG/EasyMEG-master
LowPassFilter.m
.m
EasyMEG-master/functions/LowPassFilter.m
4,350
utf_8
ad79e88f5b2e2b9249bdb7525b0496a8
function varargout = LowPassFilter(varargin) % LOWPASSFILTER MATLAB code for LowPassFilter.fig % LOWPASSFILTER, by itself, creates a new LOWPASSFILTER or raises the existing % singleton*. % % H = LOWPASSFILTER returns the handle to a new LOWPASSFILTER or the handle to % the existing singleton*. % % ...
github
EasyMEG/EasyMEG-master
RedefineTrails.m
.m
EasyMEG-master/functions/RedefineTrails.m
8,304
utf_8
492c693b9c8bee8210c0fd783184b6ab
function varargout = RedefineTrails(varargin) % RedefineTrails MATLAB code for RedefineTrails.fig % RedefineTrails, by itself, creates a new RedefineTrails or raises the existing % singleton*. % % H = RedefineTrails returns the handle to a new RedefineTrails or the handle to % the existing singleton...
github
EasyMEG/EasyMEG-master
getAlim.m
.m
EasyMEG-master/functions/getAlim.m
4,352
utf_8
e58d8589e705b19322d4e78c08796ec5
function varargout = getAlim(varargin) % GETALIM MATLAB code for getAlim.fig % GETALIM, by itself, creates a new GETALIM or raises the existing % singleton*. % % H = GETALIM returns the handle to a new GETALIM or the handle to % the existing singleton*. % % GETALIM('CALLBACK',hObject,eventData,...
github
EasyMEG/EasyMEG-master
SourceAnalysis_Single.m
.m
EasyMEG-master/functions/SourceAnalysis_Single.m
12,734
utf_8
18c0492bded0e86656fdf96d1be33d26
function varargout = SourceAnalysis_Single(varargin) % SOURCEANALYSIS MATLAB code for SourceAnalysis_Single.fig % SOURCEANALYSIS, by itself, creates a new SOURCEANALYSIS or raises the existing % singleton*. % % H = SOURCEANALYSIS returns the handle to a new SOURCEANALYSIS or the handle to % the exis...
github
EasyMEG/EasyMEG-master
TimeLockAnalysis.m
.m
EasyMEG-master/functions/TimeLockAnalysis.m
8,475
utf_8
78a9dc0f1a680dc5f17f9de62880e213
function varargout = TimeLockAnalysis(varargin) % LOWPASSFILTER MATLAB code for LowPassFilter.fig % LOWPASSFILTER, by itself, creates a new LOWPASSFILTER or raises the existing % singleton*. % % H = LOWPASSFILTER returns the handle to a new LOWPASSFILTER or the handle to % the existing singleton*. %...
github
EasyMEG/EasyMEG-master
SourceAnalysis.m
.m
EasyMEG-master/functions/SourceAnalysis.m
14,746
utf_8
0515eb8701b85801cb8d0d702786cc4d
function varargout = SourceAnalysis(varargin) % SOURCEANALYSIS MATLAB code for SourceAnalysis.fig % SOURCEANALYSIS, by itself, creates a new SOURCEANALYSIS or raises the existing % singleton*. % % H = SOURCEANALYSIS returns the handle to a new SOURCEANALYSIS or the handle to % the existing singleton...
github
EasyMEG/EasyMEG-master
SinglePlotER.m
.m
EasyMEG-master/functions/SinglePlotER.m
7,476
utf_8
ef85759cb91c793e1e27a7963ba8f0c2
function varargout = SinglePlotER(varargin) % SinglePlotER MATLAB code for SinglePlotER.fig % SinglePlotER, by itself, creates a new SinglePlotER or raises the existing % singleton*. % % H = SinglePlotER returns the handle to a new SinglePlotER or the handle to % the existing singleton*. % % Si...
github
EasyMEG/EasyMEG-master
SplitTrial.m
.m
EasyMEG-master/functions/SplitTrial.m
4,475
utf_8
99f9fd645e0e8c8b830282612539c4a3
function varargout = SplitTrial(varargin) % SPLITTRIAL MATLAB code for SplitTrial.fig % SPLITTRIAL, by itself, creates a new SPLITTRIAL or raises the existing % singleton*. % % H = SPLITTRIAL returns the handle to a new SPLITTRIAL or the handle to % the existing singleton*. % % SPLITTRIAL('CALL...
github
EasyMEG/EasyMEG-master
MultiPlotTFR.m
.m
EasyMEG-master/functions/MultiPlotTFR.m
7,899
utf_8
84072fe3c00889e28481890f0dc237c3
function varargout = MultiPlotTFR(varargin) % MultiPlotTFR MATLAB code for MultiPlotTFR.fig % MultiPlotTFR, by itself, creates a new MultiPlotTFR or raises the existing % singleton*. % % H = MultiPlotTFR returns the handle to a new MultiPlotTFR or the handle to % the existing singleton*. % % Mu...
github
EasyMEG/EasyMEG-master
HighPassFilter.m
.m
EasyMEG-master/functions/HighPassFilter.m
4,384
utf_8
7aba360901d159f3244bdc8dd9a33fbb
function varargout = HighPassFilter(varargin) % LOWPASSFILTER MATLAB code for LowPassFilter.fig % LOWPASSFILTER, by itself, creates a new LOWPASSFILTER or raises the existing % singleton*. % % H = LOWPASSFILTER returns the handle to a new LOWPASSFILTER or the handle to % the existing singleton*. % %...
github
EasyMEG/EasyMEG-master
BaselineCorrection.m
.m
EasyMEG-master/functions/BaselineCorrection.m
4,321
utf_8
03c4d88a5fc121d74645ab0ffe159c4c
function varargout = BaselineCorrection(varargin) % BASELINECORRECTION MATLAB code for BaselineCorrection.fig % BASELINECORRECTION, by itself, creates a new BASELINECORRECTION or raises the existing % singleton*. % % H = BASELINECORRECTION returns the handle to a new BASELINECORRECTION or the handle to %...
github
EasyMEG/EasyMEG-master
FreqWAVELET.m
.m
EasyMEG-master/functions/FreqWAVELET.m
6,605
utf_8
1920cf72a31c6cc755ae2cf9919ce728
function varargout = FreqWAVELET(varargin) % FreqWAVELET MATLAB code for FreqWAVELET.fig % FreqWAVELET, by itself, creates a new FreqWAVELET or raises the existing % singleton*. % % H = FreqWAVELET returns the handle to a new FreqWAVELET or the handle to % the existing singleton*. % % FreqWAVEL...
github
EasyMEG/EasyMEG-master
MultiPlotER.m
.m
EasyMEG-master/functions/MultiPlotER.m
7,809
utf_8
6bdb2dad07e5d79a6ea7e88f6c954143
function varargout = MultiPlotER(varargin) % MULTIPLOTER MATLAB code for MultiPlotER.fig % MULTIPLOTER, by itself, creates a new MULTIPLOTER or raises the existing % singleton*. % % H = MULTIPLOTER returns the handle to a new MULTIPLOTER or the handle to % the existing singleton*. % % MULTIPLOT...
github
EasyMEG/EasyMEG-master
TrfHanningTapers.m
.m
EasyMEG-master/functions/TrfHanningTapers.m
6,729
utf_8
7cac6c9250fece6e31b07fafaa32be30
function varargout = TrfHanningTapers(varargin) % LOWPASSFILTER MATLAB code for LowPassFilter.fig % LOWPASSFILTER, by itself, creates a new LOWPASSFILTER or raises the existing % singleton*. % % H = LOWPASSFILTER returns the handle to a new LOWPASSFILTER or the handle to % the existing singleton*. %...
github
EasyMEG/EasyMEG-master
SinglePlotTFR.m
.m
EasyMEG-master/functions/SinglePlotTFR.m
7,567
utf_8
54bb41fb9db1f941f2aa71d746a4b750
function varargout = SinglePlotTFR(varargin) % SinglePlotTFR MATLAB code for SinglePlotTFR.fig % SinglePlotTFR, by itself, creates a new SinglePlotTFR or raises the existing % singleton*. % % H = SinglePlotTFR returns the handle to a new SinglePlotTFR or the handle to % the existing singleton*. % % ...
github
EasyMEG/EasyMEG-master
BandStopFilter.m
.m
EasyMEG-master/functions/BandStopFilter.m
4,387
utf_8
40344632b5e42b9066d0b99c00014ccb
function varargout = BandStopFilter(varargin) % LOWPASSFILTER MATLAB code for LowPassFilter.fig % LOWPASSFILTER, by itself, creates a new LOWPASSFILTER or raises the existing % singleton*. % % H = LOWPASSFILTER returns the handle to a new LOWPASSFILTER or the handle to % the existing singleton*. % %...
github
EasyMEG/EasyMEG-master
LeadField.m
.m
EasyMEG-master/functions/LeadField.m
6,212
utf_8
50206a00c7a651a559fd25c2ae475c8e
function varargout = LeadField(varargin) % LEADFIELD MATLAB code for LeadField.fig % LEADFIELD, by itself, creates a new LEADFIELD or raises the existing % singleton*. % % H = LEADFIELD returns the handle to a new LEADFIELD or the handle to % the existing singleton*. % % LEADFIELD('CALLBACK',hO...
github
EasyMEG/EasyMEG-master
FreqMTMCONVOL.m
.m
EasyMEG-master/functions/FreqMTMCONVOL.m
7,256
utf_8
62a407403a76c73a3c2e05f5783d3c89
function varargout = FreqMTMCONVOL(varargin) % FreqMTMCONVOL MATLAB code for FreqMTMCONVOL.fig % FreqMTMCONVOL, by itself, creates a new FreqMTMCONVOL or raises the existing % singleton*. % % H = FreqMTMCONVOL returns the handle to a new FreqMTMCONVOL or the handle to % the existing singleton*. % % ...
github
EasyMEG/EasyMEG-master
FreqTFR.m
.m
EasyMEG-master/functions/FreqTFR.m
7,097
utf_8
c2630ca0e8ae86003c1064bb9bc9167a
function varargout = FreqTFR(varargin) % FreqTFR MATLAB code for FreqTFR.fig % FreqTFR, by itself, creates a new FreqTFR or raises the existing % singleton*. % % H = FreqTFR returns the handle to a new FreqTFR or the handle to % the existing singleton*. % % FreqTFR('CALLBACK',hObject,eventData,...
github
EasyMEG/EasyMEG-master
TopoPlotER.m
.m
EasyMEG-master/functions/TopoPlotER.m
8,441
utf_8
8f7896e5d967f30c0f915b72c4d1eeb8
function varargout = TopoPlotER(varargin) % TopoPlotER MATLAB code for TopoPlotER.fig % TopoPlotER, by itself, creates a new TopoPlotER or raises the existing % singleton*. % % H = TopoPlotER returns the handle to a new TopoPlotER or the handle to % the existing singleton*. % % TopoPlotER('CALL...
github
EasyMEG/EasyMEG-master
VisualInspect.m
.m
EasyMEG-master/functions/VisualInspect.m
10,166
utf_8
5d1813f1dcd69ea2d0c875756b1f4177
function varargout = VisualInspect(varargin) % VisualInspect MATLAB code for VisualInspect.fig % VisualInspect, by itself, creates a new VisualInspect or raises the existing % singleton*. % % H = VisualInspect returns the handle to a new VisualInspect or the handle to % the existing singleton*. % % ...
github
EasyMEG/EasyMEG-master
AppendData.m
.m
EasyMEG-master/functions/AppendData.m
5,746
utf_8
c27af8b3ead5e20a6e71ff9ace9dbb77
function varargout = AppendData(varargin) % APPENDDATA MATLAB code for AppendData.fig % APPENDDATA, by itself, creates a new APPENDDATA or raises the existing % singleton*. % % H = APPENDDATA returns the handle to a new APPENDDATA or the handle to % the existing singleton*. % % APPENDDATA('CALL...
github
EasyMEG/EasyMEG-master
SourcePlot.m
.m
EasyMEG-master/functions/SourcePlot.m
8,902
utf_8
ffc773164668b2483ad325a404239dab
function varargout = SourcePlot(varargin) % SOURCEPLOT MATLAB code for SourcePlot.fig % SOURCEPLOT, by itself, creates a new SOURCEPLOT or raises the existing % singleton*. % % H = SOURCEPLOT returns the handle to a new SOURCEPLOT or the handle to % the existing singleton*. % % SOURCEPLOT('CALL...
github
EasyMEG/EasyMEG-master
FreqMTMFFT.m
.m
EasyMEG-master/functions/FreqMTMFFT.m
6,376
utf_8
4453ddf0464d2a83336252d52836123e
function varargout = FreqMTMFFT(varargin) % FREQMTMFFT MATLAB code for FreqMTMFFT.fig % FREQMTMFFT, by itself, creates a new FREQMTMFFT or raises the existing % singleton*. % % H = FREQMTMFFT returns the handle to a new FREQMTMFFT or the handle to % the existing singleton*. % % FREQMTMFFT('CALL...
github
EasyMEG/EasyMEG-master
SetFieldTrip.m
.m
EasyMEG-master/functions/SetFieldTrip.m
4,222
utf_8
c8b5ae779657208f00a063ea82397c69
function varargout = SetFieldTrip(varargin) % SETFIELDTRIP MATLAB code for SetFieldTrip.fig % SETFIELDTRIP, by itself, creates a new SETFIELDTRIP or raises the existing % singleton*. % % H = SETFIELDTRIP returns the handle to a new SETFIELDTRIP or the handle to % the existing singleton*. % % SE...
github
EasyMEG/EasyMEG-master
inifile.m
.m
EasyMEG-master/external/inifile/inifile.m
31,136
utf_8
eb48bffae1dd557fa58461a80b52c1d4
function varargout = inifile(varargin) %INIFILE Creates, reads, or writes data from/to a standard ini (ascii) % file. Such a file is organized into sections % ([section name]), subsections(enclosed by {subsection name}), % and keys (key=value). Empty lines and lines with the first non-empty % ...
github
bakerjw/NGAW2_correlations-master
AS16_dur.m
.m
NGAW2_correlations-master/AS16_dur.m
4,904
utf_8
8ef39edbab6d37a72bca927f49a2a6be
function [ median, sigma, tau, phi ] = AS16_dur( Def, M, R, Vs30, Mech, Z1, CJ ) % % Created by Jack Baker, August 9, 2016 % Based on code from Kioumars Afshari % Updated 12/8/2017 to correct errors in AS16 equations 11 and 12 % % Duration prediction from the following model % % Afshari, K., and Stewart, J. P. (2016). ...
github
bakerjw/NGAW2_correlations-master
exampleCS.m
.m
NGAW2_correlations-master/exampleCS.m
4,358
utf_8
8077e5d9c213e4e6d9f33bd80a1dcaef
function [ ] = exampleCS() % Compute example conditional spectra to illustrate the effect of % correlation models % Jack Baker % 2 June 2016 clear load allIMsResids %% specify an analysis scenario M = 7.5; Dist_jb = 20; Vs30 = 500; Fault_Type = 1; z1 = -999; region = 0; % SS fault and z1, global model % conditio...
github
bakerjw/NGAW2_correlations-master
CY_2014_nga_mod.m
.m
NGAW2_correlations-master/CY_2014_nga_mod.m
16,597
utf_8
da42ec05d6bc6fb82ec1af8e645d3657
% coded by Yue Hua % Stanford University % yuehua@stanford.edu % % CY_14 attenuation equation - Update of the Chiou and Youngs NGA Model for % the Average Horizontal Component of Peak Ground Motion and Response % Spectra, Chiou and Youngs (2014) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%...
github
bakerjw/NGAW2_correlations-master
nearestCorrelationMatrix.m
.m
NGAW2_correlations-master/nearestCorrelationMatrix.m
14,702
utf_8
457fed4e97fe659dc135e5df6986f2dd
%%%%%%%%% This code is designed to solve %%%%%%%%%%%%% %%%%%%%% min 0.5*<X-G, X-G> %%%%%%% s.t. X_ii =b_i, i=1,2,...,n %%%%%%% X>=tau*I (symmetric and positive semi-definite) %%%%%%%%%%%%%%% %%%%%%%% %%%%%% based on the algorithm in %%%%% %%%%%% ``A Quadratically Convergent Newton Method for %%% %...
github
bakerjw/NGAW2_correlations-master
GetInterIntraEventResiduals.m
.m
NGAW2_correlations-master/GetInterIntraEventResiduals.m
5,154
utf_8
bcc8b0d83e83707384860ffbbd8496c8
function Out=GetInterIntraEventResiduals(input) %This class is used to get observed ground motion residuals and %seperate out into inter and intra event terms. There is also the potential %to consider spatial correlation (but not implemented as a Aug 2012) %in the inter and intra event terms %Input variables: ...
github
saadali37/Crowd-Flow-Segmentation-master
compute_watershed.m
.m
Crowd-Flow-Segmentation-master/compute_watershed.m
2,351
utf_8
e306ea8a101291b11be8bd748c479c44
function [seg_mask] = compute_watershed( fLCS, bLCS, optical_flow_folder, frames, pixels_to_remove ) cLCS = abs(fLCS) + abs(bLCS); % cLCS = filter_ftle(fLCS); wat_shed = watershed(cLCS); %%%%First remove small segments -- less than 150 pixels -- -you can pick %%%%your own number clabs = unique(wat_shed(:...
github
Adnan1011/NR-IQA-CNN-master
compute_LCC_SROCC.m
.m
NR-IQA-CNN-master/compute_LCC_SROCC.m
3,886
utf_8
ebda18825025a25088f46b3baefcd567
% Author: Adnan Chaudhry % Date: October 13, 2016 %% Compute LCC and SROCC for the outputs of IQA CNN function compute_LCC_SROCC() clc; clear; % number of trained CNN's being tested nNets = 100; % Create an output file out = fopen('outputs/out.txt', 'wt'); if(out == -1) error('unable to open output file for writ...
github
Adnan1011/NR-IQA-CNN-master
normalizeLocalContrast.m
.m
NR-IQA-CNN-master/Training data preparation scripts/normalizeLocalContrast.m
1,485
utf_8
cc223c89bc5e248b59bee8b374d9f354
% Author: Adnan Chaudhry % Date: September 22, 2016 %% Apply local contrast normalization % imagePatches -- patches of input image % windowSize -- local window size used in the contrast normalization % patchSize -- size of each patch along one dimension (each patch is % assumed to be square) % normalizedPatches -- outp...
github
Adnan1011/NR-IQA-CNN-master
writeScoreData.m
.m
NR-IQA-CNN-master/Training data preparation scripts/writeScoreData.m
829
utf_8
3420324a8d6c00a5121ae7b301a4786c
% Author: Adnan Chaudhry % Date: September 27, 2016 %% Create training and validation data files % Write image and score data to a file % scoresFile -- output file to which data would be written % imageName -- name of the image whose patches are formed % nPatches -- number of patches in the image % scoreValue -- score ...
github
Adnan1011/NR-IQA-CNN-master
visFilterKernels.m
.m
NR-IQA-CNN-master/Training data preparation scripts/visFilterKernels.m
727
utf_8
24199422120170b0f02eede28e619a04
% Author: Adnan Chaudhry % Date: December 14, 2016 %% Visualize image patches % filterKernels -- cell array containing filter kernels function visFilterKernels(filterKernels) % get row and column dimensions of the input cell array [rowDim, colDim] = size(filterKernels); % Show all the kernels as subfigures in one figur...
github
Adnan1011/NR-IQA-CNN-master
calcNumPatches.m
.m
NR-IQA-CNN-master/Training data preparation scripts/calcNumPatches.m
548
utf_8
a49067d7ecc6b81998c932464fe85996
% Author: Adnan Chaudhry % Date: September 27, 2016 %% Calculate the number of patches in an image % image -- is the input RGB image % patchSize -- is the size of the square patches in which the image is to be % divided % nPatches -- number of patches of size (patchSize x patchSize) which could be % formed in that ima...
github
Adnan1011/NR-IQA-CNN-master
getImagePatches.m
.m
NR-IQA-CNN-master/Training data preparation scripts/getImagePatches.m
955
utf_8
7388ea46f5a35a84e77223b1ea652f7c
% Author: Adnan Chaudhry % Date: September 21, 2016 %% Divide image into patches % image -- is the input grayscale image % patchSize -- is the size of the square patches in which the image is to be % divided % patches -- output patches (output of mat2cell) function patches = getImagePatches(image, patchSize) [rows, col...
github
Adnan1011/NR-IQA-CNN-master
saveImagePatches.m
.m
NR-IQA-CNN-master/Training data preparation scripts/saveImagePatches.m
1,000
utf_8
e5d15afdecf96b0ffc14f0dfbd4dc5cb
% Author: Adnan Chaudhry % Date: September 22, 2016 %% Save image patches to disk in bmp format % imagePatches -- input image patches's cell array % outputDir -- output directory where patches are to be saved % imageName -- name of the image file to which the patches belong function saveImagePatches(imagePatches, outpu...
github
Adnan1011/NR-IQA-CNN-master
visImagePatches.m
.m
NR-IQA-CNN-master/Training data preparation scripts/visImagePatches.m
710
utf_8
290c667d5432a23be7e9f6f7c77ccc2c
% Author: Adnan Chaudhry % Date: September 21, 2016 %% Visualize image patches % imagePatches -- cell array containing image patches function visImagePatches(imagePatches) % get row and column dimensions of the input cell array [rowDim, colDim] = size(imagePatches); % Show all the patches as subfigures in one figure pl...
github
Adnan1011/NR-IQA-CNN-master
classification_demo.m
.m
NR-IQA-CNN-master/matlab/demo/classification_demo.m
5,412
utf_8
8f46deabe6cde287c4759f3bc8b7f819
function [scores, maxlabel] = classification_demo(im, use_gpu) % [scores, maxlabel] = classification_demo(im, use_gpu) % % Image classification demo using BVLC CaffeNet. % % IMPORTANT: before you run this demo, you should download BVLC CaffeNet % from Model Zoo (http://caffe.berkeleyvision.org/model_zoo.html) % % *****...
github
hytseng0509/DPE-master
preCal.m
.m
DPE-master/matlab/APE/preCal.m
1,657
utf_8
a9d27f525b1dc8860a41898b9e7242d7
function [marker, img, bounds, steps, dim] = preCal(in_mat, M, I, minDim, minTz, maxTz, delta, verbose) % dimensions of images [hm, wm, ~] = size(M); [hi, wi, ~] = size(I); dim.marker.w = wm; dim.marker.h = hm; dim.img.w = wi; dim.img.h = hi; % intrinsic parameter Sxf = in_mat(1,1); Syf = in_m...
github
hytseng0509/DPE-master
C2Festimate.m
.m
DPE-master/matlab/APE/C2Festimate.m
4,328
utf_8
8ad28c0adc19593316b5f6c2c71085c8
function [ex_mat,newDelta,steps] = C2Festimate(marker, img, in_mat, bounds, steps, dim, epsilon, delta, photometricInvariance, verbose) % get random sample of pixels for computing Ea numPoints = round(10/epsilon^2); xs = randi(dim.marker.w,[1,numPoints]); ys = randi(dim.marker.h,[1,numPoints]); % create...
github
hytseng0509/DPE-master
solver_pfold.m
.m
DPE-master/matlab/OPnP/solver_pfold.m
8,452
utf_8
7d7065489a779da0b7f8153a045b4a11
function [sols,stats] = solver_pfold(C0,settings) if isfield(settings,'debug') == 0; settings.debug = 0; % compute statistics conditioning etc. much slower end if isfield(settings,'nrun') == 0 settings.nrun = 0; % # of run to find best sub-determinants in p-fold integer solver end if isfield(settings,'old_...
github
hytseng0509/DPE-master
Resultant_Solver_DLS.m
.m
DPE-master/matlab/OPnP/Resultant_Solver_DLS.m
36,582
utf_8
31825a36e21ef1797fb94d2c9968c250
function [y z t] = Resultant_Solver_DLS(f1coeff,f2coeff,f3coeff) u = round(randn(4,1) * 100); M2 = cayley_LS_M(f1coeff, f2coeff, f3coeff,u); % construct the multiplication matrix via schur compliment of the Macaulay % matrix Mtilde = M2(1:27,1:27) - M2(1:27,28:120)/M2(28:120,28:120)*M2(28:120,1:27); [V,~] = eig(Mtild...