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
yanweifu/embedding_zero-shot-learning-master
UGM_Sample_Exact.m
.m
embedding_zero-shot-learning-master/internal/L1GeneralExamples/UGM_2011/sample/UGM_Sample_Exact.m
2,224
utf_8
e5830d750168ece6ffdf65930058cbb5
function [samples] = UGM_Sample_Exact(nodePot,edgePot,edgeStruct) % Exact sampling UGM_assert(prod(double(edgeStruct.nStates)) < 50000000,'Brute Force Exact Sampling not recommended for models with > 50 000 000 states'); [nNodes,maxState] = size(nodePot); nEdges = size(edgePot,3); edgeEnds = edgeStruct.edgeEnds; nSta...
github
yanweifu/embedding_zero-shot-learning-master
UGM_Infer_Junction.m
.m
embedding_zero-shot-learning-master/internal/L1GeneralExamples/UGM_2011/infer/UGM_Infer_Junction.m
12,409
utf_8
6c6101251220de098e8703b970216454
function [nodeBel, edgeBel, logZ] = UGM_Infer_Junction(nodePot,edgePot,edgeStruct,ordering) debug = 0; [nNodes,maxState] = size(nodePot); nEdges = size(edgePot,3); edgeEnds = edgeStruct.edgeEnds; V = edgeStruct.V; E = edgeStruct.E; nStates = edgeStruct.nStates; if nargin < 4 ordering = 1:nNodes; end %% Triangul...
github
yanweifu/embedding_zero-shot-learning-master
UGM_Infer_Exact.m
.m
embedding_zero-shot-learning-master/internal/L1GeneralExamples/UGM_2011/infer/UGM_Infer_Exact.m
2,095
utf_8
face628c54a4f9094f2b95b6863da608
function [nodeBel, edgeBel, logZ] = UGM_Infer_Exact(nodePot, edgePot, edgeStruct) % INPUT % nodePot(node,class) % edgePot(class,class,edge) where e is referenced by V,E (must be the same % between feature engine and inference engine) % % OUTPUT % nodeBel(node,class) - marginal beliefs % edgeBel(class,class,e) ...
github
yanweifu/embedding_zero-shot-learning-master
UGM_Infer_TRBP.m
.m
embedding_zero-shot-learning-master/internal/L1GeneralExamples/UGM_2011/infer/UGM_Infer_TRBP.m
4,712
utf_8
e0b193923d055f385f4ffe36e9d2c89f
function [nodeBel, edgeBel, logZ] = UGM_Infer_TRBP(nodePot,edgePot,edgeStruct,mu) if nargin < 4 mu = 1; end [nNodes,maxStates] = size(nodePot); nEdges = size(edgePot,3); if isscalar(mu) % Weights not provided, construct them using one of the methods below % Compute Edge Appearance Probabilities if m...
github
yanweifu/embedding_zero-shot-learning-master
UGM_Infer_LBP.m
.m
embedding_zero-shot-learning-master/internal/L1GeneralExamples/UGM_2011/infer/UGM_Infer_LBP.m
2,797
utf_8
e81d55d1b47194fcec918db398aa06dc
function [nodeBel, edgeBel, logZ] = UGM_Infer_LBP(nodePot,edgePot,edgeStruct) if edgeStruct.useMex [nodeBel,edgeBel,logZ] = UGM_Infer_LBPC(nodePot,edgePot,int32(edgeStruct.edgeEnds),int32(edgeStruct.nStates),int32(edgeStruct.V),int32(edgeStruct.E),edgeStruct.maxIter); else [nodeBel, edgeBel, logZ] = Infer...
github
yanweifu/embedding_zero-shot-learning-master
UGM_Infer_MeanField.m
.m
embedding_zero-shot-learning-master/internal/L1GeneralExamples/UGM_2011/infer/UGM_Infer_MeanField.m
1,935
utf_8
a7d836d74a2666c384348bce3b33ab0f
function [nodeBel, edgeBel, logZ] = UGM_Infer_MF(nodePot,edgePot,edgeStruct) if edgeStruct.useMex [nodeBel,edgeBel,logZ] = UGM_Infer_MFC(nodePot,edgePot,edgeStruct.edgeEnds,edgeStruct.nStates,edgeStruct.V,edgeStruct.E,int32(edgeStruct.maxIter)); else [nodeBel,edgeBel,logZ] = Infer_MF(nodePot,edgePot,edgeStruct...
github
yanweifu/embedding_zero-shot-learning-master
UGM_MFGibbsFreeEnergy.m
.m
embedding_zero-shot-learning-master/internal/L1GeneralExamples/UGM_2011/sub/UGM_MFGibbsFreeEnergy.m
862
utf_8
1b19c7d476859b346a5f98ca9dd1e9f0
function [F] = MFGibbsFreeEnergy(nodePot,edgePot,nodeBel,nStates,edgeEnds,V,E) [nNodes,maxState] = size(nodePot); nEdges = size(edgeEnds,1); threshold = 1e-10; U1 = 0; U2 = 0; S1 = 0; for n = 1:nNodes % Local Mean-Field Average Energy Term b = nodeBel(n,1:nStates(n)); U1 = U1 + sum(b .* ...
github
yanweifu/embedding_zero-shot-learning-master
UGM_TreeBP.m
.m
embedding_zero-shot-learning-master/internal/L1GeneralExamples/UGM_2011/sub/UGM_TreeBP.m
3,036
utf_8
b1e462d283b246a4787e60c0e2801206
function [messages] = UGM_TreeBP(nodePot,edgePot,edgeStruct,maximize) [nNodes,maxState] = size(nodePot); nEdges = size(edgePot,3); edgeEnds = edgeStruct.edgeEnds; nStates = edgeStruct.nStates; V = double(edgeStruct.V); E = edgeStruct.E; % Count number of neighbors nNeighbors = zeros(nNodes,1); for n = 1:nNodes n...
github
yanweifu/embedding_zero-shot-learning-master
UGM_Decode_ICM.m
.m
embedding_zero-shot-learning-master/internal/L1GeneralExamples/UGM_2011/decode/UGM_Decode_ICM.m
1,587
utf_8
790763424978baca5450de6df6cec222
function [y] = UGM_Decode_ICM(nodePot, edgePot, edgeStruct,y) % INPUT % nodePot(node,class) % edgePot(class,class,edge) where e is referenced by V,E (must be the same % between feature engine and inference engine) % % OUTPUT % nodeLabel(node) if nargin < 4 [junk y] = max(nodePot,[],2); end if edgeSt...
github
yanweifu/embedding_zero-shot-learning-master
UGM_Decode_Junction.m
.m
embedding_zero-shot-learning-master/internal/L1GeneralExamples/UGM_2011/decode/UGM_Decode_Junction.m
10,178
utf_8
a45e0c766be3f279e47d366ea5a7fe46
function [yMap] = UGM_Decode_Junction(nodePot, edgePot, edgeStruct, ordering) % INPUT % nodePot(node,class) % edgePot(class,class,edge) where e is referenced by V,E (must be the same % between feature engine and inference engine) % % OUTPUT % nodeLabel(node) debug = 0; [nNodes,maxState] = size(nodePot); ...
github
yanweifu/embedding_zero-shot-learning-master
UGM_Decode_AlphaExpansionBetaShrink.m
.m
embedding_zero-shot-learning-master/internal/L1GeneralExamples/UGM_2011/decode/UGM_Decode_AlphaExpansionBetaShrink.m
4,141
utf_8
34ccfcddae983ec8e5d10336d7434458
function [y] = UGM_Decode_AlphaExpansionBetaShrink(nodePot, edgePot, edgeStruct, decodeFunc, betaSelect, y) % INPUT % nodePot(node,class) % edgePot(class,class,edge) where e is referenced by V,E (must be the same % between feature engine and inference engine) % % OUTPUT % nodeLabel(node) [nNodes,maxStates] =...
github
yanweifu/embedding_zero-shot-learning-master
UGM_Decode_Exact.m
.m
embedding_zero-shot-learning-master/internal/L1GeneralExamples/UGM_2011/decode/UGM_Decode_Exact.m
1,353
utf_8
7377c6644da0e32d4bff47256d89f430
function [nodeLabels] = UGM_Decode_Exact(nodePot, edgePot, edgeStruct) % INPUT % nodePot(node,class) % edgePot(class,class,edge) where e is referenced by V,E (must be the same % between feature engine and inference engine) % % OUTPUT % nodeLabel(node) UGM_assert(prod(double(edgeStruct.nStates)) < 50000000,'B...
github
yanweifu/embedding_zero-shot-learning-master
WolfeLineSearch.m
.m
embedding_zero-shot-learning-master/internal/L1GeneralExamples/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
yanweifu/embedding_zero-shot-learning-master
minFunc_processInputOptions.m
.m
embedding_zero-shot-learning-master/internal/L1GeneralExamples/minFunc_2012/minFunc_processInputOptions.m
4,103
utf_8
8822581c3541eabe5ce7c7927a57c9ab
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
yanweifu/embedding_zero-shot-learning-master
drawGraph.m
.m
embedding_zero-shot-learning-master/internal/L1GeneralExamples/KPM/drawGraph.m
46,847
utf_8
d2429b94526ebcbca9649f90cd0a6b9d
function drawGraph(adj, varargin) % drawGraph Automatic graph layout: interface to Neato (see http://www.graphviz.org/) % % drawGraph(adjMat, ...) draws a graph in a matlab figure % % Optional arguments (string/value pair) [default in brackets] % % labels - labels{i} is a *string* for node i [1:n] % removeSelf...
github
schurterb/convnet-master
evaluate_predictions.m
.m
convnet-master/evaluate_predictions.m
9,751
utf_8
481150b11d6050ce19752c048b47cf0b
function evaluate_predictions(target_file, prediction_file, report_file, description) addpath(genpath('matlab/')); addpath(genpath('matlab/seunglab/')); addpath(genpath('matlab/seunglab/segmentation/')); % initial_thresholds = [0.0:0.2:0.8 0.9:0.005:0.99 0.99:0.001:0.999 0.999:0.0001:0.9999 0.9999:0.0...
github
drdv/bmsd-master
trajC.m
.m
bmsd-master/general_purpose/trajC.m
4,701
utf_8
d481271bffe45849114566bc1370df40
function [P1,dP1] = trajC(x,y,z,t_f,d_time,disp_flag) % % ------------------------------------------------------ % | Basic Multibody Simulator Derived (Matlab toolbox) | % ------------------------------------------------------ % | General purpose | % ------------------- % % trajC % % Generation of Cartesian t...
github
drdv/bmsd-master
Draw_System.m
.m
bmsd-master/general_purpose/Draw_System.m
5,486
utf_8
97699bf0366e3caca6ea0456755f2a6e
function Draw_System(SP, SV, bN, bP, frame, draw_flag) % % ------------------------------------------------------ % | Basic Multibody Simulator Derived (Matlab toolbox) | % ------------------------------------------------------ % | General purpose | % ------------------- % % Draw_System % % Plots the manipula...
github
dingliumath/VFIToolkit-matlab-master
getFredData.m
.m
VFIToolkit-matlab-master/DataEtc/FRED/getFredData.m
7,595
utf_8
5d2f2670a7f65759667e94d92b91b537
function [output] = getFredData(series_id, observation_start, observation_end, units, frequency, aggregation_method, ondate, realtime_end) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % Connects to FRED database and retrieves the data series identified by series_id. % % Examples b...
github
jjmorgan/error-prone-master
passfailStats.m
.m
error-prone-master/ContextTree/passfailStats.m
2,371
utf_8
2b83335e557da39ae70a453bb30443e5
%% Author: Pedro Borges %%% %%%Receives a vector of structure of the type stacks_stats with previous %%% stats, a vector of stacks and if the test was a pass or fail. Returns %%% the updated stacks_stats vector with the correct number of pass and %%% fail tests. %%%Input: %%% stacks_stats: structure containing {on...
github
jjmorgan/error-prone-master
findStack.m
.m
error-prone-master/ContextTree/findStack.m
1,024
utf_8
ea02600c37e0864c0fc733a3ae082b0a
%% Author: Pedro Borges %%%% Searches for the stack in the array of stacks_stats %%%% Retuns the index in the stacks_stats array where it found the stack %%%% Returns 0 if didn't find the stack function [index] = findStack(stack, stacks_stats) index = 0; for i = 1:length(stacks_stats) isequal = cellComp(stack{...
github
jjmorgan/error-prone-master
trimWhites.m
.m
error-prone-master/ContextTree/trimWhites.m
318
utf_8
2b67708be40237bafbf50c17948273c4
%% Author: Pedro Borges %%% Trim any white spaces from a stack_stats array function [stack_stats] = trimWhites(stack_stats) num_stacks = length(stack_stats); for i = 1:num_stacks for j = 1:length(stack_stats(i).stack{1}) stack_stats(i).stack{1}(j) =strtrim( stack_stats(i).stack{1}(j)); end end end
github
jjmorgan/error-prone-master
CumulaCompl.m
.m
error-prone-master/ContextTree/CumulaCompl.m
1,304
utf_8
d8f1fe8ae5bec8676f70ace36813c1c7
%% Author: Pedro Borges function [ cumul_complexity ] = CumulaCompl( stacks_stats, comple_file ) tline = filetoarray(comple_file); [methods_list, remain] = strtok(tline(1:end), ','); complexity_list = strtok(remain, ','); complexity = 0; num_stacks = length(stacks_stats); cumul_complexity = zeros(1, num_stacks) ; len...
github
jjmorgan/error-prone-master
mergeStats.m
.m
error-prone-master/ContextTree/mergeStats.m
876
utf_8
73e73cc6dd85a2650efeac5b8aaa1ca8
%% Author: Pedro Borges %%%% funciton used to merge two stack_stats %%%% Reminder: Pass the smallest stack_stats as the A! function [stack_statsA] = mergeStats(stack_statsA,stack_statsB ) stack_statsA = trimWhites(stack_statsA); stack_statsB = trimWhites(stack_statsB); num_stacksA = length(stack_statsA); num_stacksB ...
github
jjmorgan/error-prone-master
filetoarray.m
.m
error-prone-master/ContextTree/filetoarray.m
139
utf_8
a4b7af5119fd1bd837b8d63c5c879c60
function [tline] = filetoarray(File) fid = fopen(File); tline = textscan(fid,'%s','Delimiter','\n'); tline = tline{1}; fclose(fid); end
github
jjmorgan/error-prone-master
contextTree.m
.m
error-prone-master/ContextTree/contextTree.m
4,241
utf_8
e5e88a3c80b383528ba941cb124d9797
%% Author: Pedro Borges %%%%% Reads Log from file and creates a context tree %%%%% Input: %%%%% File: File containing lines of CALL name and RETURN name %%%%% Ouput: %%%%% tree: Calling Context Tree resulting from the prossecing of the %%%%% file function [ tree_sctr ] = contextTree( File ) tic %%%%% Used whe...
github
jjmorgan/error-prone-master
writeResults.m
.m
error-prone-master/ContextTree/writeResults.m
1,149
utf_8
81557c077dd823d4dc12f07bb845be3f
%% Author: Pedro Borges %%Function Receives the stacks and their respective stats and write them to %%two csv filed. One file contain the stacks. The other file contain their %%stats. The stats are number of passed tests and number of failed tests function [ ] = writeResults(stacks_stats, cumulative_complexity, Tota...
github
jjmorgan/error-prone-master
parse.m
.m
error-prone-master/ContextTree/parse.m
311
utf_8
63672b9036dfe926e746ee3aa59f8ed1
%% Author: Pedro Borges %%% function to parse the text file to take the path off the method. function [CallOrRetunr, method] = parseFile(file) [tline] = filetoarray(file); [CallOrRetunr, remain] = strtok(tline(1:end)); [token1, remain1] = strtok(remain(1:end), '.'); method = strtok(remain1(1:end), '.'); end
github
jjmorgan/error-prone-master
statsMultipleCalls.m
.m
error-prone-master/ContextTree/statsMultipleCalls.m
1,975
utf_8
e7c471c7329697e174d90b363e6b0908
%% Author: Pedro Borges % Receives the directories containing files with output logs for passed % tests and failed tests. Returns each stack annotated with the number of % times it was encounter on a pass and on a fail test. Also returns the % total number of passed tests and te total number of failed tests function [ ...
github
jjmorgan/error-prone-master
stackCall.m
.m
error-prone-master/ContextTree/stackCall.m
1,262
utf_8
dec8993ec39a61f4b6080b491dfaa821
%% Author: Pedro Borges %%%% Uses a tree and forms the stacks of calls from it. %%%% receives a stack, a node and a tree of method calls. Returns all the %%%% resulting stacks. In order to call this function the first time, you %%%% should pass an empty stack element. function [stacks] = stackCall(stack, node, Calltr...
github
xiuxiazhang/cnn_stanford_exercise-master
cnnCost.m
.m
cnn_stanford_exercise-master/cnnCost.m
7,626
utf_8
97b073dbf36d7bab6e68f5f8bfb269a6
function [cost, grad, preds] = cnnCost(theta,images,labels,numClasses,... filterDim,numFilters,poolDim,pred) % Calcualte cost and gradient for a single layer convolutional % neural network followed by a softmax layer with cross entropy % objective. % % Paramet...
github
xiuxiazhang/cnn_stanford_exercise-master
cnnConvolve.m
.m
cnn_stanford_exercise-master/cnnConvolve.m
2,614
utf_8
60618d3f794d913f78f419cb347a8d62
function convolvedFeatures = cnnConvolve(filterDim, numFilters, images, W, b) %cnnConvolve Returns the convolution of the features given by W and b with %the given images % % Parameters: % filterDim - filter (feature) dimension % numFilters - number of feature maps % images - large images to convolve with, matrix in...
github
xiuxiazhang/cnn_stanford_exercise-master
WolfeLineSearch.m
.m
cnn_stanford_exercise-master/common/minFunc_2012/minFunc/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
xiuxiazhang/cnn_stanford_exercise-master
minFunc_processInputOptions.m
.m
cnn_stanford_exercise-master/common/minFunc_2012/minFunc/minFunc_processInputOptions.m
4,103
utf_8
8822581c3541eabe5ce7c7927a57c9ab
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
CCampJr/CRIkit-master
KKHilbert.m
.m
CRIkit-master/MATLAB/KKHilbert.m
4,272
utf_8
a59a5e53e802eccdca05a8680c4799a7
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% %%% KKHilbert - Retrieve real and imaginary components of raw CARS %%% spectrum utilizing a Kramers-Kronig relation. %%% %%% This is a re-implementation of the "modified time-domain %%% Kramers-Kronig transform" (see Refere...
github
CCampJr/CRIkit-master
Hilbert.m
.m
CRIkit-master/MATLAB/Hilbert.m
2,811
utf_8
9f3f730c2f373d8dd02600cb3ff58d62
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% %%% Hilbert - FFT implementation of the Hilbert transform that takes %%% in a signal (or multiple signals in parallel) and outputs an %%% analytic signal(s) based on the Hilbert transform. %%% %%% If you use this software, please ...
github
CCampJr/CRIkit-master
arPLS_baseline_v0.m
.m
CRIkit-master/MATLAB/arPLS_baseline_v0.m
3,048
utf_8
386caaf8eb1d7211b1a97a180655d461
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% %%% arPLS - Asymmetric reweighted penalized least square (arPLS) %%% baseline removal. %%% %%% Compute the baseline_current of signal_input using an asymmetric %%% reweighted penalized least square methods (arPLS) algorith...
github
CCampJr/CRIkit-master
asLS_baseline_v1.m
.m
CRIkit-master/MATLAB/asLS_baseline_v1.m
3,340
utf_8
8b8b740ea8ac62addaae29229467843d
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% %%% asLS - Asymmetric least square (asLS) baseline removal. %%% %%% Compute the baseline_current of signal_input using an asymmetric %%% least square methods (asLS, AsLS, ALS, etc) algorithm %%% designed by P.H. Eilers and...
github
muellerj/mat2dcm-master
make.m
.m
mat2dcm-master/make.m
718
utf_8
fcec0020ddc246631ba8a53040e489b1
function make(option, varargin) %MAKE % % Project specific Makefile for ASD application. Executes common tasks % depending on the context and the `option` passed by parameter: % % make [option] % Add library paths addpath(genpath([rootpath '/lib'])); addpath(genpath([rootpath '/spec'])); if nargin < 1 m...
github
muellerj/mat2dcm-master
mat2dcm.m
.m
mat2dcm-master/lib/mat2dcm.m
9,366
utf_8
8e68a166313e97128f89c669df1098eb
function mat2dcm(matfilename, dcmfilename, varargin) %FUNCTION MAT2DCM % Write a DCM of all variables saved in file MATFILENAME to DCMFILENAME. % Parameters can be adapted to the INCA format, whereby matrices are reshaped % into their transposed dimensions. Usage: % % MAT2DCM(MATFILENAME, DCMFILENAME[, KEY1, VAL1, ......
github
muellerj/mat2dcm-master
run_specs.m
.m
mat2dcm-master/lib/spec/run_specs.m
2,811
utf_8
8f7be41f762bd7e8eb00f127d7f6efc0
function run_specs(varargin) %RUN_SPECS [SEARCHSTR] % % Run all available specs matching SEARCHSTR inside % [rootpath]/spec/* global ASSERTIONS; ASSERTIONS = {}; EXCEPTIONS = {}; if nargin > 0 searchstr = varargin{1}; else searchstr = '.'; end specfiles = collectfiles({}, fullfile(rootpath, '...
github
samstern/Honours-Project-master
rough_work.m
.m
Honours-Project-master/MATLAB/rough_work.m
4,158
utf_8
8fe065a7453d8502fe99fba0d05a32f6
load('children.mat') load('x_data_4_weeks.mat') %% Removing outliers [numhouse_data,numpts]=size(x_data); % number of houses and number of readings for the 28 days x_filtered=zeros(numhouse_data-2,numpts); children_filtered=rand(length(children)-2,1); [numhouse,numpts]=size(x_filtered); j=1; for i=1:numhouse_data ...
github
samstern/Honours-Project-master
sgEvaluate.m
.m
Honours-Project-master/MATLAB/sgEvaluate.m
8,824
utf_8
96c2037f75854b1bf91c135441731136
function sgEvaluate(ord,nom,rf,knn,ordMan,nomMan,rfMan,knnMan,baseline,y_test) %--Accuracy figure; subplot(3,1,1) accuracies=[ord.accuracy,ordMan.accuracy;nom.accuracy,nomMan.accuracy;rf.accuracy,rfMan.accuracy;knn.accuracy,knnMan.accuracy]; labels={'Ordinal LR','Nominal LR','Random Forest','K Nearest Neighbor'}; p1=ba...
github
samstern/Honours-Project-master
cEvaluate.m
.m
Honours-Project-master/MATLAB/cEvaluate.m
2,447
utf_8
1b145a3f7ddc9549fa1113da5b92a71a
function cEvaluate(log_reg,rf,knn,lrMan,rfMan,knnMan,baseline) %--Accuracy accuracies=[log_reg.accuracy,lrMan.accuracy;rf.accuracy,rfMan.accuracy;knn.accuracy,knnMan.accuracy].*100 labels={'Logistic Regression','Random Forest','K Nearest Neighbor'}; p1=bar(accuracies); ylim([0 100]) title('Classifier Accuracy') ylabel...
github
samstern/Honours-Project-master
matlab2tikz.m
.m
Honours-Project-master/MATLAB/matlab2tikz-matlab2tikz-722609f/src/matlab2tikz.m
228,343
utf_8
f02dd0c10aca3bebe50920de57998d36
function matlab2tikz(varargin) %MATLAB2TIKZ Save figure in native LaTeX (TikZ/Pgfplots). % MATLAB2TIKZ() saves the current figure as LaTeX file. % MATLAB2TIKZ comes with several options that can be combined at will. % % MATLAB2TIKZ(FILENAME,...) or MATLAB2TIKZ('filename',FILENAME,...) % stores the LaTeX code...
github
samstern/Honours-Project-master
figure2dot.m
.m
Honours-Project-master/MATLAB/matlab2tikz-matlab2tikz-722609f/src/figure2dot.m
5,034
windows_1250
eb9eb8e933bf48ddec4adb6c9a9d21ba
function figure2dot(filename) %FIGURE2DOT Save figure in Graphviz (.dot) file. % FIGURE2DOT() saves the current figure as dot-file. % % Copyright (c) 2008--2014, Nico Schlömer <nico.schloemer@gmail.com> % All rights reserved. % % Redistribution and use in source and binary forms, with or without % modific...
github
samstern/Honours-Project-master
m2tInputParser.m
.m
Honours-Project-master/MATLAB/matlab2tikz-matlab2tikz-722609f/src/m2tInputParser.m
9,321
windows_1250
cb0bfe25e4baa11d5c8b65d4d6c2c5ca
function parser = m2tInputParser() %MATLAB2TIKZINPUTPARSER Input parsing for matlab2tikz.. % This implementation exists because Octave is lacking one. % Copyright (c) 2008--2014 Nico Schlömer % All rights reserved. % % Redistribution and use in source and binary forms, with or without % modification, are p...
github
samstern/Honours-Project-master
cleanfigure.m
.m
Honours-Project-master/MATLAB/matlab2tikz-matlab2tikz-722609f/src/cleanfigure.m
18,172
windows_1250
efaf9f664d0ee99054078152a52a7d16
function cleanfigure(varargin) % CLEANFIGURE() removes the unnecessary objects from your MATLAB plot % to give you a better experience with matlab2tikz. % CLEANFIGURE comes with several options that can be combined at will. % % CLEANFIGURE('handle',HANDLE,...) explicitly specifies the % handle of the figure t...
github
samstern/Honours-Project-master
m2tUpdater.m
.m
Honours-Project-master/MATLAB/matlab2tikz-matlab2tikz-722609f/src/private/m2tUpdater.m
5,723
windows_1250
8820599196c3d2783f54113d40689aa4
function updater(name, fileExchangeUrl, version, verbose, env) %UPDATER Auto-update matlab2tikz. % Only for internal usage. % Copyright (c) 2012--2014, Nico Schlömer <nico.schloemer@gmail.com> % All rights reserved. % % Redistribution and use in source and binary forms, with or without % modification, are ...
github
samstern/Honours-Project-master
matlab2tikz_acidtest.m
.m
Honours-Project-master/MATLAB/matlab2tikz-matlab2tikz-722609f/test/matlab2tikz_acidtest.m
23,835
windows_1250
b99e57686e7f0c7401938fd1d279cd55
function matlab2tikz_acidtest(varargin) %MATLAB2TIKZ_ACIDTEST unit test driver for matlab2tikz % % MATLAB2TIKZ_ACIDTEST('testFunctionIndices', INDICES, ...) or % MATLAB2TIKZ_ACIDTEST(INDICES, ...) runs the test only for the specified % indices. When empty, all tests are run. (Default: []). % % MATLAB2TIKZ_ACIDTE...
github
samstern/Honours-Project-master
pointReductionTest.m
.m
Honours-Project-master/MATLAB/matlab2tikz-matlab2tikz-722609f/test/pointReductionTest.m
831
utf_8
a7decc0c4e146f9b8c35bd07b8e422d6
% ============================================================================== function pointReductionTest() breakTime = 5.0; testPlots = {@testPlot1, ... }; %@testPlot2}; for testPlot = testPlots testPlot(); 'a' %pause(breakTime); %pointReduction2d(0.1); ...
github
samstern/Honours-Project-master
issues.m
.m
Honours-Project-master/MATLAB/matlab2tikz-matlab2tikz-722609f/test/issues.m
1,177
utf_8
1397f8c26f390cec77480b1be9b15ada
function [ status ] = issues( k ) %ISSUES M2T Test cases related to issues % % Issue-related test cases for matlab2tikz % % See also: ACID, matlab2tikz_acidtest testfunction_handles = { @scatter3Plot3 }; numFunctions = length( testfunction_handles ); if (k<=0)...
github
samstern/Honours-Project-master
ACID.m
.m
Honours-Project-master/MATLAB/matlab2tikz-matlab2tikz-722609f/test/ACID.m
80,044
utf_8
db4705908aefb3969b97d26d311b03c4
% ========================================================================= % *** FUNCTION ACID % *** % *** MATLAB2TikZ ACID test functions % *** % ========================================================================= % *** % *** Copyright (c) 2008--2014, Nico Schlömer <nico.schloemer@gmail.com> % *** All rights re...
github
samstern/Honours-Project-master
codeReport.m
.m
Honours-Project-master/MATLAB/matlab2tikz-matlab2tikz-722609f/test/codeReport.m
9,142
utf_8
ca595b1a0866219fef85a62d65801a55
function [ report ] = codeReport( varargin ) %CODEREPORT Builds a report of the code health % % This function generates a Markdown report on the code health. At the moment % this is limited to the McCabe (cyclomatic) complexity of a function and its % subfunctions. % % This makes use of |checkcode| in MATLAB. % % Usage...
github
samstern/Honours-Project-master
testPatches.m
.m
Honours-Project-master/MATLAB/matlab2tikz-matlab2tikz-722609f/test/testPatches.m
3,833
utf_8
8ef0aa89ea707e858dd91e8842aaeb6c
function status = testPatches(k) % TESTPATCHES Test suite for patches % % See also: ACID, matlab2tikz_acidtest testfunction_handles = { @patch01; @patch02; @patch03; @patch04; @patch05; @patch06; @patch07; @patch08; }; numFunctions = length( testfunction_handles ); if nargin < 1 |...
github
samstern/Honours-Project-master
testSurfshader.m
.m
Honours-Project-master/MATLAB/matlab2tikz-matlab2tikz-722609f/test/testSurfshader.m
3,299
utf_8
e54bba251638b2acfc2051b1f073984a
function status = testSurfshader(k) % TESTSURFSHADER Test suite for Surf/mesh shaders (coloring) % % See also: ACID, matlab2tikz_acidtest testfunction_handles = { @surfShader1; @surfShader2; @surfShader3; @surfShader4; @surfShader5; @surfNoShader; @surfNoPlot; @surfMes...
github
samstern/Honours-Project-master
ATDOW.m
.m
Honours-Project-master/MATLAB/Create Features/ATDOW.m
1,715
utf_8
c1e85877d55f2addefed6f0bc81d71a8
%% Average total usage for each day of the week for each household function [dayAverages] = ATDOW(numhouse,daylength,numpts,x_filtered,children_filtered,social_grade) dayAverages.all = zeros(numhouse,7); for i = 1:numhouse k=1; for j=1:daylength:numpts dayAverages.all(i,k)=dayAverages.a...
github
samstern/Honours-Project-master
APOD.m
.m
Honours-Project-master/MATLAB/Create Features/APOD.m
1,872
utf_8
d424ca7c3dc235f842cdab3fe68ba1b5
function x=APOD(numhouse,x_POD,children_filtered,social_grade) vec_len=28; x.all=zeros(numhouse,vec_len); for i=1:numhouse x.all(i,:)= sumPOD(x_POD(i,:),vec_len); end means=mean(x.all); three_std=3*std(x.all); for i=1:numhouse for j=1:vec_len if x.all(i,...
github
samstern/Honours-Project-master
ADF.m
.m
Honours-Project-master/MATLAB/Create Features/ADF.m
1,177
utf_8
42092cfc44b44efbd39f05d176819788
% Take the fourier transform of each day seperately, then average values % for each day of the week function [fourier_features,fisher_scores] = ADF(numhouse,x,children_filtered) x_ADF=zeros(numhouse,1008); size(x,1); for i=1:numhouse x_temp=zeros(7,144); x_day=fft_day(x(i,:)); day=1;...
github
samstern/Honours-Project-master
ADV.m
.m
Honours-Project-master/MATLAB/Create Features/ADV.m
1,529
utf_8
5257f3fca1980d0b67fed729724f0496
%% Average total varianceeach day of the week for each household function dayStd = ADV(numhouse,daylength,numpts,x_filtered,children_filtered,social_grade) dayStd.all = zeros(numhouse,7); for i = 1:numhouse k=1; for j=1:daylength:numpts dayStd.all(i,k)=dayStd.all(i,k)+var(x_filtered(i,j...
github
samstern/Honours-Project-master
POW_rat.m
.m
Honours-Project-master/MATLAB/Create Features/POW_rat.m
1,552
utf_8
3ee245bff79e17b6b4697564f57ce937
%part of week ratio function x=POW_rat(numhouse,monthSum,dayAverages,children_filtered,social_grade) weeklyAve=monthSum.all/4; for i=1:numhouse pow(i,:)=[sum(dayAverages.all(i,2:5)),dayAverages.all(i,6),dayAverages.all(i,1)]; %x.all(i,:)=[pow(i,:)/weeklyAve(i),pow(i,2)/pow(i,1),pow(i,3)/pow(i,1)...
github
samstern/Honours-Project-master
WC.m
.m
Honours-Project-master/MATLAB/Create Features/WC.m
2,062
utf_8
7aeb5aaa6cf809c9dcef79cb7ab1954f
%Correlation between weekdays function x=WC(numhouse,x_filtered,children_filtered,social_grade) xH=toHours(x_filtered); xW=weeksplits(xH); x.all=calcCor(xW); [x.child,x.noChild]=split_children(numhouse,x,children_filtered); [x.a,x.b,x.c1,x.c2,x.d,x.e]=split_se(numhouse,x,social_grade); end funct...
github
samstern/Honours-Project-master
fourierFeatures.m
.m
Honours-Project-master/MATLAB/Create Features/fourierFeatures.m
1,653
utf_8
ae61622f74d2100fd679aa3b228e9144
function [fourier_features]=fourierFeatures(x,children_filtered,social_grade) x_ft = fft(x')'; numhouse= size(x,1); fisher_scores = fsFisher(x_ft',children_filtered.all); numFeatures=10; fList=fisher_scores.fList(1:numFeatures); fisher_scores.W; fourier_features.all=bestEnergy(x_ft); [fourier_features.child,fourier_fe...
github
samstern/Honours-Project-master
compositeFeatures.m
.m
Honours-Project-master/MATLAB/Create Features/compositeFeatures.m
951
utf_8
f27e9e994ec7e6179957ac0a13ce6488
function x=compositeFeatures(varargin) x.all=[]; x.child=[]; x.noChild=[]; x.e=[]; x.d=[]; x.c2=[]; x.c1=[]; x.b=[]; x.a=[]; for i=1:length(varargin) x.all=[x.all varargin{i}.all]; x.child=[x.child varargin{i}.child]; x.noChild=[x.noChild varargi...
github
samstern/Honours-Project-master
POD.m
.m
Honours-Project-master/MATLAB/Create Features/POD.m
489
utf_8
8ab613c18f958783b7553340871799ea
%% Create part-of-day features function [x_POD,numPOD]=POD(numhouse,x_filtered) i=1; numPOD=111; x=zeros(1,numPOD); x(1)=37; while i < length(x) x(i+1)=x(i)+18; x(i+2)=x(i+1)+36; x(i+3)=x(i+2)+42; x(i+4)=x(i+3)+48; i=i+4; end x_POD=zeros(numhouse,numP...
github
samstern/Honours-Project-master
total_energy.m
.m
Honours-Project-master/MATLAB/Create Features/total_energy.m
1,313
utf_8
c35cd14a8632214147fc8c270d227db0
%% Total energy used each household in 4 week period function [monthSum]=total_energy(numhouse,x_filtered,children_filtered,social_grade) monthSum.all=zeros(numhouse,1); j=1; k=1; monthSum.a=[]; monthSum.b=[]; monthSum.c1=[]; monthSum.c2=[]; monthSum.d=[]; monthSum.e=[]; ...
github
samstern/Honours-Project-master
POD_ATDOW_ratio.m
.m
Honours-Project-master/MATLAB/Create Features/POD_ATDOW_ratio.m
532
utf_8
b9b339a1d29de29b748e4e190d29dc13
%% Part_of_Day/average total daily usage ratio function pod_atd_ratio=POD_ATDOW_ratio(numhouse,x_POD,numPOD,dayAverages) pod_atd_ratio = zeros(size(x_POD)); for i=1:numhouse divNum=1; pod_atd_ratio(i,1:3)=x_POD(i,1:3)/dayAverages(i,divNum); divNum=divNum+1; for j=4:4:numPOD ...
github
samstern/Honours-Project-master
plotTS.m
.m
Honours-Project-master/MATLAB/Plotting/plotTS.m
1,261
utf_8
69f8339722481240f7e48a2b80d13827
function plotTS(x_filtered) load('/Users/samstern/Uni/Honours_Project/MATLAB/data/ts.mat'); ts1.TimeInfo.StartDate = '00-Jan-0000'; ts1.TimeInfo.Units='days'; ts1.Name = 'Energy Used (Wats)'; yMax=30; yMin=0; yRange=[yMin,yMax]; %plot(ts1.getsamples(1:4032)); %clear ts count=1; ax(1)=gca; for j=1:length(ts) ...
github
samstern/Honours-Project-master
plotChildTS.m
.m
Honours-Project-master/MATLAB/Plotting/plotChildTS.m
1,389
utf_8
a3fd1a2a61d18e49771523de647b1193
function plotChildTS(x_filtered,children,arg1,outliers) load('/Users/samstern/Uni/Honours_Project/MATLAB/data/ts.mat'); ts(outliers)=[]; ts1.TimeInfo.StartDate = '00-Jan-0000'; ts1.TimeInfo.Units='days'; ts1.Name = 'Energy Used (Wats)'; yMax=20000; yMin=0; yRange=[yMin,yMax]; figure; %plot(ts1.getsamples(1:4032)); %cle...
github
samstern/Honours-Project-master
plots.m
.m
Honours-Project-master/MATLAB/Plotting/plots.m
945
utf_8
9d3f75f7b0335ab7ae309ec169619605
function out = aveDayBoxplot(dayAveChild,dayAveNoChild) figure; ax1=subplot(1,2,1); boxplot(dayAveChild,'whisker',5) title('children') xlabel('day') ylabel('mean energy use') ax2=subplot(1,2,2); boxplot(dayAveNoChild,'whisker',5) xlabel('day') ylabel('mean energy use') ti...
github
samstern/Honours-Project-master
scatterPlots.m
.m
Honours-Project-master/MATLAB/Plotting/scatterPlots.m
913
utf_8
dac5fbcc557438527c409185041e7458
function scatterPlots(cx,ncx) numpts=size(cx,2); count=1; ax(1)=gca; for i=1:numpts for j=i:numpts ax(count) = axes('position',get(ax(1),'position')); count=count+1; scatter(cx(:,i),cx(:,j)); hold on scatter(ncx(:,i),ncx(:,j)); f = gcf; set(findobj(ax(count-...
github
samstern/Honours-Project-master
importMonthlyData.m
.m
Honours-Project-master/MATLAB/Monthly/importMonthlyData.m
1,115
utf_8
512df49286df07384931074706d8e9fc
function [data] = importMonthlyData(dbConn) selectHouseholds ='show tables'; %get names of each instance householdNames = char(fetch(dbConn,selectHouseholds)); for i =1:length(householdNames) data{i}=importTableData(householdNames(i,:)); end function [data] = importTableData(table) %{ connects to the databa...
github
samstern/Honours-Project-master
socialGradeToInts.m
.m
Honours-Project-master/MATLAB/Socio-Economic/socialGradeToInts.m
581
utf_8
4c703ccca5fb1bba9e5cac484392183b
%Converts Social Grade to integers in order to be used for higherarchial %classification function ints=socialGradeToInts(sg) sg=char(sg); ints = zeros(length(sg),1); for i=1:length(sg) if sg(i)=='E' ints(i,:)=1; elseif sg(i)=='D' ints(i,:)=2; elseif strcmp(sg...
github
samstern/Honours-Project-master
selectFeatures.m
.m
Honours-Project-master/MATLAB/Classification/selectFeatures.m
2,128
utf_8
0376b980dff5c52ff2219f45ef33f03d
%Use sequential feature selection to find the best features to perform %classification function x_opt = selectFeatures(x,y,task,numfeatures,classifier) ys=y.all; xs=x.all; c = cvpartition(y.all,'k',5); opts = statset('display','iter','TolTypeFun','abs'); fun = @(XT,yT,Xt,yt)(sum(~strcmp(yt,classify(...
github
samstern/Honours-Project-master
crossval_run_knn.m
.m
Honours-Project-master/MATLAB/Classification/crossval_run_knn.m
2,247
utf_8
b18ad40250463a09dd48fc5c119ff921
function acc=crossval_run_knn(x_train,y_train,task,k) %cross validation shuffled=shuffle(x_train,y_train); x_shuffled=shuffled.x; y_shuffled=shuffled.y; numFolds=5;%5 fold cross validation splitt=split(x_shuffled,y_shuffled,numFolds); x_split=splitt.x; y_split=splitt.y; accurac...
github
samstern/Honours-Project-master
crossval_run_log_reg.m
.m
Honours-Project-master/MATLAB/Classification/crossval_run_log_reg.m
2,426
utf_8
54fb54e6e669cd6ebf45126871e6f890
function output=crossval_run_log_reg(x_train,y_train,task) %cross validation shuffled=shuffle(x_train,y_train); x_shuffled=shuffled.x; y_shuffled=shuffled.y; k=5;%5 fold cross validation splitt=split(x_shuffled,y_shuffled,k); x_split=splitt.x; y_split=splitt.y; accuracy=zeros(k...
github
samstern/Honours-Project-master
runLogReg.m
.m
Honours-Project-master/MATLAB/Classification/runLogReg.m
2,062
utf_8
2517af94632895b48f6c457d37326422
function log_reg=runLogReg(x_train,x_test,y_train,y_test,task) %k=10; mdl = fitLogReg(x_train,x_test,y_train,task); evaluated = evalLogRed(mdl,x_test,task); log_reg.b =mdl.Coefficients.Estimate; log_reg.yhat =evaluated.yhat; log_reg.score=evaluated.predProb; %log_reg.loss=loss(mdl,x_test,y_test); log_reg.confusion = c...
github
samstern/Honours-Project-master
importMonthlyData.m
.m
Honours-Project-master/MATLAB/Loading from Database/importMonthlyData.m
1,114
utf_8
68f259c0d6ceff7124c54e8c9d65a09d
function [data] = importMonthlyData(dbConn) selectHouseholds ='show tables'; %get names of each instance householdNames = char(fetch(dbConn,selectHouseholds)); for i =1:length(householdNames) data{i}=importTableData(householdNames(i,:)); end function [data] = importTableData(table) %{ connects to the databas...
github
samstern/Honours-Project-master
import4WeekData.m
.m
Honours-Project-master/MATLAB/Loading from Database/import4WeekData.m
1,187
utf_8
1bcd549e1d476e6bd25483ce6565bef4
function [data] = import4WeekData(dbConn) selectHouseholds ='show tables'; %get names of each instance householdNames = char(fetch(dbConn,selectHouseholds)); for i =1:length(householdNames) data{i}=importTableData(householdNames(i,:)); end function [data] = importTableData(table) %{ connects to the database ...
github
samstern/Honours-Project-master
plotMyClassFeatures.m
.m
Honours-Project-master/Sarah's Stuff/PROJECT_SUBMISSION_FOLDER/MATLAB/UG4PROJECT/plotMyClassFeatures.m
1,414
utf_8
54fe1025b04025d0fe4094fab2080c38
%%% Wanting to Plot the class vs features %%%% function plotMyClassFeatures(X,Y,NameOfFeatures) % assuming that I'm using this for 6 classes if length(unique(Y)) == 6 One = find(Y==1); Twos = find(Y==2); Threes = find(Y==3); Fours = find(Y==4); Fives = find(Y...
github
samstern/Honours-Project-master
plotMyClassFeatures.m
.m
Honours-Project-master/Sarah's Stuff/PROJECT_SUBMISSION_FOLDER/MATLAB/UG4PROJECT/SingleRunScripts/plotMyClassFeatures.m
1,414
utf_8
54fe1025b04025d0fe4094fab2080c38
%%% Wanting to Plot the class vs features %%%% function plotMyClassFeatures(X,Y,NameOfFeatures) % assuming that I'm using this for 6 classes if length(unique(Y)) == 6 One = find(Y==1); Twos = find(Y==2); Threes = find(Y==3); Fours = find(Y==4); Fives = find(Y...
github
wangyida/caffe-master
classification_demo.m
.m
caffe-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
jwyang/lfw_face_verification_experiment-master
face_db_align.m
.m
lfw_face_verification_experiment-master/code/face_db_align.m
4,509
utf_8
4426c0a166ad354a4842788735db7a86
function res = face_db_align(face_dir, ffp_dir, ec_mc_y, ec_y, img_size, save_dir) % center of eyes (ec), center of l&r mouth(mc), rotate and resize % ec_mc_y: y_mc-y_ec, diff of height of ec & mc, to scale the image. % ec_y: top of ec, to crop the face. clck = clock(); log_fn = sprintf('fa2_%4d%02d%02d%02d%02d%02d.l...
github
jwyang/lfw_face_verification_experiment-master
evaluate.m
.m
lfw_face_verification_experiment-master/code/+evaluation/evaluate.m
794
utf_8
314cb210d3873a7ed213132bfdb21993
% Copyright (c) 2014, Karen Simonyan % All rights reserved. % This code is made available under the terms of the BSD license (see COPYING file). function result = evaluate(config, scores, gt) scores = reshape(scores, 1, []); switch config case 'ap' [res, extra] = evaluation.ap.ev...
github
jwyang/lfw_face_verification_experiment-master
eval_best.m
.m
lfw_face_verification_experiment-master/code/+evaluation/+accuracy/eval_best.m
760
utf_8
d6b2827fa8c6d71da9202777323361a7
% Copyright (c) 2014, Karen Simonyan % All rights reserved. % This code is made available under the terms of the BSD license (see COPYING file). function [res, extra] = eval_best(config, scores, gt) % finds an optimal threshold - the threshold which maximises the accuracy % threshold scores and get th...
github
jwyang/lfw_face_verification_experiment-master
eval.m
.m
lfw_face_verification_experiment-master/code/+evaluation/+accuracy/eval.m
364
utf_8
4c83bb71f43434ef3a659bc96f38cd50
% Copyright (c) 2014, Karen Simonyan % All rights reserved. % This code is made available under the terms of the BSD license (see COPYING file). function [res, extra] = eval(config, scores, gt) % predicted labels class = 2 * (scores >= config.threshold) - 1; % class-n accuracy res = mean(c...
github
jwyang/lfw_face_verification_experiment-master
eval.m
.m
lfw_face_verification_experiment-master/code/+evaluation/+ap/eval.m
288
utf_8
857d1a2eadc52f2dc2c02c62e5272211
% Copyright (c) 2014, Karen Simonyan % All rights reserved. % This code is made available under the terms of the BSD license (see COPYING file). function [res, extra] = eval(config, scores, gt) [~,~,info] = vl_pr(gt, scores); res = info.auc * 100; extra = info; end
github
jwyang/lfw_face_verification_experiment-master
eval.m
.m
lfw_face_verification_experiment-master/code/+evaluation/+roc/eval.m
415
utf_8
26bc17027058b476501887c08907e512
% Copyright (c) 2014, Karen Simonyan % All rights reserved. % This code is made available under the terms of the BSD license (see COPYING file). function [res, extra] = eval(config, scores, gt) [~,~,info] = vl_roc(gt, scores); % the accuracy at the ROC operating point where the error rates are equ...
github
giannisdoukas/ScientificComputation-master
dif_A.m
.m
ScientificComputation-master/ex3/dif_A.m
379
utf_8
f44903e8179f9c145d9d2ad3c50df1d2
function A = dif_A(n, x_max, x_min) h = (x_max - x_min) / (n+1); a = 2/(h^2) + 1; g = -1/(h^2); b = -1/(h^2) ; A = trid(g, a, b, n); end function A = trid(g, a, b, n) A = zeros(n,n); A(1,1) = a; A(1,2) = b; for j=2:n-1 A(j, j-1) = g; A(j, j) = a; A(j, j...
github
aodn/imos-toolbox-master
batchTesting.m
.m
imos-toolbox-master/batchTesting.m
5,645
utf_8
5dab349c1aeb3306aa2be0fc01932662
function batchTesting(parallel,print_stats) % function batchTesting(parallel) % % Execute all the xunit Test functions % and docstring tests % % Inputs: % % parallel[bool] - true for parallel execution. % print_stats[bool] = true for printing statistics. % % Example: % % % trigger all tests hiding the output % % and ru...
github
aodn/imos-toolbox-master
magneticDeclinationPP.m
.m
imos-toolbox-master/Preprocessing/magneticDeclinationPP.m
12,864
utf_8
33a1b683790c2913c13daf474c1ded38
function sample_data = magneticDeclinationPP( sample_data, qcLevel, auto ) %MAGNETICDECLINATIONPP computes and applies the relevant magnetic % declination correction to the datasets. % % Makes use of the NOAA Geomag software to compute the magnetic declination % at a specific location and time (centre of data time cov...
github
aodn/imos-toolbox-master
sbe43OxygenTransform.m
.m
imos-toolbox-master/Preprocessing/Transform/sbe43OxygenTransform.m
6,333
utf_8
36ffa820f166bb86cc9bbc9cf1814e84
function [data, name, comment, history] = sbe43OxygenTransform( sam, varIdx ) %SBE43OXYGENTRANSFORM Implementation of SBE43 voltage to oxygen concentration %data. % % This function provides an implementation of the oxygen concentration % formula, specified in Seabird Application Note 64: % % http://www.seabird.com/ap...
github
aodn/imos-toolbox-master
startDialog.m
.m
imos-toolbox-master/GUI/startDialog.m
13,508
utf_8
1bc05910faeb089b58242eede981895d
function [fieldTrip dataDir] = startDialog(mode) %STARTDIALOG Displays a dialog prompting the user to select a Field Trip % and a directory which contains raw data files. % % The user is able to choose from a list of field trip IDs, limited by a % date range; the field trips are retrieved from the deployment database...
github
aodn/imos-toolbox-master
executeDDBQuery.m
.m
imos-toolbox-master/DDB/executeDDBQuery.m
5,674
utf_8
97b996b1336a54f9d383119709e181ed
function result = executeDDBQuery( table, field, value) %EXECUTEDDBQUERY Wrapper around Java DDB interface, allowing queries to the %DDB. % % Executes a query against the DDB, of the form: % % select * from table where field = value % % See Java/org/imos/ddb/DDB.java for more information. % % Inputs: % table - The...
github
aodn/imos-toolbox-master
executeCSVQuery.m
.m
imos-toolbox-master/DDB/executeCSVQuery.m
5,004
utf_8
f4e50458398b2acd9f1c27ad1266ddd5
function result = executeCSVQuery( file, field, value) %EXECUTECSVQUERY Alternative to executeDDBQuery, uses CSV files. % % Uses multiple csv files to obtain information equivalent to % executeDDBQuery. % % Inputs: % file - The csv file to query. % % field - Name of field to search for value. If passed in as an ...
github
aodn/imos-toolbox-master
StarmonMiniParse.m
.m
imos-toolbox-master/Parser/StarmonMiniParse.m
16,658
utf_8
6a5e88b399800927d3da2572cd40c072
function sample_data = StarmonMiniParse( filename, mode ) %STARMONMINIPARSE Parses an ASCII file from Starmon Mini .DAT file format % as described in http://imos-toolbox.googlecode.com/svn/wiki/documents/Instruments/Star_ODDI/StarmonT.pdf % % The files consist of two sections: % % - file headerContent - headerContent...
github
aodn/imos-toolbox-master
VemcoParse.m
.m
imos-toolbox-master/Parser/VemcoParse.m
9,377
UNKNOWN
7ac183badb818418736829ca5cfb2deb
function sample_data = VemcoParse( filename, mode ) %VemcoParse Parses a .csv data file from a Vemco Minilog-II-T logger. % % This function is able to read in a .csv data file produced via an export % option of the Vemco Logger Vue software. It reads specific instrument header % format and makes use of a lower level f...
github
aodn/imos-toolbox-master
aquatecParse.m
.m
imos-toolbox-master/Parser/aquatecParse.m
12,807
utf_8
45c177063a212f791fdd4ba551dff6fb
function sample_data = aquatecParse( filename, mode ) %AQUATECPARSE Parses a raw data file retrieved from an Aquatec AQUAlogger. % % Parses a raw data file retrieved from an Aquatec AQUAlogger 520. The % AQUAlogger 520 range of sensors provide logging capability for temperature % and pressure. % (http://www.aquatecgrou...
github
aodn/imos-toolbox-master
echoviewParse.m
.m
imos-toolbox-master/Parser/echoviewParse.m
25,282
utf_8
19acbff9bb8654d0aec9cd5244b30666
function sample_data = echoviewParse( filename, platform, config ) %ECHOVIEWPARSE Parses EchoView results CSV file. % % This is an early draft attempt to parse an echoview results % comma separated variable (CSV) file into a sample_data struct. % % This function is almost a generic CSV Parser. % The list of fields to d...
github
aodn/imos-toolbox-master
readParadoppBinary.m
.m
imos-toolbox-master/Parser/readParadoppBinary.m
97,114
utf_8
4a083c70b3de047a73924530fbe5496f
function structures = readParadoppBinary( filename ) %READPARADOPPBINARY Reads a binary file retrieved from a 'Paradopp' % instrument. Does not support AWAC wave data. % % This function is able to parse raw binary data from any Nortek instrument % which is defined in the Firmware Data Structures section of the Nortek %...