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 | lpuettmann/patent-automat-master | test_rank_tokens.m | .m | patent-automat-master/test/test_rank_tokens.m | 1,815 | utf_8 | 70ff1fc57abfb6815fe0182e78edff10 | function tests = test_rank_tokens
tests = functiontests(localfunctions);
end
function testNormalBigNotEmpty(testCase)
N = 200;
T = 1000;
feat_incidMat = randi([0, 1], N, T);
manAutomat = randi([0, 1], N, 1);
featTok = repmat({'a'}, T, 1);
tokRanking = rank... |
github | lpuettmann/patent-automat-master | test_extract_patent_number.m | .m | patent-automat-master/test/test_extract_patent_number.m | 16,240 | utf_8 | e8aad892ebbbee598afafdadb0b8f883 | function tests = test_extract_patent_number
tests = functiontests(localfunctions);
end
function testPart1Standard(testCase)
ftset.indic_filetype = 1;
search_corpus = {'Lorem ipsum dolor sit amet, justo adipiscing elit.';
'Quisque ac nulla diam. Ut maximus rhoncus aliquet.';
... |
github | lpuettmann/patent-automat-master | test_count_occurences.m | .m | patent-automat-master/test/test_count_occurences.m | 4,989 | utf_8 | 2a92ccb67d1eefc6519132055e5b02f7 | function tests = test_count_occurences
tests = functiontests(localfunctions);
end
function testIndicatorFind(testCase)
file_str = {'Hi this computer is my new test string that I';
'testKeyword';
'will parse for some self-defined keywords';
'that I choos... |
github | lpuettmann/patent-automat-master | test_shorten_cellarray.m | .m | patent-automat-master/test/test_shorten_cellarray.m | 2,206 | utf_8 | d73ff80d02bfb01817f4ebfd6649f724 | function tests = test_shorten_cellarray
tests = functiontests(localfunctions);
end
function test_normalShorten3(testCase)
in_cellarray = {'hi', 'abcdef', '1234567'};
nr_char = 3;
out_cellarray_short = shorten_cellarray(in_cellarray, nr_char);
expected_out = {'hi'; 'abc'; '1... |
github | lpuettmann/patent-automat-master | test_auc.m | .m | patent-automat-master/test/test_auc.m | 879 | utf_8 | 4e93037c414379295dd45e61a614e383 | function tests = testAUC
tests = functiontests(localfunctions);
end
function test1(testCase)
actual = [1; 0; 1; 1];
posterior = [0.32; 0.52; 0.26; 0.86];
score = calculate_auc(actual, posterior);
verifyLessThan(testCase, abs(1/3-score), eps)
end
function test2(testCase)
actual = [1... |
github | lpuettmann/patent-automat-master | test_extract_nested_cellarray.m | .m | patent-automat-master/test/test_extract_nested_cellarray.m | 461 | utf_8 | 1b69cfb291abaa8bd90efacc722e44fb | function tests = test_extract_nested_cellarray
tests = functiontests(localfunctions);
end
function testNormalCase(testCase)
inNestedCellArray = {{'a'}; {'b'}; {'c'}; {'d'}; {'e'}};
allCells = extract_nested_cellarray(inNestedCellArray);
correctCells = {'a'; 'b'; 'c'; 'd'; 'e'};
a... |
github | lpuettmann/patent-automat-master | test_tokenize_string.m | .m | patent-automat-master/test/test_tokenize_string.m | 4,039 | utf_8 | d660398f5f19d2233c9eda3e48ba2867 | function tests = test_tokenize_string
tests = functiontests(localfunctions);
end
function test_normalSnowballCase1(testCase)
inStr = 'automatically';
stop_words = define_stopwords();
tokens = tokenize_string(inStr, 'snowball', stop_words);
expected_out = 'automat';
% + co... |
github | lpuettmann/patent-automat-master | test_calc_post_nb.m | .m | patent-automat-master/test/test_calc_post_nb.m | 1,721 | utf_8 | a022c2148babab47edd624dd13acc2bc | function tests = test_calc_post_nb
tests = functiontests(localfunctions);
end
function testKnownExample_China(testCase)
% See Manning, Raghavan, Schuetze (2008) chapter 13, p.264.
% Check posterior prob. for document to belong to class "china"
prior = 3/4;
cond_prob = [4/5; % Chinese
... |
github | lpuettmann/patent-automat-master | test_get_sic_ocat_automix_data.m | .m | patent-automat-master/test/test_get_sic_ocat_automix_data.m | 1,982 | utf_8 | 12953115f22f505207136a11026542db | function tests = test_get_sic_ocat_automix_data
tests = functiontests(localfunctions);
end
function testNormal1(testCase)
% Create dataset and run it through the function
year_start = 1;
year_end = 2;
art_dataset = [];
art_dataset.sic = repmat( (1:10)', 2, 1);
art_dataset.year = [ones(... |
github | lpuettmann/patent-automat-master | test_strip_patentnr.m | .m | patent-automat-master/test/test_strip_patentnr.m | 2,229 | utf_8 | b67b1f2f17def5f7b399b810103cc695 | function tests = test_strip_patentnr
tests = functiontests(localfunctions);
end
function testNormal(testCase)
patentnr = {'D0435713'; 'D0435713'; 'D0435713'};
ix_year = 1976;
opt2001 = 'txt';
patent_number_cleaned = strip_patentnr(patentnr, ix_year, opt2001);
actSolution = +mi... |
github | lpuettmann/patent-automat-master | test_extract_pat_fileplace.m | .m | patent-automat-master/test/test_extract_pat_fileplace.m | 1,308 | utf_8 | 67c860fafb5a4af0b312609b31ae5831 | function tests = test_extract_pat_fileplace
tests = functiontests(localfunctions);
end
function testNrPatInFile(testCase)
patentnr = 4100602;
indic_year = 1978;
opt2001 = 'txt';
patfplace = extract_pat_fileplace(patentnr, indic_year);
actSolution = patfplace.nr_pat_in_fil... |
github | lpuettmann/patent-automat-master | test_count_nr_patents_trunccorpus.m | .m | patent-automat-master/test/test_count_nr_patents_trunccorpus.m | 3,037 | utf_8 | a4b902978df26acbc82a05fa6208828f | function tests = test_count_nr_patents_trunccorpus
tests = functiontests(localfunctions);
end
function test_1(testCase)
search_corpus = {'Lorem ipsum dolor sit amet, consectetur adipiscing elit.';
'Quisque ac nulla diam. Ut maximus rhoncus aliquet.';
'Donec in risus porttitor,... |
github | lpuettmann/patent-automat-master | test_compile_incidence_matrix.m | .m | patent-automat-master/test/test_compile_incidence_matrix.m | 954 | utf_8 | 1722ea6d68ffa1b4379366a5f20b4ecb | function tests = test_compile_incidence_matrix
tests = functiontests(localfunctions);
end
function testNormalCase1(testCase)
tokenList = {'a'; 'b'; 'c'; 'd'; 'e'};
docTokens = {{'b'; 'd'}; {'d'}; {'e'; 'a'; 'b'; 'c'}};
incidMat = compile_incidence_matrix(tokenList, docTokens);
... |
github | lpuettmann/patent-automat-master | test_check_classnr_uspc.m | .m | patent-automat-master/test/test_check_classnr_uspc.m | 1,403 | utf_8 | a6f66fbcd968136f9a91c13afb758b62 | function tests = test_check_classnr_uspc
tests = functiontests(localfunctions);
end
function testNormalNone(testCase)
inMat = [1;
4;
4;
4;
4;
3];
res = check_classnr_uspc(inMat);
actSolution = +any( res );
expSolu... |
github | lpuettmann/patent-automat-master | test_delete_empty_cells.m | .m | patent-automat-master/test/test_delete_empty_cells.m | 3,325 | utf_8 | 82127c26c503c8a9bdcccee98dcb2999 | function tests = test_delete_empty_cells
tests = functiontests(localfunctions);
end
function testNoEmptyCellStrings(testCase)
cellarray_in = {'Lorem ipsum dolor sit amet, consectetur adipiscing elit.';
'Quisque ac nulla diam. Ut maximus rhoncus aliquet.';
'Donec in risus portt... |
github | lpuettmann/patent-automat-master | test_get_occurstats.m | .m | patent-automat-master/test/test_get_occurstats.m | 1,647 | utf_8 | 116507c6c22635f46ac7ad0729e9685d | function tests = test_get_occurstats
tests = functiontests(localfunctions);
end
function testWorksWithSmallMat(testCase)
incidMat = [1, 0;
0, 1];
uniqueT = {'term1'; 'term2'};
manAutomat = [0; 1];
occurstats = get_occurstats(incidMat, uniqueT, manAutomat);
actSolut... |
github | lpuettmann/patent-automat-master | test_define_stopwords.m | .m | patent-automat-master/test/test_define_stopwords.m | 1,928 | utf_8 | 8747431d92a879e0a0b0fbcb3dd08920 | function tests = test_define_stopwords
tests = functiontests(localfunctions);
end
function testPlausibleNumberNotTooLow(testCase)
stop_words = define_stopwords();
% The plus converts logical to double
actSolution = +( length(stop_words) > 5 );
expSolution = 1;
verif... |
github | lpuettmann/patent-automat-master | test_match_sic2ipc.m | .m | patent-automat-master/test/test_match_sic2ipc.m | 3,792 | utf_8 | af72418a8bde92b48f13d78a6b674ec9 | function tests = test_match_sic2ipc
tests = functiontests(localfunctions);
end
function testNormalLargeExample(testCase)
ipc_concordance = {'a'; 'z'};
ipc_short = {'a'; 'b'; 'c'; 'd'; 'e'; 'f'; 'g'; 'h'; 'i'; 'j'; 'k'};
frac_counts = [1/4; 1; 1; 1; 1; 1/5; 1; 1; 1; 1; 1];
alg1_flatten = [... |
github | lpuettmann/patent-automat-master | test_porterStemmer.m | .m | patent-automat-master/test/test_porterStemmer.m | 1,831 | utf_8 | 8881ab16a0e1628e62e5d647cbe40ce7 | function tests = test_porterStemmer
tests = functiontests(localfunctions);
end
function testNormalCase1(testCase)
inString = 'caresses';
word_stem = porterStemmer(inString);
actSolution = +strcmp(word_stem, 'caress');
expSolution = 1;
verifyEqual(testCase, actSolution, e... |
github | lpuettmann/patent-automat-master | test_strtrim_punctuation.m | .m | patent-automat-master/test/test_strtrim_punctuation.m | 1,153 | utf_8 | f4238c1a9ebc718e997e016411066259 | function tests = test_strtrim_punctuation
tests = functiontests(localfunctions);
end
function testNormalCase(testCase)
inCellArray = {'Hello world.'};
outCellArray = strtrim_punctuation(inCellArray);
actSolution = +strcmp(outCellArray, 'Hello world');
expSolution = 1;
... |
github | lpuettmann/patent-automat-master | test_get_ix_cellarray_str.m | .m | patent-automat-master/test/test_get_ix_cellarray_str.m | 2,806 | utf_8 | 17b3bcff06cef8b8c859e823cbdcc6bb | function tests = test_get_ix_cellarray_str
tests = functiontests(localfunctions);
end
function testNormalCase(testCase)
file_str = {'Lorem ipsum dolor sit amet, consectetur adipiscing elit.';
'Quisque ac nulla diam. Ut maximus rhoncus aliquet.';
'Donec in risus this, convallis... |
github | lpuettmann/patent-automat-master | test_get_indic_exclclassnr.m | .m | patent-automat-master/test/test_get_indic_exclclassnr.m | 1,388 | utf_8 | 7164e3c761e68fbdacc2ee3f6fab4592 | function tests = test_get_indic_exclclassnr
tests = functiontests(localfunctions);
end
function test_normalKnown2Excl(testCase)
exclude_techclass = choose_exclude_techclass();
uspc_nr = { num2str( exclude_techclass(1) ) }; % this should be exluded
actSolution = get_indic_exclclassnr(uspc_nr);
... |
github | lpuettmann/patent-automat-master | test_make_frac_count.m | .m | patent-automat-master/test/test_make_frac_count.m | 871 | utf_8 | 51bdf00940069620cdc80ca130c92dd1 | function tests = test_make_frac_count
tests = functiontests(localfunctions);
end
function test_normal(testCase)
in_cellarray = {{'a'}; {'b'}; {'c'}; {'d'}};
alg1 = [0; 0; 0; 1];
[frac_counts, alg1_flatten] = make_frac_count(in_cellarray, alg1);
actSolution = isequal(frac_count... |
github | lpuettmann/patent-automat-master | test_porterStemmer2.m | .m | patent-automat-master/test/test_porterStemmer2.m | 3,385 | utf_8 | b7738c70ff76565932112e11e4d92725 | function tests = test_porterStemmer2
tests = functiontests(localfunctions);
end
function testNormalCase1(testCase)
inString = 'consign';
word_stem = porterStemmer2(inString);
actSolution = +strcmp(word_stem, 'consign');
expSolution = 1;
verifyEqual(testCase, actSolutio... |
github | lpuettmann/patent-automat-master | test_format_classnr_uspc.m | .m | patent-automat-master/test/test_format_classnr_uspc.m | 2,013 | utf_8 | 44e62a967852ef87a27ac95e5c4b1bf5 | function tests = test_format_classnr_uspc
tests = functiontests(localfunctions);
end
function testNormal(testCase)
classnr_uspc = {'123456'};
actSolution = format_classnr_uspc(classnr_uspc);
expSolution = 123;
verifyEqual(testCase, actSolution, expSolution)
end
function testNormalSpace... |
github | lpuettmann/patent-automat-master | test_calculate_manclass_stats.m | .m | patent-automat-master/test/test_calculate_manclass_stats.m | 4,409 | utf_8 | d184ebd179b960e92694d9d0f0704470 | function tests = test_calculate_manclass_stats
tests = functiontests(localfunctions);
end
function testNrCodpt(testCase)
correctClass = [0; 0; 1; 0; 1; 0; 0; 0; 1; 0; 1; 1; 0; 0];
estimatClass = [0; 0; 1; 0; 0; 0; 0; 1; 0; 0; 1; 1; 0; 0];
alpha = 0.5;
classifstat = calculate_manclass_... |
github | lpuettmann/patent-automat-master | test_count_elements_cell.m | .m | patent-automat-master/test/test_count_elements_cell.m | 1,147 | utf_8 | b787373e94f900950f1ca94e44e91a4f | function tests = test_count_elements_cell
tests = functiontests(localfunctions);
end
function testSimpleCount(testCase)
in_cellarray = {[1];
[4];
[4];
[4];
[4];
[3]};
... |
github | lpuettmann/patent-automat-master | test_get_fullword_matches.m | .m | patent-automat-master/test/test_get_fullword_matches.m | 1,209 | utf_8 | 6a9ef7f7bb284a8628596481356cfc31 | function tests = test_get_fullword_matches
tests = functiontests(localfunctions);
end
function testReturnSurroundingWord(testCase)
patent_text_corpus = {'Lorem ipsum dolor sit amet, consectetur adipiscing elit.';
'Quisque ac nulla diam. Ut maximus rhoncus aliquet.';
'Donec in ... |
github | lpuettmann/patent-automat-master | test_set_weekend.m | .m | patent-automat-master/test/test_set_weekend.m | 1,162 | utf_8 | 14b709dcfefddbe689e50dba5db9962f | function tests = test_setWeekend
tests = functiontests(localfunctions);
end
function test1976Case52Weeks(testCase)
actSolution = set_weekend(1976);
expSolution = 52;
verifyEqual(testCase, actSolution, expSolution)
end
function test1982Case52Weeks(testCase)
actSol... |
github | lpuettmann/patent-automat-master | test_customize_ftset.m | .m | patent-automat-master/test/test_customize_ftset.m | 2,437 | utf_8 | 38afabee8df784bf03ad98f41d2afbd0 | function tests = test_customize_ftset
tests = functiontests(localfunctions);
end
function testIndicFiletype1(testCase)
ftset = customize_ftset(1976);
actSolution = ftset.indic_filetype;
expSolution = 1;
verifyEqual(testCase, actSolution, expSolution)
end
function testIndicFi... |
github | dgreenberg/read_patterned_tifdata-master | read_patterned_tifdata.m | .m | read_patterned_tifdata-master/read_patterned_tifdata.m | 14,785 | utf_8 | a4ee11a34f2c299d89e3fd4d3b486412 | function [y, s] = read_patterned_tifdata(s, frames)
%read_patterned_tifdata
%Read data from a tif file with a repeating structure, by guessing the location of each frame's data.
%This function only works with multipage tifs that have the same amount of data for each image,
%stored in the same way and with the same betw... |
github | JulianFuchs/Image-Compression-Project-master | Decode.m | .m | Image-Compression-Project-master/data/Decode.m | 2,719 | utf_8 | f40d291547605d6e40a749cff0e39397 | % Decodes matrix from custom binary sequence to float matrix
% Enc/Dec R,G,B separately, handles 2D matrices only
function I_dec = Decode(Encoded)
% Read parameters
params = Encoded(1);
params2 = Encoded(2);
expBitsRequired = uint32(0);
fracBits = uint32(0);
nofRows = uint32(0);
nofCols = uint32(0);
newBias = uint32(0... |
github | JulianFuchs/Image-Compression-Project-master | step_by_step_pca.m | .m | Image-Compression-Project-master/data/step_by_step_pca.m | 3,313 | utf_8 | 7166e0ea705943744c6344fd2e2ee484 | function step_by_step_pca()
x = mnd(100,2,[5 5],[5 4;2 2])';
str = '1. Original data';
disp(str)
figure('Name',str,'NumberTitle','off')
scatter(x(1,:),x(2,:));
add_lines();
pause
mu = mean(x,2);
x_bar = x-repmat(mu,1,size(x,2));
str = '2. Center data';
disp(str)
figure('Name',str,'NumberTitle','off')
scatter(x_bar(1... |
github | JulianFuchs/Image-Compression-Project-master | Encode.m | .m | Image-Compression-Project-master/data/Encode.m | 4,009 | utf_8 | dd0d88e68ea4f0d36f3a90c88fbbdf0a | % Encodes matrix in custom binary sequence
% k = number of fraction bits to keep, max 23
% epsilon = if distance to 0 smaller than epsilon -> round to 0
function I_enc = Encode(I,fracBits,epsilon)
% Convert doubles to float
M = single(I);
% Round floats to 0.0 if closer than epsilon
indices = find(abs(M)<epsilon);
M(i... |
github | robotology/icub-basic-demos-master | acquireData.m | .m | icub-basic-demos-master/demoRedBall/app/scripts/acquireData.m | 2,998 | utf_8 | 8f59fafa7d4ce9e5074156814d7e1448 | function [in,out]=acquireData(dataLogFileLeft,dataLogFileRight,dataLogFileHead)
% This function returns the formatted data to learn the network upon.
% The three input files are the ones logged through yarpdatadumper.
% import raw data from log files
dataL=dlmread(dataLogFileLeft);
dataR=dlmread(dataLogFileRight);
dat... |
github | joshterrell805-historic/MachineLearning-Stanford-Coursera-master | cost.m | .m | MachineLearning-Stanford-Coursera-master/cost.m | 487 | utf_8 | a056ca037dc155c0462983960a18215e | % compute the cost of using the hypothesis h(x) = theta1 + theata2*x
% to approximate input.
% theta1: scalar
% theta2: scalr
% input: m x 2 matrix with m 2D data points.
function ret = cost (theta1, theta2, input)
predicted_y = arrayfun(@hypothesis, input(:, 1), theta1, theta2);
squared_differences = (input(:, 2) ... |
github | joshterrell805-historic/MachineLearning-Stanford-Coursera-master | hypothesis.m | .m | MachineLearning-Stanford-Coursera-master/hypothesis.m | 230 | utf_8 | e6918500c04230125398b9366e66063b | % calculate h(x) = theta1 * theta2*x
function ret = hypothesis (x, theta1, theta2)
ret = theta1 + theta2 * x;
endfunction
%!assert(hypothesis (0, 1, -4), 1)
%!assert(hypothesis(1, 1, -4), -3)
%!assert(hypothesis(2, 1, -4), -7)
|
github | joshterrell805-historic/MachineLearning-Stanford-Coursera-master | submit.m | .m | MachineLearning-Stanford-Coursera-master/05-Regularized-Linear-Regression-Bias-and-Variance/ex5/submit.m | 1,765 | utf_8 | b1804fe5854d9744dca981d250eda251 | function submit()
addpath('./lib');
conf.assignmentSlug = 'regularized-linear-regression-and-bias-variance';
conf.itemName = 'Regularized Linear Regression and Bias/Variance';
conf.partArrays = { ...
{ ...
'1', ...
{ 'linearRegCostFunction.m' }, ...
'Regularized Linear Regression Cost Fun... |
github | joshterrell805-historic/MachineLearning-Stanford-Coursera-master | submitWithConfiguration.m | .m | MachineLearning-Stanford-Coursera-master/05-Regularized-Linear-Regression-Bias-and-Variance/ex5/lib/submitWithConfiguration.m | 3,734 | utf_8 | 84d9a81848f6d00a7aff4f79bdbb6049 | function submitWithConfiguration(conf)
addpath('./lib/jsonlab');
parts = parts(conf);
fprintf('== Submitting solutions | %s...\n', conf.itemName);
tokenFile = 'token.mat';
if exist(tokenFile, 'file')
load(tokenFile);
[email token] = promptToken(email, token, tokenFile);
else
[email token] = p... |
github | joshterrell805-historic/MachineLearning-Stanford-Coursera-master | savejson.m | .m | MachineLearning-Stanford-Coursera-master/05-Regularized-Linear-Regression-Bias-and-Variance/ex5/lib/jsonlab/savejson.m | 17,462 | utf_8 | 861b534fc35ffe982b53ca3ca83143bf | function json=savejson(rootname,obj,varargin)
%
% json=savejson(rootname,obj,filename)
% or
% json=savejson(rootname,obj,opt)
% json=savejson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a JSON (JavaScript
% Object Notation) string
%
% author: Qianqian Fa... |
github | joshterrell805-historic/MachineLearning-Stanford-Coursera-master | loadjson.m | .m | MachineLearning-Stanford-Coursera-master/05-Regularized-Linear-Regression-Bias-and-Variance/ex5/lib/jsonlab/loadjson.m | 18,884 | ibm852 | d21f0844f91f2dbb9ea8df00eda346ca | function data = loadjson(fname,varargin)
%
% data=loadjson(fname,opt)
% or
% data=loadjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2011/09/09, including previous works from
%
% ... |
github | joshterrell805-historic/MachineLearning-Stanford-Coursera-master | loadubjson.m | .m | MachineLearning-Stanford-Coursera-master/05-Regularized-Linear-Regression-Bias-and-Variance/ex5/lib/jsonlab/loadubjson.m | 15,574 | utf_8 | 5974e78e71b81b1e0f76123784b951a4 | function data = loadubjson(fname,varargin)
%
% data=loadubjson(fname,opt)
% or
% data=loadubjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2013/08/01
%
% $Id: loadubjson.m 460 2015-01-... |
github | joshterrell805-historic/MachineLearning-Stanford-Coursera-master | saveubjson.m | .m | MachineLearning-Stanford-Coursera-master/05-Regularized-Linear-Regression-Bias-and-Variance/ex5/lib/jsonlab/saveubjson.m | 16,123 | utf_8 | 61d4f51010aedbf97753396f5d2d9ec0 | function json=saveubjson(rootname,obj,varargin)
%
% json=saveubjson(rootname,obj,filename)
% or
% json=saveubjson(rootname,obj,opt)
% json=saveubjson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a Universal
% Binary JSON (UBJSON) binary string
%
% author... |
github | joshterrell805-historic/MachineLearning-Stanford-Coursera-master | submit.m | .m | MachineLearning-Stanford-Coursera-master/02-Logistic-Regression/ex2/submit.m | 1,605 | utf_8 | 9b63d386e9bd7bcca66b1a3d2fa37579 | function submit()
addpath('./lib');
conf.assignmentSlug = 'logistic-regression';
conf.itemName = 'Logistic Regression';
conf.partArrays = { ...
{ ...
'1', ...
{ 'sigmoid.m' }, ...
'Sigmoid Function', ...
}, ...
{ ...
'2', ...
{ 'costFunction.m' }, ...
'Logistic R... |
github | joshterrell805-historic/MachineLearning-Stanford-Coursera-master | submitWithConfiguration.m | .m | MachineLearning-Stanford-Coursera-master/02-Logistic-Regression/ex2/lib/submitWithConfiguration.m | 3,734 | utf_8 | 84d9a81848f6d00a7aff4f79bdbb6049 | function submitWithConfiguration(conf)
addpath('./lib/jsonlab');
parts = parts(conf);
fprintf('== Submitting solutions | %s...\n', conf.itemName);
tokenFile = 'token.mat';
if exist(tokenFile, 'file')
load(tokenFile);
[email token] = promptToken(email, token, tokenFile);
else
[email token] = p... |
github | joshterrell805-historic/MachineLearning-Stanford-Coursera-master | savejson.m | .m | MachineLearning-Stanford-Coursera-master/02-Logistic-Regression/ex2/lib/jsonlab/savejson.m | 17,462 | utf_8 | 861b534fc35ffe982b53ca3ca83143bf | function json=savejson(rootname,obj,varargin)
%
% json=savejson(rootname,obj,filename)
% or
% json=savejson(rootname,obj,opt)
% json=savejson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a JSON (JavaScript
% Object Notation) string
%
% author: Qianqian Fa... |
github | joshterrell805-historic/MachineLearning-Stanford-Coursera-master | loadjson.m | .m | MachineLearning-Stanford-Coursera-master/02-Logistic-Regression/ex2/lib/jsonlab/loadjson.m | 18,732 | ibm852 | ab98cf173af2d50bbe8da4d6db252a20 | function data = loadjson(fname,varargin)
%
% data=loadjson(fname,opt)
% or
% data=loadjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2011/09/09, including previous works from
%
% ... |
github | joshterrell805-historic/MachineLearning-Stanford-Coursera-master | loadubjson.m | .m | MachineLearning-Stanford-Coursera-master/02-Logistic-Regression/ex2/lib/jsonlab/loadubjson.m | 15,574 | utf_8 | 5974e78e71b81b1e0f76123784b951a4 | function data = loadubjson(fname,varargin)
%
% data=loadubjson(fname,opt)
% or
% data=loadubjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2013/08/01
%
% $Id: loadubjson.m 460 2015-01-... |
github | joshterrell805-historic/MachineLearning-Stanford-Coursera-master | saveubjson.m | .m | MachineLearning-Stanford-Coursera-master/02-Logistic-Regression/ex2/lib/jsonlab/saveubjson.m | 16,123 | utf_8 | 61d4f51010aedbf97753396f5d2d9ec0 | function json=saveubjson(rootname,obj,varargin)
%
% json=saveubjson(rootname,obj,filename)
% or
% json=saveubjson(rootname,obj,opt)
% json=saveubjson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a Universal
% Binary JSON (UBJSON) binary string
%
% author... |
github | joshterrell805-historic/MachineLearning-Stanford-Coursera-master | submit.m | .m | MachineLearning-Stanford-Coursera-master/03-Neural-Networks/ex3/submit.m | 1,567 | utf_8 | 1dba733a05282b2db9f2284548483b81 | function submit()
addpath('./lib');
conf.assignmentSlug = 'multi-class-classification-and-neural-networks';
conf.itemName = 'Multi-class Classification and Neural Networks';
conf.partArrays = { ...
{ ...
'1', ...
{ 'lrCostFunction.m' }, ...
'Regularized Logistic Regression', ...
}, ..... |
github | joshterrell805-historic/MachineLearning-Stanford-Coursera-master | submitWithConfiguration.m | .m | MachineLearning-Stanford-Coursera-master/03-Neural-Networks/ex3/lib/submitWithConfiguration.m | 3,734 | utf_8 | 84d9a81848f6d00a7aff4f79bdbb6049 | function submitWithConfiguration(conf)
addpath('./lib/jsonlab');
parts = parts(conf);
fprintf('== Submitting solutions | %s...\n', conf.itemName);
tokenFile = 'token.mat';
if exist(tokenFile, 'file')
load(tokenFile);
[email token] = promptToken(email, token, tokenFile);
else
[email token] = p... |
github | joshterrell805-historic/MachineLearning-Stanford-Coursera-master | savejson.m | .m | MachineLearning-Stanford-Coursera-master/03-Neural-Networks/ex3/lib/jsonlab/savejson.m | 17,462 | utf_8 | 861b534fc35ffe982b53ca3ca83143bf | function json=savejson(rootname,obj,varargin)
%
% json=savejson(rootname,obj,filename)
% or
% json=savejson(rootname,obj,opt)
% json=savejson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a JSON (JavaScript
% Object Notation) string
%
% author: Qianqian Fa... |
github | joshterrell805-historic/MachineLearning-Stanford-Coursera-master | loadjson.m | .m | MachineLearning-Stanford-Coursera-master/03-Neural-Networks/ex3/lib/jsonlab/loadjson.m | 18,732 | ibm852 | ab98cf173af2d50bbe8da4d6db252a20 | function data = loadjson(fname,varargin)
%
% data=loadjson(fname,opt)
% or
% data=loadjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2011/09/09, including previous works from
%
% ... |
github | joshterrell805-historic/MachineLearning-Stanford-Coursera-master | loadubjson.m | .m | MachineLearning-Stanford-Coursera-master/03-Neural-Networks/ex3/lib/jsonlab/loadubjson.m | 15,574 | utf_8 | 5974e78e71b81b1e0f76123784b951a4 | function data = loadubjson(fname,varargin)
%
% data=loadubjson(fname,opt)
% or
% data=loadubjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2013/08/01
%
% $Id: loadubjson.m 460 2015-01-... |
github | joshterrell805-historic/MachineLearning-Stanford-Coursera-master | saveubjson.m | .m | MachineLearning-Stanford-Coursera-master/03-Neural-Networks/ex3/lib/jsonlab/saveubjson.m | 16,123 | utf_8 | 61d4f51010aedbf97753396f5d2d9ec0 | function json=saveubjson(rootname,obj,varargin)
%
% json=saveubjson(rootname,obj,filename)
% or
% json=saveubjson(rootname,obj,opt)
% json=saveubjson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a Universal
% Binary JSON (UBJSON) binary string
%
% author... |
github | joshterrell805-historic/MachineLearning-Stanford-Coursera-master | loadjson.m | .m | MachineLearning-Stanford-Coursera-master/ML_Octave_400_patch/lib/jsonlab/loadjson.m | 18,884 | ibm852 | d21f0844f91f2dbb9ea8df00eda346ca | function data = loadjson(fname,varargin)
%
% data=loadjson(fname,opt)
% or
% data=loadjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2011/09/09, including previous works from
%
% ... |
github | joshterrell805-historic/MachineLearning-Stanford-Coursera-master | submit.m | .m | MachineLearning-Stanford-Coursera-master/06-Support-Vector-Machines/ex6/submit.m | 1,318 | utf_8 | bfa0b4ffb8a7854d8e84276e91818107 | function submit()
addpath('./lib');
conf.assignmentSlug = 'support-vector-machines';
conf.itemName = 'Support Vector Machines';
conf.partArrays = { ...
{ ...
'1', ...
{ 'gaussianKernel.m' }, ...
'Gaussian Kernel', ...
}, ...
{ ...
'2', ...
{ 'dataset3Params.m' }, ...
... |
github | joshterrell805-historic/MachineLearning-Stanford-Coursera-master | porterStemmer.m | .m | MachineLearning-Stanford-Coursera-master/06-Support-Vector-Machines/ex6/porterStemmer.m | 9,902 | utf_8 | 7ed5acd925808fde342fc72bd62ebc4d | function stem = porterStemmer(inString)
% Applies the Porter Stemming algorithm as presented in the following
% paper:
% Porter, 1980, An algorithm for suffix stripping, Program, Vol. 14,
% no. 3, pp 130-137
% Original code modeled after the C version provided at:
% http://www.tartarus.org/~martin/PorterStemmer/c.tx... |
github | joshterrell805-historic/MachineLearning-Stanford-Coursera-master | submitWithConfiguration.m | .m | MachineLearning-Stanford-Coursera-master/06-Support-Vector-Machines/ex6/lib/submitWithConfiguration.m | 3,734 | utf_8 | 84d9a81848f6d00a7aff4f79bdbb6049 | function submitWithConfiguration(conf)
addpath('./lib/jsonlab');
parts = parts(conf);
fprintf('== Submitting solutions | %s...\n', conf.itemName);
tokenFile = 'token.mat';
if exist(tokenFile, 'file')
load(tokenFile);
[email token] = promptToken(email, token, tokenFile);
else
[email token] = p... |
github | joshterrell805-historic/MachineLearning-Stanford-Coursera-master | savejson.m | .m | MachineLearning-Stanford-Coursera-master/06-Support-Vector-Machines/ex6/lib/jsonlab/savejson.m | 17,462 | utf_8 | 861b534fc35ffe982b53ca3ca83143bf | function json=savejson(rootname,obj,varargin)
%
% json=savejson(rootname,obj,filename)
% or
% json=savejson(rootname,obj,opt)
% json=savejson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a JSON (JavaScript
% Object Notation) string
%
% author: Qianqian Fa... |
github | joshterrell805-historic/MachineLearning-Stanford-Coursera-master | loadjson.m | .m | MachineLearning-Stanford-Coursera-master/06-Support-Vector-Machines/ex6/lib/jsonlab/loadjson.m | 18,884 | ibm852 | d21f0844f91f2dbb9ea8df00eda346ca | function data = loadjson(fname,varargin)
%
% data=loadjson(fname,opt)
% or
% data=loadjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2011/09/09, including previous works from
%
% ... |
github | joshterrell805-historic/MachineLearning-Stanford-Coursera-master | loadubjson.m | .m | MachineLearning-Stanford-Coursera-master/06-Support-Vector-Machines/ex6/lib/jsonlab/loadubjson.m | 15,574 | utf_8 | 5974e78e71b81b1e0f76123784b951a4 | function data = loadubjson(fname,varargin)
%
% data=loadubjson(fname,opt)
% or
% data=loadubjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2013/08/01
%
% $Id: loadubjson.m 460 2015-01-... |
github | joshterrell805-historic/MachineLearning-Stanford-Coursera-master | saveubjson.m | .m | MachineLearning-Stanford-Coursera-master/06-Support-Vector-Machines/ex6/lib/jsonlab/saveubjson.m | 16,123 | utf_8 | 61d4f51010aedbf97753396f5d2d9ec0 | function json=saveubjson(rootname,obj,varargin)
%
% json=saveubjson(rootname,obj,filename)
% or
% json=saveubjson(rootname,obj,opt)
% json=saveubjson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a Universal
% Binary JSON (UBJSON) binary string
%
% author... |
github | joshterrell805-historic/MachineLearning-Stanford-Coursera-master | submit.m | .m | MachineLearning-Stanford-Coursera-master/01-Lineaer-Regression/ex1/submit.m | 1,876 | utf_8 | 8d1c467b830a89c187c05b121cb8fbfd | function submit()
addpath('./lib');
conf.assignmentSlug = 'linear-regression';
conf.itemName = 'Linear Regression with Multiple Variables';
conf.partArrays = { ...
{ ...
'1', ...
{ 'warmUpExercise.m' }, ...
'Warm-up Exercise', ...
}, ...
{ ...
'2', ...
{ 'computeCost.m... |
github | joshterrell805-historic/MachineLearning-Stanford-Coursera-master | submitWithConfiguration.m | .m | MachineLearning-Stanford-Coursera-master/01-Lineaer-Regression/ex1/lib/submitWithConfiguration.m | 3,734 | utf_8 | 84d9a81848f6d00a7aff4f79bdbb6049 | function submitWithConfiguration(conf)
addpath('./lib/jsonlab');
parts = parts(conf);
fprintf('== Submitting solutions | %s...\n', conf.itemName);
tokenFile = 'token.mat';
if exist(tokenFile, 'file')
load(tokenFile);
[email token] = promptToken(email, token, tokenFile);
else
[email token] = p... |
github | joshterrell805-historic/MachineLearning-Stanford-Coursera-master | savejson.m | .m | MachineLearning-Stanford-Coursera-master/01-Lineaer-Regression/ex1/lib/jsonlab/savejson.m | 17,462 | utf_8 | 861b534fc35ffe982b53ca3ca83143bf | function json=savejson(rootname,obj,varargin)
%
% json=savejson(rootname,obj,filename)
% or
% json=savejson(rootname,obj,opt)
% json=savejson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a JSON (JavaScript
% Object Notation) string
%
% author: Qianqian Fa... |
github | joshterrell805-historic/MachineLearning-Stanford-Coursera-master | loadjson.m | .m | MachineLearning-Stanford-Coursera-master/01-Lineaer-Regression/ex1/lib/jsonlab/loadjson.m | 18,732 | ibm852 | ab98cf173af2d50bbe8da4d6db252a20 | function data = loadjson(fname,varargin)
%
% data=loadjson(fname,opt)
% or
% data=loadjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2011/09/09, including previous works from
%
% ... |
github | joshterrell805-historic/MachineLearning-Stanford-Coursera-master | loadubjson.m | .m | MachineLearning-Stanford-Coursera-master/01-Lineaer-Regression/ex1/lib/jsonlab/loadubjson.m | 15,574 | utf_8 | 5974e78e71b81b1e0f76123784b951a4 | function data = loadubjson(fname,varargin)
%
% data=loadubjson(fname,opt)
% or
% data=loadubjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2013/08/01
%
% $Id: loadubjson.m 460 2015-01-... |
github | joshterrell805-historic/MachineLearning-Stanford-Coursera-master | saveubjson.m | .m | MachineLearning-Stanford-Coursera-master/01-Lineaer-Regression/ex1/lib/jsonlab/saveubjson.m | 16,123 | utf_8 | 61d4f51010aedbf97753396f5d2d9ec0 | function json=saveubjson(rootname,obj,varargin)
%
% json=saveubjson(rootname,obj,filename)
% or
% json=saveubjson(rootname,obj,opt)
% json=saveubjson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a Universal
% Binary JSON (UBJSON) binary string
%
% author... |
github | joshterrell805-historic/MachineLearning-Stanford-Coursera-master | submit.m | .m | MachineLearning-Stanford-Coursera-master/04-Neural-Networks/ex4/submit.m | 1,635 | utf_8 | ae9c236c78f9b5b09db8fbc2052990fc | function submit()
addpath('./lib');
conf.assignmentSlug = 'neural-network-learning';
conf.itemName = 'Neural Networks Learning';
conf.partArrays = { ...
{ ...
'1', ...
{ 'nnCostFunction.m' }, ...
'Feedforward and Cost Function', ...
}, ...
{ ...
'2', ...
{ 'nnCostFunct... |
github | joshterrell805-historic/MachineLearning-Stanford-Coursera-master | submitWithConfiguration.m | .m | MachineLearning-Stanford-Coursera-master/04-Neural-Networks/ex4/lib/submitWithConfiguration.m | 3,734 | utf_8 | 84d9a81848f6d00a7aff4f79bdbb6049 | function submitWithConfiguration(conf)
addpath('./lib/jsonlab');
parts = parts(conf);
fprintf('== Submitting solutions | %s...\n', conf.itemName);
tokenFile = 'token.mat';
if exist(tokenFile, 'file')
load(tokenFile);
[email token] = promptToken(email, token, tokenFile);
else
[email token] = p... |
github | joshterrell805-historic/MachineLearning-Stanford-Coursera-master | savejson.m | .m | MachineLearning-Stanford-Coursera-master/04-Neural-Networks/ex4/lib/jsonlab/savejson.m | 17,462 | utf_8 | 861b534fc35ffe982b53ca3ca83143bf | function json=savejson(rootname,obj,varargin)
%
% json=savejson(rootname,obj,filename)
% or
% json=savejson(rootname,obj,opt)
% json=savejson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a JSON (JavaScript
% Object Notation) string
%
% author: Qianqian Fa... |
github | joshterrell805-historic/MachineLearning-Stanford-Coursera-master | loadjson.m | .m | MachineLearning-Stanford-Coursera-master/04-Neural-Networks/ex4/lib/jsonlab/loadjson.m | 18,732 | ibm852 | ab98cf173af2d50bbe8da4d6db252a20 | function data = loadjson(fname,varargin)
%
% data=loadjson(fname,opt)
% or
% data=loadjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2011/09/09, including previous works from
%
% ... |
github | joshterrell805-historic/MachineLearning-Stanford-Coursera-master | loadubjson.m | .m | MachineLearning-Stanford-Coursera-master/04-Neural-Networks/ex4/lib/jsonlab/loadubjson.m | 15,574 | utf_8 | 5974e78e71b81b1e0f76123784b951a4 | function data = loadubjson(fname,varargin)
%
% data=loadubjson(fname,opt)
% or
% data=loadubjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2013/08/01
%
% $Id: loadubjson.m 460 2015-01-... |
github | joshterrell805-historic/MachineLearning-Stanford-Coursera-master | saveubjson.m | .m | MachineLearning-Stanford-Coursera-master/04-Neural-Networks/ex4/lib/jsonlab/saveubjson.m | 16,123 | utf_8 | 61d4f51010aedbf97753396f5d2d9ec0 | function json=saveubjson(rootname,obj,varargin)
%
% json=saveubjson(rootname,obj,filename)
% or
% json=saveubjson(rootname,obj,opt)
% json=saveubjson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a Universal
% Binary JSON (UBJSON) binary string
%
% author... |
github | Parrot-Developers/ardupilot-master | RotToQuat.m | .m | ardupilot-master/libraries/AP_NavEKF/Models/Common/RotToQuat.m | 288 | utf_8 | 9239706354267c8f5f2a29f992c07de9 | % convert froma rotation vector in radians to a quaternion
function quaternion = RotToQuat(rotVec)
vecLength = sqrt(rotVec(1)^2 + rotVec(2)^2 + rotVec(3)^2);
if vecLength < 1e-6
quaternion = [1;0;0;0];
else
quaternion = [cos(0.5*vecLength); rotVec/vecLength*sin(0.5*vecLength)];
end |
github | Parrot-Developers/ardupilot-master | NormQuat.m | .m | ardupilot-master/libraries/AP_NavEKF/Models/Common/NormQuat.m | 198 | utf_8 | ed913e87efc9194a2c52b266fced8da7 | % normalise the quaternion
function quaternion = normQuat(quaternion)
quatMag = sqrt(quaternion(1)^2 + quaternion(2)^2 + quaternion(3)^2 + quaternion(4)^2);
quaternion(1:4) = quaternion / quatMag;
|
github | Parrot-Developers/ardupilot-master | QuatToEul.m | .m | ardupilot-master/libraries/AP_NavEKF/Models/Common/QuatToEul.m | 436 | utf_8 | c19c9235052d99b8b943a7157e83fc94 | % Convert from a quaternion to a 321 Euler rotation sequence in radians
function Euler = QuatToEul(quat)
Euler = zeros(3,1);
Euler(1) = atan2(2*(quat(3)*quat(4)+quat(1)*quat(2)), quat(1)*quat(1) - quat(2)*quat(2) - quat(3)*quat(3) + quat(4)*quat(4));
Euler(2) = -asin(2*(quat(2)*quat(4)-quat(1)*quat(3)));
Euler(3) =... |
github | Laureex/Stochastic-Processes-master | funJn.m | .m | Stochastic-Processes-master/funJn.m | 2,793 | ibm852 | 475a03d582beb4f3b856fb07cd2a4323 | % funJn calculates and returns the In integral (eq (15) in [1])
% Jn=funJn(Tn,betaConst,n,numbMC)
% Jn is the J_{n,\beta} integral (scalar) value
% T_n is the n-based SINR threshold value (eq (17) in [1])
% betaConstant is path-loss exponent
% n is integer parameter
% betaConst, n, and numbMC are scalars. T_n can be a ... |
github | Laureex/Stochastic-Processes-master | funProbCovFade.m | .m | Stochastic-Processes-master/funProbCovFade.m | 1,706 | ibm852 | a69ff665c7b7fad6cf49de8a30d87301 | % funProbCovFade calculates and returns SINR-based coverage probability under Rayleigh
% fading model (given by equation (24) in [1]) and log-normal shadowing
% CovPFade=funProbCovFade(tValues,betaConst,x)
% CovPFade is the 1-coverage probability
% tValues are the SINR threshold values. tValues can be a vector
% betaCo... |
github | Laureex/Stochastic-Processes-master | funIn.m | .m | Stochastic-Processes-master/funIn.m | 2,280 | ibm852 | b4a3c9f9e2cc0b50bf16da5737e83593 | % funIn calcualtes and returns the In integral (eq (12) in [1])
% In=funIn(betaConst,n,x)
% In = I_{n,\beta} integral (scalar) value
% betaConstant = path-loss exponent
% n = integer parameter
% x = variable that incorporates model parameters
% That is, x=W*a^(-2/betaConst) where a is given by eq (6) in [1]
% betaConst... |
github | Laureex/Stochastic-Processes-master | funSimLogNormProbCov.m | .m | Stochastic-Processes-master/funSimLogNormProbCov.m | 2,278 | ibm852 | fb7cb1ce1fc651aa5e6cd0d5c24fb0a0 |
% funSimLogNormProbCov returns SINR-based k-coverage probability
% under log-normal shadowing based on repeated simulations of
% of model outlined in [1]
%
% simPCovk=funSimLogNormProbCov(tValues,betaConst,K,lambda,sigma,W,diskRadius,simNumb,k)
% simPCovk is the k-coverage probability
% tValues are the SINR threshold... |
github | Laureex/Stochastic-Processes-master | funSimLogNormProbCovFade.m | .m | Stochastic-Processes-master/funSimLogNormProbCovFade.m | 2,452 | ibm852 | 35047c0ef457e6be2bb0a0c684243711 | % funSimLogNormProbCovFade returns SINR-based k-coverage probability
% under Rayleigh (mean one) fading model and log-normal shadowing based on
% repeated simulations of of model outlined in [1]
%
% simPCovFade=funSimLogNormProbCovFade(tValues,betaConst,K,lambda,sigma,W,diskRadius,simNumb)
% simPCovFade is the 1-covera... |
github | Laureex/Stochastic-Processes-master | funProbCov.m | .m | Stochastic-Processes-master/funProbCov.m | 1,342 | ibm852 | 39fc62550114047273a6378bfc7cdc13 | % funProbCov calculates and returns SINR-based coverage probability
% under arbtirary shadowing
% PCov=funProbCov(tValues,betaConst,x,numbMC,k)
% CovP is the 1-coverage probability
% tValues are the SINR threshold values. tValues can be a vector
% betaConst is the pathloss exponent.
% x is the input variable that incor... |
github | klho/klho.github.io-master | fft_freq.m | .m | klho.github.io-master/teaching/nyu/g23.1502/2011-spring/docs/matlab/fft_freq.m | 774 | utf_8 | 601f4653fae592effe9ea4e84d3d9e33 | %FFT_FREQ Compute a FFT restricted to non-negative frequencies and return
% the frequencies associated with each Fourier component.
%
% X = FFT_FREQ(X,T,DT) returns the discrete Fourier transform of X
% sampled over the time interval T in time increments of DT, restricted
% to non-negative frequenc... |
github | peiswang/caffe4video-master | prepare_batch.m | .m | caffe4video-master/matlab/caffe/prepare_batch.m | 1,298 | utf_8 | 68088231982895c248aef25b4886eab0 | % ------------------------------------------------------------------------
function images = prepare_batch(image_files,IMAGE_MEAN,batch_size)
% ------------------------------------------------------------------------
if nargin < 2
d = load('ilsvrc_2012_mean');
IMAGE_MEAN = d.image_mean;
end
num_images = length... |
github | peiswang/caffe4video-master | matcaffe_demo.m | .m | caffe4video-master/matlab/caffe/matcaffe_demo.m | 3,344 | utf_8 | 669622769508a684210d164ac749a614 | function [scores, maxlabel] = matcaffe_demo(im, use_gpu)
% scores = matcaffe_demo(im, use_gpu)
%
% Demo of the matlab wrapper using the ILSVRC network.
%
% input
% im color image as uint8 HxWx3
% use_gpu 1 to use the GPU, 0 to use the CPU
%
% output
% scores 1000-dimensional ILSVRC score vector
%
% You m... |
github | abnering/digital_-image_processing-master | lpfilter.m | .m | digital_-image_processing-master/实验6/matlab代码及素材/lpfilter.m | 535 | utf_8 | cbde7c0fd5064ac43b133f35424cd220 | function [H, D] = lpfilter(type,M,N,D0,n)
[U V] = dftuv(M,N);
D = sqrt(U.^2 + V.^2);
switch type
case 'ideal'
H = double(D <= D0);
case 'btw'
if nargin == 4
n = 1;
end
H = 1./(1 + (D./D0).^(2*n));
case 'guassian'
H = exp(-(D.^2)./(2*(D0^2... |
github | ornithos/lpsvm-master | solveLPActiveAB3.m | .m | lpsvm-master/solveLPActiveAB3.m | 10,436 | utf_8 | ef0fc9ed5dc80ea17ee48a1fe009b7c6 | function[out, exitflag, primal, time] = ...
solveLPActiveAB3(H, D, options, wrm_strt, NN, ass, dbg, verbose)
% SOLVELPACTIVEAB Solve LP with active set strategy
%
% --- v3 Branches directly from v1. Spits out more granular timing used in
% report. Also solves primal direct... |
github | ornithos/lpsvm-master | kernelCache.m | .m | lpsvm-master/kernelCache.m | 997 | utf_8 | 55f63440fa21ca1d4ac0cb92b0d47e29 | function [ out ] = kernelCache( op, rowpos, row )
persistent cache cacheSize;
% clear functions (To clear the cache)
if(op == -1)
cacheSize = 55933;
cache = cell(1, cacheSize);
out = true;
return
end
% Create cache if none
if isempty(cache) %
cacheSize = 55933;
% cacheSize = 26893;
cac... |
github | ornithos/lpsvm-master | evalModel.m | .m | lpsvm-master/evalModel.m | 458 | utf_8 | 16b3bce1aa72afd230cda1a47958792b | function [ out ] = evalModel( X, model, a, kernel)
[~, N] = size(X);
nModels = length(model);
H = zeros(nModels, N);
for i=1:nModels, % one row per model
H(i,:) = modelOut(X, model{i}, kernel);
end
out = a'*H;
end
function out = modelOut(X, model, kernel)
[~, N] = s... |
github | ornithos/lpsvm-master | modelMatrix.m | .m | lpsvm-master/modelMatrix.m | 492 | utf_8 | e518855c8bf7c1df8c98c225809f51a6 | function [ H ] = initModelMatrix(X, y, model, kernel, H)
nModels = length(model);
for i=1:nModels, % one row per model
H(i,:) = y .* modelOut(X, model{i}, kernel);
end
end
function out = modelOut(X, model, kernel)
[~, N] = size(X);
out = zeros(1, N);
for i=1:N,
out(i... |
github | ornithos/lpsvm-master | solveWeights.m | .m | lpsvm-master/solveWeights.m | 10,813 | utf_8 | 39f55ad7d0e8f7a9da12b654e88cc10f | function [a, rho, xi, fpval, exitflag] = solveWeights(beta, u, H, D, negstrategy, dbg)
% solveWeights:
% Solve KKT system for primal variables given the optimum dual variables.
% There are many ways this can go wrong, particularly for large problems. See
% report for more details.
% Arguments:
% beta - (S... |
github | ornithos/lpsvm-master | solveLPActiveAB1.m | .m | lpsvm-master/Alternative/solveLPActiveAB1.m | 9,335 | utf_8 | ebe930c79f5163cf28728619b270a6df | function[out, exitflag, primal, time] = ...
solveLPActiveAB1(H, D, options, wrm_strt, NN, ass, dbg, verbose)
% SOLVELPACTIVEAB1 Solve LP with active set strategy
% This function iteratively solves a candidate set of columns (initialised by chooseInitCol)
% for the Restricted Dual RMP, converts to pr... |
github | ornithos/lpsvm-master | solveLPActiveAB2.m | .m | lpsvm-master/Alternative/solveLPActiveAB2.m | 9,664 | utf_8 | 0c00c699aac948769e3a0c361aa6e759 | function[out, exitflag, primal, time, msgl] = ...
solveLPActiveAB2(H, D, options, wrm_strt, NN, ass, dbg, verbose)
% SOLVELPACTIVEAB Solve LP with active set strategy
%
% --- v2 Same as v1. but maintains active set by an index vector
% rather than overwriting variables. Pr... |
github | ornithos/lpsvm-master | solveLPActiveAB3GS.m | .m | lpsvm-master/Optim Ideas/solveLPActiveAB3GS.m | 2,773 | utf_8 | 960fbccb6b33e6fb2d769c913c35479a | function[out, exitflag, primal, time, msgl] = ...
solveLPActiveAB3GS(H, D, options, wrm_strt, NN, ass, dbg)
%SOLVELPACTIVE Test how much difference GS Orthonormalisation can make!
tol = 1e-5;
time = zeros(1, 200);
%Start with random columns
[dim, N] = size(H);
if NN == 0; NN = ceil(N/100); end;
% ... |
github | ornithos/lpsvm-master | SCDNNQuad3.m | .m | lpsvm-master/Optim Ideas/SCDNNQuad3.m | 3,521 | utf_8 | e93a41c8b237ebb5992e636db401aad0 | function x = SCDNNQuad3(f, A, b, y, lambda, x0, maxIter, tol)
% (Stochastic) Coordinate Ascent for non-negative quadratic minimisation.
% (3) Optimal step plus adaptive stochastic choice of coordinate
%
% Since we expect a sparse vector, we can reduce the probability of
% choosing a coordinate if it doesn't move (much)... |
github | ornithos/lpsvm-master | fwAgain.m | .m | lpsvm-master/Optim Ideas/fwAgain.m | 3,898 | utf_8 | 36467007cea228fcb094d8d25eb29528 | function [u, beta, exitflag] = fwAgain(H, initial, D, maxIter, epsilon, ...
tol, searchType, dbg)
% Frank-Wolfe solution of the minimax problem for LPSVM
%
% Will output both the optimal u and the minimax achieved, beta.
%
% Arguments:
% H - (Matrix) rows = hypotheses / cols = datapoints
% initia... |
github | ornithos/lpsvm-master | frankWolfe4.m | .m | lpsvm-master/Optim Ideas/frankWolfe4.m | 3,246 | utf_8 | 0b4a042b242f17792cfee59dbfe3e13d | function [u, beta, exitflag] = frankWolfe4(H, initial, D, maxIter, epsilon, ...
tol, searchType, dbg)
% Frank-Wolfe solution of the minimax problem for LPSVM. Using proximal
% ideas from R. Freund and Y. Nesterov.
%
% Will output both the optimal u and the minimax achieved, beta.
%
% Arguments:
% H -... |
github | ornithos/lpsvm-master | SCDNNQuad2b.m | .m | lpsvm-master/Optim Ideas/SCDNNQuad2b.m | 4,504 | utf_8 | 4ba543ce951ea557df73ba3fe387bbd6 | function x = SCDNNQuad2b(f, H, A, b, y, lambda, D, x0, maxIter, tol, criterion)
% (Stochastic) Coordinate Ascent for non-negative quadratic minimisation.
% (2) We now actually take analytic (optimal) step for each j rather than
% gradient step. Reduced compute time.
%
% Since we expect a sparse vector, we can reduce th... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.