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 | XuTing95/WDtrace-master | soft_thresh_w.m | .m | WDtrace-master/Code/soft_thresh_w.m | 758 | utf_8 | ab0669cfceff1c6dff6e7c1528ca522e | % --------------------- Weighted SOFT-THRESHOLDING OPERATOR ------------------- %
%
% -------------- minimize 1/2*||X - Y||_2^2 + lambda*Weight.*||X||_1 ---------- %
%
% -------------------------- LAST UPDATE: 12/13/2016 -------------------------- %
%
%
% Reference:
% T. Xu and X. F. Zhang (2017)
% Identifying gene ne... |
github | ACloninger/two-sample-anisotropic-master | demo_sec5_example1.m | .m | two-sample-anisotropic-master/demo_sec5_example1.m | 11,746 | utf_8 | 359d5f0589c810beb243cc422cfe1640 | % set number of Monte Carlo runs in line 65
% statistics for two sample test
% (1) gaussian mmd
% (2) akmmd-L2
% (3) akmmd-spec
% (4) KS-randproj
% You are free to use, change, or redistribute this code in any way you
% want for non-commercial purposes. However, it is appreciated if you
% mai... |
github | ACloninger/two-sample-anisotropic-master | demo_sec3_limiting_density.m | .m | two-sample-anisotropic-master/demo_sec3_limiting_density.m | 16,593 | utf_8 | 4ff4943f125dfa41ff39398f84d9a7d7 | % set number of Monte Carlo runs at line 343
% You are free to use, change, or redistribute this code in any way you
% want for non-commercial purposes. However, it is appreciated if you
% maintain the name of the original author, and cite the paper:
% X. Cheng, A. Cloninger, R. Coifman. "Two ... |
github | ACloninger/two-sample-anisotropic-master | generate_uniform_reference_set.m | .m | two-sample-anisotropic-master/generate_uniform_reference_set.m | 2,741 | utf_8 | 2fa96d18a71105b297642795effe75af |
% You are free to use, change, or redistribute this code in any way you
% want for non-commercial purposes. However, it is appreciated if you
% maintain the name of the original author, and cite the paper:
% X. Cheng, A. Cloninger, R. Coifman. "Two Sample Statistics Based on Anisotropic Kernels."... |
github | ACloninger/two-sample-anisotropic-master | demo_sec5_example2.m | .m | two-sample-anisotropic-master/demo_sec5_example2.m | 13,864 | utf_8 | 3111bc1d2df3f8c606a107c188643708 | % set number of Monte Carlo runs in line 74
% set to obtain prefix covariance matrix or from local pca in line 29
% You are free to use, change, or redistribute this code in any way you % want for non-commercial purposes. However, it is appreciated if you
% maintain the name of the original author, and ... |
github | wishcow79/chabauty-master | cache.m | .m | chabauty-master/cache.m | 2,466 | utf_8 | 5cfc6091d4731dc7f6cb94044df21274 | use_cache := true;
prefix := "Dyfj";
//The typical use case of is the functions in this file is the following:
//
//function ComputeX(object,parameters)
// if IsArrayCached(object,"X",parameters) then
// return GetArrayCache(object,"X",parameters);
// else;
// X := <some code that computes X>;
// SetA... |
github | wishcow79/chabauty-master | curve_ff.m | .m | chabauty-master/curve_ff.m | 5,983 | utf_8 | 49651eeda05cb624783575475e7a555e | load "pcontent.m";
load "curve_funcs.m";
// load "curve_funcs.m";
/*
This file is dedicated to all functions that relate to function fields of curves, including differentials.
TODO: improve comments.
TODO: the line "reduce coordinate ring of curve modulo p" might crash if there are p-s in the denominator
*/
// f... |
github | wishcow79/chabauty-master | point_funcs.m | .m | chabauty-master/point_funcs.m | 899 | utf_8 | 5d83b0067dbd742524ce27a70899b10e | function ConvertPointToIntSeq(pt)
dim := #Eltseq(pt) -1 ;
pt_seq := [pt[i]*d where d := LCM([Denominator(pt[j]) : j in [1..dim+1]]): i in [1..dim+1]];
pt_seq := ChangeUniverse(pt_seq, Integers());
return pt_seq;
end function;
function ReducePointModp(pt, p)
C := Curve(pt);
Cp := ReduceCurveMo... |
github | wishcow79/chabauty-master | chabauty.m | .m | chabauty-master/chabauty.m | 37,258 | utf_8 | e1be54e99fb35947395ce62e2ce0c3b3 | ////////////////////////////////////////////////////////////////////////
// chabauty.m
// Authors: Maarten Derickx, Solomon Vishkautsan, 1 October 2017
//
// Online at:
// https://github.com/wishcow79/chabauty/blob/master/chabauty.m
// A file of examples is at
// https://github.com/wishcow79/chabauty/blob/master/chab... |
github | wishcow79/chabauty-master | curve_funcs.m | .m | chabauty-master/curve_funcs.m | 3,066 | utf_8 | 2f2961d2842f7249a58e7852b8b820f7 | /* TODO: Brute reduction might fail if coefficients are not integers */
load "cache.m";
function ReduceCurveModp(C,p : saturate := true)
// intrinsic ReduceCurveModp(C::Crv,p::RngIntElt : saturate := true) -> Crv
//{Reduce curve modulo p. This function also caches the reduced curve Cp in the curve C}
// input chec... |
github | wishcow79/chabauty-master | hyperelliptic.m | .m | chabauty-master/hyperelliptic.m | 691 | utf_8 | 9f71c58a5272ea55c12225b5bd0faff6 | function GoodBasisOfDifferentialsHyp(H)
// it turns out magma creates the same basis, I will leave it here as backup....
g := Genus(H);
FF<x,y> := FunctionField(H);
dx := Differential(x);
w := dx/y;
diff_basis := [w*x^(i-1) : i in [1..g]];
return diff_basis;
end function;
function GoodUniformizerHyp(basept)
H ... |
github | wishcow79/chabauty-master | pcontent.m | .m | chabauty-master/pcontent.m | 1,425 | utf_8 | 448baf351825722596703759347ee7ad | /*
TODO: improve documentation
TODO: what if I is not p-saturated?
TODO: what if F is in I? Do we have infinite loop? No, it crashes on ExactQuotient.
Given a polynomial with integer coefficients, a prime p, and an ideal I, we can reduce the polynomial modulo
I. We might then get a polynomial which has p-content, i.e... |
github | yonghenglh6/minicaffe-master | classification_demo.m | .m | minicaffe-master/matlab/demo/classification_demo.m | 5,466 | utf_8 | 45745fb7cfe37ef723c307dfa06f1b97 | 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 | solin319/incubator-mxnet-master | parse_json.m | .m | incubator-mxnet-master/matlab/+mxnet/private/parse_json.m | 19,095 | utf_8 | 2d934e0eae2779e69f5c3883b8f89963 | function data = parse_json(fname,varargin)
%PARSE_JSON parse a JSON (JavaScript Object Notation) file or string
%
% Based on jsonlab (https://github.com/fangq/jsonlab) created by Qianqian Fang. Jsonlab is lisonced under BSD or GPL v3.
global pos inStr len esc index_esc len_esc isoct arraytoken
if(regexp(fname,'^\s*(... |
github | mattwang44/Human-Motion-Analysis-MATLAB-master | PolyDer.m | .m | Human-Motion-Analysis-MATLAB-master/Week04/PolyDer.m | 1,310 | utf_8 | c40e41cc2fdc02e6446f97347cedabfc | function dp = PolyDer( p, dorder )
% the function the coefficients of polynmial with dth-order of derivation.
% p: coefficient of original polynomial (power down) [(n+1) x 1]
% dorder: order of derivation [1 x 1] / [1 x N]
% dp: coefficient of derivative polynomial (power down) [(n+1-dorder) x 1]
% E.g.
% >> PolyDer( ... |
github | mattwang44/Human-Motion-Analysis-MATLAB-master | HW10.m | .m | Human-Motion-Analysis-MATLAB-master/Week10/HW10.m | 7,835 | utf_8 | 08385326d06f16ba999a3d2e8bad3fff | %%
% Computer Methods in Human Motion Analysis 2017 -- HW9
% Matlab Version: MATLAB R2017a
% Operating System Ubuntu (Linux)
% Student: Wei-hsiang Wang
% Department: Mechanical Engineering
% Student ID: R05522625
addpath(genpath(fileparts(cd))) % adding all hw directory to PATH.
... |
github | mattwang44/Human-Motion-Analysis-MATLAB-master | final.m | .m | Human-Motion-Analysis-MATLAB-master/final/final.m | 7,794 | utf_8 | a3dacda01fae3fa94fbb812defde78cd | %%
% Computer Methods in Human Motion Analysis 2017 -- HW9
% Matlab Version: MATLAB R2017a
% Operating System Ubuntu (Linux)
% Student: Wei-hsiang Wang
% Department: Mechanical Engineering
% Student ID: R05522625
addpath(genpath(fileparts(cd))) % adding all hw directory to PATH.
... |
github | mattwang44/Human-Motion-Analysis-MATLAB-master | Rot2AngFSOLVE.m | .m | Human-Motion-Analysis-MATLAB-master/Week03/Rot2AngFSOLVE.m | 1,849 | utf_8 | 273e2cded528f3a522c66dd9e43afffa | function theta = Rot2AngFSOLVE( Rot, sequence )
% The function derives the Euler angles from rotation matrice
% Rot: Rotation matrix [3 x 3 x nframes]
% sequence: sequence of the Euler angles '1 x 3' (composed of 'x', 'y', 'z')
% Validation of rotation matrice (dimension)
if ~isequal(3,size(Rot,1),size(Rot,2))
err... |
github | josiasritter/nechi-reservoir-network-master | durationCurve_vs3.m | .m | nechi-reservoir-network-master/General/durationCurve_vs3.m | 166 | utf_8 | f66be8bdece54afbd0f9c8609ee0c6fe |
function [dCurve,pEmp] = durationCurve_vs3(inputSeries)
[r c] = size(inputSeries);
dCurve = sort(inputSeries,1,'descend');
pEmp = cumsum(ones(r,1))/(r);
end |
github | MINED-MATKIT/Generator-master | vol3d.m | .m | Generator-master/Functions/vol3d.m | 7,355 | utf_8 | 98b2ce5a001d8f6ff987e01366315782 | function [model] = vol3d(varargin)
%H = VOL3D Volume render 3-D data.
% VOL3D uses the orthogonal plane 2-D texture mapping technique for
% volume rending 3-D data in OpenGL. Use the 'texture' option to fine
% tune the texture mapping technique. This function is best used with
% fast OpenGL hardware.
%
% vol3d ... |
github | MINED-MATKIT/Generator-master | vol3d.m | .m | Generator-master/Thesis Toy Rectangles/vol3d.m | 7,355 | utf_8 | 98b2ce5a001d8f6ff987e01366315782 | function [model] = vol3d(varargin)
%H = VOL3D Volume render 3-D data.
% VOL3D uses the orthogonal plane 2-D texture mapping technique for
% volume rending 3-D data in OpenGL. Use the 'texture' option to fine
% tune the texture mapping technique. This function is best used with
% fast OpenGL hardware.
%
% vol3d ... |
github | MINED-MATKIT/Generator-master | vol3d.m | .m | Generator-master/GeneratorDev/vol3d.m | 7,355 | utf_8 | 98b2ce5a001d8f6ff987e01366315782 | function [model] = vol3d(varargin)
%H = VOL3D Volume render 3-D data.
% VOL3D uses the orthogonal plane 2-D texture mapping technique for
% volume rending 3-D data in OpenGL. Use the 'texture' option to fine
% tune the texture mapping technique. This function is best used with
% fast OpenGL hardware.
%
% vol3d ... |
github | hnanhtuan/Gemb-master | trainSpH.m | .m | Gemb-master/SpH/trainSpH.m | 2,603 | utf_8 | 3f2378c24e811cd2bf9ecf1be5b629ac | function SpHparam = trainSpH(data, SpHparam)
% Input:
% data: training data, n*d, n is the trainging data
% SpHparam:
% SpHparam.nbits---encoding length
% Output:
% SpHparam:
% SpHparam.nbits---encoding length
% SpHparam.centers---spherical... |
github | hnanhtuan/Gemb-master | gen_marker.m | .m | Gemb-master/utils/gen_marker.m | 694 | utf_8 | 31bf91686817b908bc736fa9f0da232b |
function marker=gen_marker(curve_idx)
markers=[];
% scheme
% scheme
markers{end+1}='o';
markers{end+1}='*';
markers{end+1}='d';
markers{end+1}='p';
markers{end+1}='s';
markers{end+1}='h';
markers{end+1}='o';
markers{end+1}='*';
markers{end+1}='o';
markers{end+1}='o';
markers{end+1}='o';
markers{end+1}='o';
markers{e... |
github | hnanhtuan/Gemb-master | compactbit.m | .m | Gemb-master/utils/compactbit.m | 407 | utf_8 | c7fd0cd80d0d1a0e21e55c121bc8c067 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function cb = compactbit(b)
%
% b = bits array
% cb = compacted string of bits (using words of 'word' bits)
% Examples: [1 1 0 0 0]-> 3
[nSamples nbits] = size(b);
nwords = ceil(nbits/8);
cb = zeros([nSamples nwords], 'uint8');
for ... |
github | hnanhtuan/Gemb-master | EuDist2.m | .m | Gemb-master/utils/EuDist2.m | 1,248 | utf_8 | 8992ee5820611c32f63c31dd9cc3ab8c |
function D = EuDist2(fea_a,fea_b,bSqrt)
%EUDIST2 Efficiently Compute the Euclidean Distance Matrix by Exploring the
%Matlab matrix operations.
%
% D = EuDist(fea_a,fea_b)
% fea_a: nSample_a * nFeature
% fea_b: nSample_b * nFeature
% D: nSample_a * nSample_a
% or nSample_a * nSample_b... |
github | hnanhtuan/Gemb-master | compute_map.m | .m | Gemb-master/BA/evaluation_tools/compute_map.m | 1,846 | utf_8 | 97ec2a86542fd2a35fd509732ae5f396 | % This function computes the mAP for a given set of returned results.
%
% Usage: map = compute_map (ranks, gnd);
%
% Notes:
% 1) ranks starts from 1, size(ranks) = db_size X #queries
% 2) The junk results (e.g., the query itself) should be declared in the gnd stuct array
function [map, aps] = compute_map (ranks, gnd, v... |
github | hnanhtuan/Gemb-master | KNNRecall.m | .m | Gemb-master/BA/evaluation_tools/KNNRecall.m | 559 | utf_8 | baa615f2ec0246a10ecb30c42a33e4f5 |
function R = KNNRecall(trainZ,testZ,K,gt)
[numTest,b] = size(testZ); R = zeros(size(K));
for i = 1:numTest
point = testZ(i,:);
dist = sum(bsxfun(@xor,trainZ,point),2);
[~,idx] = sort(dist);
for j = 1:numel(K)
idx1 = idx(1:K(j));
if iscell(gt)
c = intersect(idx1,gt{i});
... |
github | hnanhtuan/Gemb-master | KNNPrecision.m | .m | Gemb-master/BA/evaluation_tools/KNNPrecision.m | 1,154 | utf_8 | 9ff3a85f46a648b127b9c765c79955d7 | % P = KNNPrecision(trainZ,testZ,K,gt) K-nearest neighbors precision
%
% In:
% trainZ: NxL binary matrix containing binary codes for training set.
% testZ: MxL binary matrix containing binary codes for test set.
% K: number of neighbors, or a list of neighbors.
% gt: MxK matrix containing the index of the K-near... |
github | hnanhtuan/Gemb-master | ba.m | .m | Gemb-master/BA/auxiliary/ba.m | 4,348 | utf_8 | bcbad7d4e8e1560544b358639b4ba775 | % [h,Z,f] = ba(X,L,mu,[Z,V,enum]) Binary Autoencoder (BA)
%
% Train a binary autoencoder using a MAC algorithm. The encoder can be
% used as a binary hash function for information retrieval.
%
% Notes:
% - We use a validation set V to check the precision at each step. By default,
% this is a random subset of 200 poin... |
github | hnanhtuan/Gemb-master | linftrain.m | .m | Gemb-master/BA/auxiliary/linftrain.m | 1,053 | utf_8 | 3f610feb964c525635b16cdc7c58c399 | % [f,fX,E] = linftrain(X,Y[,l]) Train linear function y = f(x) = W.x+w
%
% In:
% X: NxL matrix, N L-dim data points rowwise.
% Y: NxD matrix, N D-dim data points rowwise.
% l: (nonnegative scalar) regularisation parameter. Default: 0.
% Out:
% f: (struct) the linear function, with fields:
% type='linf', W ... |
github | hnanhtuan/Gemb-master | bfa.m | .m | Gemb-master/BA/auxiliary/bfa.m | 2,665 | utf_8 | 9c6730b9a14030b1fa6100b1cd17e794 | % [h,Z,f] = bfa(X,L,[Z,V,enum,maxit]) Binary Factor Analysis (BFA)
%
% Train a binary factor analysis using a MAC algorithm. The encoder can be
% used as a binary hash function for information retrieval.
%
% See usage instructions in ba.m.
%
% In:
% X,L,Z,V,enum: as in ba.m. Default for Z: tPCA.
% maxit: maximal nu... |
github | hnanhtuan/Gemb-master | binset.m | .m | Gemb-master/BA/auxiliary/binset.m | 426 | utf_8 | 90eeb676b27c9fb06794c3a844b9b9c1 | % B = binset(n) Set of n-bit binary numbers
%
% In:
% n: number of binary variables (bits).
% Out:
% B: (2^n x n matrix) the 2^n binary numbers in ascending order;
% each number is 1..n = MSB..LSB.
%
% Any non-mandatory argument can be given the value [] to force it to take
% its default value.
% Copyright (c... |
github | hnanhtuan/Gemb-master | linf.m | .m | Gemb-master/BA/auxiliary/linf.m | 418 | utf_8 | cb63f64993075054d35e97c88685bf5d | % [Y,J] = linf(X,f) Value of linear function y = f(x) = W.x+w
%
% See linftrain.
%
% In:
% X: NxL matrix, N L-dim data points rowwise.
% f: (struct) the linear function.
% Out:
% Y: NxD matrix, N D-dim outputs Y = f(X).
% J: DxL Jacobian matrix (assumes N=1 input only).
% Copyright (c) 2009 by Miguel A. Carrei... |
github | hnanhtuan/Gemb-master | optenc.m | .m | Gemb-master/BA/auxiliary/optenc.m | 2,449 | utf_8 | e74e497606c9670df5439da24377dd52 | % [h,hX] = optenc(Z,X,[h,warm,do_h])
%
% Train the encoder (hash function) given input data and binary codes.
%
% The hash function h consists of L binary linear SVMs (one per code bit).
% We train each SVM using LIBLINEAR.
%
% Notes:
% - Warm-start means that, when training the hash function h, we initialize
% the t... |
github | hnanhtuan/Gemb-master | Zrelaxed.m | .m | Gemb-master/BA/auxiliary/Zrelaxed.m | 1,750 | UNKNOWN | 7c23abbdfff789d41f206145eac8d410 | % [Z rZ] = Zrelaxed(X,f,V,mu,[Z,maxit,tol])
%
% Binary autoencoder Z step: truncated relaxed approximation.
%
% Optimizes over the real codes Z in [0,1] (a convex QP):
% min_Z{ |X - f(Z)|� + �.|Z - V|� } s.t. 0 >= Z >= 1
% then projects Z onto {0,1} using a greedy truncation procedure where, for
% each bit in sequenc... |
github | hnanhtuan/Gemb-master | linh.m | .m | Gemb-master/BA/auxiliary/linh.m | 443 | utf_8 | cf6b0c9959a424fd934643f353dc31c1 | % Y = linh(X,h)
%
% Value of step linear function y = h(x) = step(W.x+w), where
% step(t) = 1 if t>0, 0 otherwise
% applies elementwise.
%
% In:
% X: NxL matrix, N L-dim data points rowwise.
% h: (struct) hash function (containing D binary functions).
% Out:
% Y: NxD logical matrix, N D-dim outputs Y = h(X).
%... |
github | hnanhtuan/Gemb-master | itq.m | .m | Gemb-master/BA/auxiliary/itq.m | 2,271 | utf_8 | 77e2b4bbd764ce1a0fe99ff5b180df65 | % [h,Z] = itq(X,L[,rot]) ITQ and tPCA
%
% Learn binary hash functions with ITQ (iterative quantization) or with tPCA
% (thresholded PCA).
%
% tPCA computes PCA and truncates its low-dim codes using zero as threshold.
% Run it as itq(X,L).
% ITQ computes PCA and rotates its low-dim codes to make them as binary as
% poss... |
github | epilepsyecosystem/3rdPlace_GarethJones-master | zscore2.m | .m | 3rdPlace_GarethJones-master/zscore2.m | 1,862 | utf_8 | bc34b745e5214b3f2d4faf9ed9fc6193 | % MATLAB zscore function modified to handle nans using nanmean and nanstd.
% Note that this is slower than using mean and std.
% Original version Copyright 1993-2015 The MathWorks, Inc.
function [z,mu,sigma] = zscore2(x,flag,dim)
%ZSCORE Standardized z score.
% Z = ZSCORE(X) returns a centered, scaled version of X,... |
github | Rookfighter/robmap-ws17-18-master | resample.m | .m | robmap-ws17-18-master/ex08/octave/tools/resample.m | 1,264 | utf_8 | d5f805465ccb86ff9b4315695ffaa07c | % resample the set of particles.
% A particle has a probability proportional to its weight to get
% selected. A good option for such a resampling method is the so-called low
% variance sampling, Probabilistic Robotics pg. 109
function newParticles = resample(particles)
numParticles = length(particles);
w = [particles... |
github | Rookfighter/robmap-ws17-18-master | drawprobellipse.m | .m | robmap-ws17-18-master/ex08/octave/tools/drawprobellipse.m | 1,803 | utf_8 | 90c41a3bebf740e86100f47974753eb3 | %DRAWPROBELLIPSE Draw elliptic probability region of a Gaussian in 2D.
% DRAWPROBELLIPSE(X,C,ALPHA,COLOR) draws the elliptic iso-probabi-
% lity contour of a Gaussian distributed bivariate random vector X
% at the significance level ALPHA. The ellipse is centered at X =
% [x; y] where C is the associated 2x2 co... |
github | Rookfighter/robmap-ws17-18-master | drawrobot.m | .m | robmap-ws17-18-master/ex08/octave/tools/drawrobot.m | 5,225 | utf_8 | 3dfed55ac85a746f0f7c2407e1880069 | %DRAWROBOT Draw robot.
% DRAWROBOT(X,COLOR) draws a robot at pose X = [x y theta] such
% that the robot reference frame is attached to the center of
% the wheelbase with the x-axis looking forward. COLOR is a
% [r g b]-vector or a color string such as 'r' or 'g'.
%
% DRAWROBOT(X,COLOR,TYPE) draws a robot of t... |
github | Rookfighter/robmap-ws17-18-master | measurement_model.m | .m | robmap-ws17-18-master/ex08/octave/tools/measurement_model.m | 1,025 | utf_8 | 4a0ad5fabced752df762d7390cdab378 | % compute the expected measurement for a landmark
% and the Jacobian with respect to the landmark
function [h, H] = measurement_model(particle, z)
% extract the id of the landmark
landmarkId = z.id;
% two 2D vector for the position (x,y) of the observed landmark
landmarkPos = particle.landmarks(landmarkId).mu;
% TODO... |
github | Rookfighter/robmap-ws17-18-master | chi2invtable.m | .m | robmap-ws17-18-master/ex08/octave/tools/chi2invtable.m | 231,909 | utf_8 | d16aef6be089f46039e76c200f7577d8 | %CHI2INVTABLE Lookup table of the inverse of the chi-square cdf.
% X = CHI2INVTABLE(P,V) returns the inverse of the chi-square cumu-
% lative distribution function (cdf) with V degrees of freedom at
% the value P. The chi-square cdf with V degrees of freedom, is
% the gamma cdf with parameters V/2 and 2.
%
... |
github | Rookfighter/robmap-ws17-18-master | drawellipse.m | .m | robmap-ws17-18-master/ex08/octave/tools/drawellipse.m | 994 | utf_8 | c0100a4cf263e6e87026b3214221e84d | %DRAWELLIPSE Draw ellipse.
% DRAWELLIPSE(X,A,B,COLOR) draws an ellipse at X = [x y theta]
% with half axes A and B. Theta is the inclination angle of A,
% regardless if A is smaller or greater than B. COLOR is a
% [r g b]-vector or a color string such as 'r' or 'g'.
%
% H = DRAWELLIPSE(...) returns the graphi... |
github | Rookfighter/robmap-ws17-18-master | drawprobellipse.m | .m | robmap-ws17-18-master/ex04/octave/tools/drawprobellipse.m | 1,803 | utf_8 | 90c41a3bebf740e86100f47974753eb3 | %DRAWPROBELLIPSE Draw elliptic probability region of a Gaussian in 2D.
% DRAWPROBELLIPSE(X,C,ALPHA,COLOR) draws the elliptic iso-probabi-
% lity contour of a Gaussian distributed bivariate random vector X
% at the significance level ALPHA. The ellipse is centered at X =
% [x; y] where C is the associated 2x2 co... |
github | Rookfighter/robmap-ws17-18-master | drawrobot.m | .m | robmap-ws17-18-master/ex04/octave/tools/drawrobot.m | 5,225 | utf_8 | 3dfed55ac85a746f0f7c2407e1880069 | %DRAWROBOT Draw robot.
% DRAWROBOT(X,COLOR) draws a robot at pose X = [x y theta] such
% that the robot reference frame is attached to the center of
% the wheelbase with the x-axis looking forward. COLOR is a
% [r g b]-vector or a color string such as 'r' or 'g'.
%
% DRAWROBOT(X,COLOR,TYPE) draws a robot of t... |
github | Rookfighter/robmap-ws17-18-master | chi2invtable.m | .m | robmap-ws17-18-master/ex04/octave/tools/chi2invtable.m | 231,909 | utf_8 | d16aef6be089f46039e76c200f7577d8 | %CHI2INVTABLE Lookup table of the inverse of the chi-square cdf.
% X = CHI2INVTABLE(P,V) returns the inverse of the chi-square cumu-
% lative distribution function (cdf) with V degrees of freedom at
% the value P. The chi-square cdf with V degrees of freedom, is
% the gamma cdf with parameters V/2 and 2.
%
... |
github | Rookfighter/robmap-ws17-18-master | drawellipse.m | .m | robmap-ws17-18-master/ex04/octave/tools/drawellipse.m | 994 | utf_8 | c0100a4cf263e6e87026b3214221e84d | %DRAWELLIPSE Draw ellipse.
% DRAWELLIPSE(X,A,B,COLOR) draws an ellipse at X = [x y theta]
% with half axes A and B. Theta is the inclination angle of A,
% regardless if A is smaller or greater than B. COLOR is a
% [r g b]-vector or a color string such as 'r' or 'g'.
%
% H = DRAWELLIPSE(...) returns the graphi... |
github | Rookfighter/robmap-ws17-18-master | t2v.m | .m | robmap-ws17-18-master/ex07/octave/tools/t2v.m | 133 | utf_8 | 6606805d2b95b1d27de95e33aa633889 | #computes the pose vector v from an homogeneous transform A
function v=t2v(A)
v(1:2, 1)=A(1:2,3);
v(3,1)=atan2(A(2,1),A(1,1));
end
|
github | Rookfighter/robmap-ws17-18-master | read_robotlaser.m | .m | robmap-ws17-18-master/ex07/octave/tools/read_robotlaser.m | 1,375 | utf_8 | 7b26523688f4d9499097947920eeef74 | % read a file containing ROBOTLASER1 in CARMEN logfile format
function laser=read_robotlaser(filename)
fid = fopen(filename, 'r');
laser = cell();
while true
ln = fgetl(fid);
if (ln == -1)
break
endif
tokens = strsplit(ln, ' ', true);
if (strcmp(tokens(1), "ROBOTLASER1") == 0)
continue;
endif
... |
github | Rookfighter/robmap-ws17-18-master | v2t.m | .m | robmap-ws17-18-master/ex07/octave/tools/v2t.m | 165 | utf_8 | bd190805c2c8033bb7843a4c3559f866 | #computes the homogeneous transform matrix A of the pose vector v
function A=v2t(v)
c=cos(v(3));
s=sin(v(3));
A=[c, -s, v(1);
s, c, v(2);
0 0 1 ];
end
|
github | Rookfighter/robmap-ws17-18-master | bresenham.m | .m | robmap-ws17-18-master/ex07/octave/tools/bresenham.m | 1,346 | utf_8 | 67508ba3dbef9fe8543bf12af0767805 | function [X,Y] = bresenham(mycoords)
% BRESENHAM: Generate a line profile of a 2d image
% using Bresenham's algorithm
% [myline,mycoords] = bresenham(mymat,mycoords,dispFlag)
%
% - For a demo purpose, try >> bresenham();
%
% - mymat is an input image matrix.
%
% - mycoords is coordinate of the for... |
github | Rookfighter/robmap-ws17-18-master | linearize_pose_landmark_constraint.m | .m | robmap-ws17-18-master/ex10/octave/linearize_pose_landmark_constraint.m | 763 | utf_8 | d5433b83c27734ba80d65c33de469835 | % Compute the error of a pose-landmark constraint
% x 3x1 vector (x,y,theta) of the robot pose
% l 2x1 vector (x,y) of the landmark
% z 2x1 vector (x,y) of the measurement, the position of the landmark in
% the coordinate frame of the robot given by the vector x
%
% Output
% e 2x1 error of the constraint
% A 2x3 Jaco... |
github | Rookfighter/robmap-ws17-18-master | linearize_pose_pose_constraint.m | .m | robmap-ws17-18-master/ex10/octave/linearize_pose_pose_constraint.m | 1,049 | utf_8 | a55bad89aef9a7dd7b4a5761f601ff9d | % Compute the error of a pose-pose constraint
% x1 3x1 vector (x,y,theta) of the first robot pose
% x2 3x1 vector (x,y,theta) of the second robot pose
% z 3x1 vector (x,y,theta) of the measurement
%
% You may use the functions v2t() and t2v() to compute
% a Homogeneous matrix out of a (x, y, theta) vector
% for computi... |
github | Rookfighter/robmap-ws17-18-master | linearize_and_solve.m | .m | robmap-ws17-18-master/ex10/octave/linearize_and_solve.m | 2,957 | utf_8 | 08db4f47ff36acf2b7eb7ee73afbb03c | % performs one iteration of the Gauss-Newton algorithm
% each constraint is linearized and added to the Hessian
function dx = linearize_and_solve(g)
nnz = nnz_of_graph(g);
N = length(g.x);
% allocate the sparse H and the vector b
H = spalloc(N, N, nnz);
b = zeros(1,N);
needToAddPrior = true;
% compute the addend t... |
github | Rookfighter/robmap-ws17-18-master | compute_global_error.m | .m | robmap-ws17-18-master/ex10/octave/compute_global_error.m | 1,115 | utf_8 | f5230779348b082530858334674f9dde | % Computes the total error of the graph
function Fx = compute_global_error(g)
Fx = 0;
% Loop over all edges
for eid = 1:length(g.edges)
edge = g.edges(eid);
% pose-pose constraint
if (strcmp(edge.type, 'P') != 0)
x1 = g.x(edge.fromIdx:edge.fromIdx+2); % the first robot pose
x2 = g.x(edg... |
github | Rookfighter/robmap-ws17-18-master | t2v.m | .m | robmap-ws17-18-master/ex10/octave/tools/t2v.m | 122 | utf_8 | 4fe2d6a6a2d9713d1811c566c00df3a4 | % computes the pose vector v from a homogeneous transform A
function v=t2v(A)
v = [A(1:2,3); atan2(A(2,1),A(1,1))];
end
|
github | Rookfighter/robmap-ws17-18-master | get_block_for_id.m | .m | robmap-ws17-18-master/ex10/octave/tools/get_block_for_id.m | 242 | utf_8 | 45c79bac533c38cfb5bab150d76a2cfe | % returns the block of the state vector which corresponds to the given id
function block = get_block_for_id(g, id)
blockInfo = getfield(g.idLookup, num2str(id));
block = g.x(1+blockInfo.offset : blockInfo.offset + blockInfo.dimension);
end
|
github | Rookfighter/robmap-ws17-18-master | nnz_of_graph.m | .m | robmap-ws17-18-master/ex10/octave/tools/nnz_of_graph.m | 468 | utf_8 | 7eb6fe50658d285bbb992af21794cd89 | % calculates the number of non-zeros of a graph
% Actually, it is an upper bound, as duplicate edges might be counted several times
function nnz = nnz_of_graph(g)
nnz = 0;
% elements along the diagonal
for [value, key] = g.idLookup
nnz += value.dimension^2;
end
% off-diagonal elements
for eid = 1:length(g.edges)
... |
github | Rookfighter/robmap-ws17-18-master | invt.m | .m | robmap-ws17-18-master/ex10/octave/tools/invt.m | 136 | utf_8 | 9af4f2e99d37fa3d3d966dadec4d881e | % inverts a homogenous transform
function A = invt(m)
A = [m(1:2, 1:2)' [0 0]'; [0 0 1]];
A(1:2, 3) = -A(1:2, 1:2) * m(1:2, 3);
end
|
github | Rookfighter/robmap-ws17-18-master | build_structure.m | .m | robmap-ws17-18-master/ex10/octave/tools/build_structure.m | 766 | utf_8 | 8ad7922f6ba64b1062ea3edfdc853840 | % calculates the non-zero pattern of the Hessian matrix of a given graph
function idx = build_structure(g)
idx = [];
% elements along the diagonal
for [value, key] = g.idLookup
dim = value.dimension;
offset = value.offset;
[r,c] = meshgrid(offset+1 : offset+dim, offset+1 : offset+dim);
idx = [idx; [vec(r) ve... |
github | Rookfighter/robmap-ws17-18-master | get_poses_landmarks.m | .m | robmap-ws17-18-master/ex10/octave/tools/get_poses_landmarks.m | 333 | utf_8 | 13eea96e29c0c9b7010f898ae4d72d87 | % extract the offset of the poses and the landmarks
function [poses, landmarks] = get_poses_landmarks(g)
poses = [];
landmarks = [];
for [value, key] = g.idLookup
dim = value.dimension;
offset = value.offset;
if (dim == 3)
poses = [poses; offset];
elseif (dim == 2)
landmarks = [landmarks; offset];
... |
github | Rookfighter/robmap-ws17-18-master | v2t.m | .m | robmap-ws17-18-master/ex10/octave/tools/v2t.m | 166 | utf_8 | 43f0d024b79314db5a2b162943010b6c | % computes the homogeneous transform matrix A of the pose vector v
function A=v2t(v)
c=cos(v(3));
s=sin(v(3));
A=[c, -s, v(1);
s, c, v(2);
0 0 1 ];
end
|
github | Rookfighter/robmap-ws17-18-master | plot_graph.m | .m | robmap-ws17-18-master/ex10/octave/tools/plot_graph.m | 1,368 | utf_8 | b28b807027071e8baf69f2bbec67bea3 | % plot a 2D SLAM graph
function plot_graph(g, iteration = -1)
clf;
hold on;
[p, l] = get_poses_landmarks(g);
if (length(l) > 0)
landmarkIdxX = l+1;
landmarkIdxY = l+2;
plot(g.x(landmarkIdxX), g.x(landmarkIdxY), '.or', 'markersize', 4);
end
if (length(p) > 0)
pIdxX = p+1;
pIdxY = p+2;
plot(g.x(pIdxX), g.... |
github | Rookfighter/robmap-ws17-18-master | read_graph.m | .m | robmap-ws17-18-master/ex10/octave/tools/read_graph.m | 2,293 | utf_8 | 0630181c14990966fed786509ae5a85c | % read a g2o data file describing a 2D SLAM instance
function graph = read_graph(filename)
fid = fopen(filename, 'r');
graph = struct (
'x', [],
'edges', [],
'idLookup', struct
);
disp('Parsing File');
while true
ln = fgetl(fid);
if (ln == -1)
break;
end
tokens = strsplit(ln, ' ', true);
double_t... |
github | Rookfighter/robmap-ws17-18-master | add_landmark_to_map.m | .m | robmap-ws17-18-master/ex06/octave/tools/add_landmark_to_map.m | 2,007 | utf_8 | 618ae778ad57b5aff7d749d25ba196d4 | % Add a landmark to the UKF.
% We have to compute the uncertainty of the landmark given the current state
% (and its uncertainty) of the newly observed landmark. To this end, we also
% employ the unscented transform to propagate Q (sensor noise) through the
% current state
function [mu, sigma, map] = add_landmark_to_m... |
github | Rookfighter/robmap-ws17-18-master | drawprobellipse.m | .m | robmap-ws17-18-master/ex06/octave/tools/drawprobellipse.m | 1,803 | utf_8 | 90c41a3bebf740e86100f47974753eb3 | %DRAWPROBELLIPSE Draw elliptic probability region of a Gaussian in 2D.
% DRAWPROBELLIPSE(X,C,ALPHA,COLOR) draws the elliptic iso-probabi-
% lity contour of a Gaussian distributed bivariate random vector X
% at the significance level ALPHA. The ellipse is centered at X =
% [x; y] where C is the associated 2x2 co... |
github | Rookfighter/robmap-ws17-18-master | drawrobot.m | .m | robmap-ws17-18-master/ex06/octave/tools/drawrobot.m | 5,225 | utf_8 | 3dfed55ac85a746f0f7c2407e1880069 | %DRAWROBOT Draw robot.
% DRAWROBOT(X,COLOR) draws a robot at pose X = [x y theta] such
% that the robot reference frame is attached to the center of
% the wheelbase with the x-axis looking forward. COLOR is a
% [r g b]-vector or a color string such as 'r' or 'g'.
%
% DRAWROBOT(X,COLOR,TYPE) draws a robot of t... |
github | Rookfighter/robmap-ws17-18-master | chi2invtable.m | .m | robmap-ws17-18-master/ex06/octave/tools/chi2invtable.m | 231,909 | utf_8 | d16aef6be089f46039e76c200f7577d8 | %CHI2INVTABLE Lookup table of the inverse of the chi-square cdf.
% X = CHI2INVTABLE(P,V) returns the inverse of the chi-square cumu-
% lative distribution function (cdf) with V degrees of freedom at
% the value P. The chi-square cdf with V degrees of freedom, is
% the gamma cdf with parameters V/2 and 2.
%
... |
github | Rookfighter/robmap-ws17-18-master | drawellipse.m | .m | robmap-ws17-18-master/ex06/octave/tools/drawellipse.m | 994 | utf_8 | c0100a4cf263e6e87026b3214221e84d | %DRAWELLIPSE Draw ellipse.
% DRAWELLIPSE(X,A,B,COLOR) draws an ellipse at X = [x y theta]
% with half axes A and B. Theta is the inclination angle of A,
% regardless if A is smaller or greater than B. COLOR is a
% [r g b]-vector or a color string such as 'r' or 'g'.
%
% H = DRAWELLIPSE(...) returns the graphi... |
github | Rookfighter/robmap-ws17-18-master | apply_odometry_correction.m | .m | robmap-ws17-18-master/ex09/octave/apply_odometry_correction.m | 409 | utf_8 | 07db7a4853e0f65bb87f94bda4d88e30 | % computes a calibrated vector of odometry measurements
% by applying the bias term to each line of the measurements
% X: 3x3 matrix obtained by the calibration process
% U: Nx3 matrix containing the odometry measurements
% C: Nx3 matrix containing the corrected odometry measurements
function C = apply_odometry_corr... |
github | Rookfighter/robmap-ws17-18-master | compute_trajectory.m | .m | robmap-ws17-18-master/ex09/octave/compute_trajectory.m | 820 | utf_8 | 6cd65accf9184595dfd5d7d37df51d3d | % computes the trajectory of the robot by chaining up
% the incremental movements of the odometry vector
% U: a Nx3 matrix, each row contains the odoemtry ux, uy utheta
% T: a (N+1)x3 matrix, each row contains the robot position (starting from 0,0,0)
function T = compute_trajectory(U)
% initialize the trajectory ma... |
github | Rookfighter/robmap-ws17-18-master | ls_calibrate_odometry.m | .m | robmap-ws17-18-master/ex09/octave/ls_calibrate_odometry.m | 2,266 | utf_8 | a20379c0962e54f2b988a0d54694d73c | % this function solves the odometry calibration problem
% given a measurement matrix Z.
% We assume that the information matrix is the identity
% for each of the measurements
% Every row of the matrix contains
% z_i = [u'x, u'y, u'theta, ux, uy, ytheta]
% Z: The measurement matrix
% X: the calibration matrix
% returns ... |
github | Rookfighter/robmap-ws17-18-master | t2v.m | .m | robmap-ws17-18-master/ex09/octave/tools/t2v.m | 122 | utf_8 | 869378bf4d6409006dc9681e45aecdbb | #computes the pose vector v from an homogeneous transform A
function v=t2v(A)
v = [A(1:2,3); atan2(A(2,1),A(1,1))];
end
|
github | Rookfighter/robmap-ws17-18-master | v2t.m | .m | robmap-ws17-18-master/ex09/octave/tools/v2t.m | 165 | utf_8 | bd190805c2c8033bb7843a4c3559f866 | #computes the homogeneous transform matrix A of the pose vector v
function A=v2t(v)
c=cos(v(3));
s=sin(v(3));
A=[c, -s, v(1);
s, c, v(2);
0 0 1 ];
end
|
github | Rookfighter/robmap-ws17-18-master | t2v.m | .m | robmap-ws17-18-master/ex01/octave/t2v.m | 175 | utf_8 | ac627ffe4f502dae869c291a41bbceaa | % t2v.m
%
% Author: Fabian Meyer
% Created On: 21 Oct 2017
function [x] = t2v(t)
x = [t(1,3) / t(3,3);
t(2,3) / t(3,3);
acos(t(1,1) / t(3,3))];
end
|
github | Rookfighter/robmap-ws17-18-master | v2t.m | .m | robmap-ws17-18-master/ex01/octave/v2t.m | 196 | utf_8 | bd3a9aa0990cd1f53631a5f130291783 | % v2t.m
%
% Author: Fabian Meyer
% Created On: 21 Oct 2017
function [t] = v2t(x)
t = [cos(x(3)) -sin(x(3)) x(1);
sin(x(3)) cos(x(3)) x(2);
0 0 1];
end
|
github | Rookfighter/robmap-ws17-18-master | octavehelp.m | .m | robmap-ws17-18-master/ex01/octave/octavehelp.m | 4,448 | utf_8 | c7a2a53c8e1fbfa584b06fd063d64ded | % GNU Octave is a (programmable) calculator and is very good at performing
% matrix operations. The basic syntax is the same as MATLAB's. At Octave's
% command prompt, a command can be entered. If you end a line with a semicolon,
% the output is suppressed. If the output is longer than one screen, you might
% have to p... |
github | Rookfighter/robmap-ws17-18-master | drawprobellipse.m | .m | robmap-ws17-18-master/ex01/octave/tools/drawprobellipse.m | 1,803 | utf_8 | 90c41a3bebf740e86100f47974753eb3 | %DRAWPROBELLIPSE Draw elliptic probability region of a Gaussian in 2D.
% DRAWPROBELLIPSE(X,C,ALPHA,COLOR) draws the elliptic iso-probabi-
% lity contour of a Gaussian distributed bivariate random vector X
% at the significance level ALPHA. The ellipse is centered at X =
% [x; y] where C is the associated 2x2 co... |
github | Rookfighter/robmap-ws17-18-master | drawrobot.m | .m | robmap-ws17-18-master/ex01/octave/tools/drawrobot.m | 5,225 | utf_8 | 3dfed55ac85a746f0f7c2407e1880069 | %DRAWROBOT Draw robot.
% DRAWROBOT(X,COLOR) draws a robot at pose X = [x y theta] such
% that the robot reference frame is attached to the center of
% the wheelbase with the x-axis looking forward. COLOR is a
% [r g b]-vector or a color string such as 'r' or 'g'.
%
% DRAWROBOT(X,COLOR,TYPE) draws a robot of t... |
github | Rookfighter/robmap-ws17-18-master | chi2invtable.m | .m | robmap-ws17-18-master/ex01/octave/tools/chi2invtable.m | 231,909 | utf_8 | d16aef6be089f46039e76c200f7577d8 | %CHI2INVTABLE Lookup table of the inverse of the chi-square cdf.
% X = CHI2INVTABLE(P,V) returns the inverse of the chi-square cumu-
% lative distribution function (cdf) with V degrees of freedom at
% the value P. The chi-square cdf with V degrees of freedom, is
% the gamma cdf with parameters V/2 and 2.
%
... |
github | Rookfighter/robmap-ws17-18-master | drawellipse.m | .m | robmap-ws17-18-master/ex01/octave/tools/drawellipse.m | 994 | utf_8 | c0100a4cf263e6e87026b3214221e84d | %DRAWELLIPSE Draw ellipse.
% DRAWELLIPSE(X,A,B,COLOR) draws an ellipse at X = [x y theta]
% with half axes A and B. Theta is the inclination angle of A,
% regardless if A is smaller or greater than B. COLOR is a
% [r g b]-vector or a color string such as 'r' or 'g'.
%
% H = DRAWELLIPSE(...) returns the graphi... |
github | Rookfighter/robmap-ws17-18-master | drawprobellipse.m | .m | robmap-ws17-18-master/ex05/octave/tools/drawprobellipse.m | 1,803 | utf_8 | 90c41a3bebf740e86100f47974753eb3 | %DRAWPROBELLIPSE Draw elliptic probability region of a Gaussian in 2D.
% DRAWPROBELLIPSE(X,C,ALPHA,COLOR) draws the elliptic iso-probabi-
% lity contour of a Gaussian distributed bivariate random vector X
% at the significance level ALPHA. The ellipse is centered at X =
% [x; y] where C is the associated 2x2 co... |
github | Rookfighter/robmap-ws17-18-master | chi2invtable.m | .m | robmap-ws17-18-master/ex05/octave/tools/chi2invtable.m | 231,909 | utf_8 | d16aef6be089f46039e76c200f7577d8 | %CHI2INVTABLE Lookup table of the inverse of the chi-square cdf.
% X = CHI2INVTABLE(P,V) returns the inverse of the chi-square cumu-
% lative distribution function (cdf) with V degrees of freedom at
% the value P. The chi-square cdf with V degrees of freedom, is
% the gamma cdf with parameters V/2 and 2.
%
... |
github | Rookfighter/robmap-ws17-18-master | drawellipse.m | .m | robmap-ws17-18-master/ex05/octave/tools/drawellipse.m | 994 | utf_8 | c0100a4cf263e6e87026b3214221e84d | %DRAWELLIPSE Draw ellipse.
% DRAWELLIPSE(X,A,B,COLOR) draws an ellipse at X = [x y theta]
% with half axes A and B. Theta is the inclination angle of A,
% regardless if A is smaller or greater than B. COLOR is a
% [r g b]-vector or a color string such as 'r' or 'g'.
%
% H = DRAWELLIPSE(...) returns the graphi... |
github | jagmoreira/machine-learning-coursera-master | submit.m | .m | machine-learning-coursera-master/machine-learning-ex2/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 | jagmoreira/machine-learning-coursera-master | submitWithConfiguration.m | .m | machine-learning-coursera-master/machine-learning-ex2/ex2/lib/submitWithConfiguration.m | 5,562 | utf_8 | 4ac719ea6570ac228ea6c7a9c919e3f5 | 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 | jagmoreira/machine-learning-coursera-master | savejson.m | .m | machine-learning-coursera-master/machine-learning-ex2/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 | jagmoreira/machine-learning-coursera-master | loadjson.m | .m | machine-learning-coursera-master/machine-learning-ex2/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 | jagmoreira/machine-learning-coursera-master | loadubjson.m | .m | machine-learning-coursera-master/machine-learning-ex2/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 | jagmoreira/machine-learning-coursera-master | saveubjson.m | .m | machine-learning-coursera-master/machine-learning-ex2/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 | jagmoreira/machine-learning-coursera-master | submit.m | .m | machine-learning-coursera-master/machine-learning-ex4/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 | jagmoreira/machine-learning-coursera-master | submitWithConfiguration.m | .m | machine-learning-coursera-master/machine-learning-ex4/ex4/lib/submitWithConfiguration.m | 5,562 | utf_8 | 4ac719ea6570ac228ea6c7a9c919e3f5 | 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 | jagmoreira/machine-learning-coursera-master | savejson.m | .m | machine-learning-coursera-master/machine-learning-ex4/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 | jagmoreira/machine-learning-coursera-master | loadjson.m | .m | machine-learning-coursera-master/machine-learning-ex4/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 | jagmoreira/machine-learning-coursera-master | loadubjson.m | .m | machine-learning-coursera-master/machine-learning-ex4/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 | jagmoreira/machine-learning-coursera-master | saveubjson.m | .m | machine-learning-coursera-master/machine-learning-ex4/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 | jagmoreira/machine-learning-coursera-master | submit.m | .m | machine-learning-coursera-master/machine-learning-ex6/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 | jagmoreira/machine-learning-coursera-master | porterStemmer.m | .m | machine-learning-coursera-master/machine-learning-ex6/ex6/porterStemmer.m | 9,902 | utf_8 | 7ed5acd925808fde342fc72bd62ebc4d | function stem = porterStemmer(inString)
% Applies the Porter Stemming algorithm as presented in the following
% paper:
% Porter, 1980, An algorithm for suffix stripping, Program, Vol. 14,
% no. 3, pp 130-137
% Original code modeled after the C version provided at:
% http://www.tartarus.org/~martin/PorterStemmer/c.tx... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.