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 | rama055/Compressed-Sensing-master | IST.m | .m | Compressed-Sensing-master/Compressed Sensing/code/IST.m | 12,630 | utf_8 | b3fce3466b24c7be14262cd2bf860b83 | function [x,x_debias,objective,times,debias_start,mses]= ...
IST(y,A,tau,varargin)
% This function solves the convex problem
% arg min_theta = 0.5*|| y - A x ||_2^2 + tau ||x||_1
% using the MM/IST algorithm, described in the paper
% M. Figueiredo, and R. Nowak, "A Bound Optimization Approach
% to Wavelet-... |
github | rama055/Compressed-Sensing-master | l1eq_pd.m | .m | Compressed-Sensing-master/Compressed Sensing/code/guitar sample/l1eq_pd.m | 5,371 | utf_8 | 0caac7b67672586d3980036f6043c5ba | % l1eq_pd.m
%
% Solve
% min_x ||x||_1 s.t. Ax = b
%
% Recast as linear program
% min_{x,u} sum(u) s.t. -u <= x <= u, Ax=b
% and use primal-dual interior point method
%
% Usage: xp = l1eq_pd(x0, A, At, b, pdtol, pdmaxiter, cgtol, cgmaxiter)
%
% x0 - Nx1 vector, initial point.
%
% A - Either a handle to a function t... |
github | rama055/Compressed-Sensing-master | GenerateMeasurements.m | .m | Compressed-Sensing-master/Compressed Sensing/code/chaining pursuit/GenerateMeasurements.m | 1,264 | utf_8 | 74505aaeb46db6a66bacad63c95c1c12 | % Phi = GenerateMeasurements( d, N, T )
%
% Constructs a measurement system for Chaining Pursuit
%
% The output Phi is a structure with fields
% d = signal dimension
% T = number of trials
% N = number of measurements per trial
% measurement = a T x d integer matrix;
% measurement(t, i) = measurement ... |
github | rama055/Compressed-Sensing-master | ChainingPursuit.m | .m | Compressed-Sensing-master/Compressed Sensing/code/chaining pursuit/ChainingPursuit.m | 4,539 | utf_8 | a8b25c542d7d5a8a6fc43cfe1716e8c1 | % hat = ChainingPursuit( m, V, Phi ),
%
% Attempt to recover m significant spikes
% given measurements V with the system Phi.
%
% The output, hat, is a sparse vector that
% contains O(m) nonzero positions
%
% by Joel A. Tropp, copyright 2005
% See readme.rtf for restrictions
% Date: 15 November 2005
function hat = Cha... |
github | rama055/Compressed-Sensing-master | EncodeSignal.m | .m | Compressed-Sensing-master/Compressed Sensing/code/chaining pursuit/EncodeSignal.m | 1,453 | utf_8 | 9d8e8888cf550852bcb0bf2a940ebf93 | % V = EncodeSignal( s, Phi )
%
% Uses the measurement system Phi to encode the
% signal s
%
% The output V is a cell array with T cells
% -- Each cell is an N x (log(d) + 1) matrix
% -- The nth row of the matrix contains the
% bit tests for the nth measurement in trial t
%
% by Joel A. Tropp, copyright 2005
% See re... |
github | rama055/Compressed-Sensing-master | synthesize_fp.m | .m | Compressed-Sensing-master/Compressed Sensing/code/music analysis/synthesize_fp.m | 941 | utf_8 | 167c9de6de48bd6a462f5757c7bd7b73 |
function synthesize_fp(file,f,d,p,gamma)
% Matlab function synthesize_fp(file,f,d,p,gamma)
% creates a .wav audio file of a sound where all frequencies,
% amplitudes(power) and phase may be specified.
%
% file is a string which is the name of the .wav file.
% f is a length n vector of frequencies in Hz
% d i... |
github | rama055/Compressed-Sensing-master | analyze.m | .m | Compressed-Sensing-master/Compressed Sensing/code/music analysis/analyze.m | 902 | utf_8 | 4b78a8bc9690a176cdc08bc3832baaf7 |
function analyze(file)
% Matlab function analyze(file)
% plots the waveform and power spectrum of a wav sound file.
% For example, type analyze('piano.wav') at the Matlab prompt.
%
% Mark R. Petersen, U. of Colorado Boulder Applied Math Dept, Feb 2004
[y, Fs] = wavread(file); % y is sound data, Fs is ... |
github | rama055/Compressed-Sensing-master | coordl1breg.m | .m | Compressed-Sensing-master/Compressed Sensing/code/Bregman/coordl1breg.m | 3,436 | utf_8 | 5ce2eb78d177859712a16ed570359985 | function [u,Energy] = coordl1breg(A,f,lambda,varargin)
%COORDL1BREG Linearly-constrained L1 minimization with coordinate descent
% u = COORDL1BREG(A,f,lambda) solves the minimization problem
%
% min_u ||u||_1 subject to A*u = f
%
% where A is an MxN matrix and f is a vector of length M. Input lambda
% ... |
github | rama055/Compressed-Sensing-master | coordlsl1.m | .m | Compressed-Sensing-master/Compressed Sensing/code/Bregman/coordlsl1.m | 3,014 | utf_8 | e4285528a538a086f3a7fe125c8db454 | function [v,Energy] = coordlsl1(A,f,lambda,varargin)
%COORDLSL1 Least-squares L1 minimization with coordinate descent
% u = COORDLSL1(A,f,lambda) solves the minimization problem
%
% min_u ||u||_1 + lambda ||A*u - f||_2^2
%
% where A is an MxN matrix and f is a vector of length M.
%
% COORDLSL1(...,'PARAM1',... |
github | rama055/Compressed-Sensing-master | OMP.m | .m | Compressed-Sensing-master/Compressed Sensing/code/greedy/OMP.m | 8,339 | utf_8 | 35b248a305849fe309acade59f0d2567 | function [x,r,normR,residHist, errHist] = OMP( A, b, k, errFcn, opts )
% x = OMP( A, b, k )
% uses the Orthogonal Matching Pursuit algorithm (OMP)
% to estimate the solution to the equation
% b = A*x (or b = A*x + noise )
% where there is prior information that x is sparse.
%
% "A" may be a matrix, or... |
github | rama055/Compressed-Sensing-master | CoSaMP.m | .m | Compressed-Sensing-master/Compressed Sensing/code/greedy/CoSaMP.m | 11,081 | utf_8 | 7bec67281f132bcd6c430119cae27df8 | function [x,r,normR,residHist, errHist] = CoSaMP( A, b, k, errFcn, opts )
% x = CoSaMP( A, b, k )
% uses the Compressive Sampling Matched Pursuit (CoSaMP) algorithm
% (see Needell and Tropp's 2008 paper http://arxiv.org/abs/0803.2392 )
% to estimate the solution to the equation
% b = A*x (or b = A*x + n... |
github | rama055/Compressed-Sensing-master | lmp_re_ls.m | .m | Compressed-Sensing-master/Compressed Sensing/code/FOCUSS/lmp_re_ls.m | 2,030 | utf_8 | 07ee0e1e6c3f5b76fcf532ada4da8b47 | function x = lmp_re_ls(A,y,group,m,p)
% Solution to the non-convex group sparse optimization problem min||x||_m,p
% subject to y = Ax
% This algorithm is based upon the Reweighted Least-squares method
%
% Copyright (c) Angshul Majumdar 2009
% Input
% A = N X d dimensional measurement matrix
% y = N dimens... |
github | rama055/Compressed-Sensing-master | l1_pd.m | .m | Compressed-Sensing-master/Compressed Sensing/code/FINAL/l1_pd.m | 3,848 | utf_8 | fea40d40562e7804306ffccd04a4edbc | % l1_pd.m
%
% Solve
% min_x ||x||_1 s.t. Ax = b
%
% Recast as linear program
% min_{x,u} sum(u) s.t. -u <= x <= u, Ax=b
% and use primal-dual interior point method
%
% Usage: xp = l1_pd(x0, A, b, pdtol, pdmaxiter)
%
% x0 - Nx1 vector, initial point.
%
% A - MxN matrix
% b - Mx1 vector of observatio... |
github | rama055/Compressed-Sensing-master | greed_omp_chol_SparseLabWrap.m | .m | Compressed-Sensing-master/Compressed Sensing/code/IT/GreedLab/OMP_algos/greed_omp_chol_SparseLabWrap.m | 1,720 | utf_8 | 00e1d59fdc4589755a9f03d6d7d9d3f8 | function [s, err_norm, iter_time]=greed_omp_chol_SparseLabWrap(A,Pt,x,m,s_initial,STOPCRIT,STOPTOL,MAXITER,verbose,comp_err,comp_time)
% Wrapper function for SparseLab SolveOMP algorithm
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Make P and Pt functions
%%... |
github | rama055/Compressed-Sensing-master | NUIRLS.m | .m | Compressed-Sensing-master/Compressed Sensing/code/Iterative re-weighted least squares/NUIRLS.m | 3,103 | utf_8 | 8852ea1fc78faa93d26fb136218b1b56 |
% NUIRLS Non-negative Under-determined Iteratively Reweighted Least
% Squares. Recover Non-negative minimum sparse Lp-norm, 0<=p<=1, solutions using
% Under-determined Iterative Reweighted Least Squares (UIRLS) in an
% Non-negative Matrix Factorisation framework.
%
% [X,objhistory,SNR] = NUIRLS(Y,PHI,p,NMFIter,... |
github | rama055/Compressed-Sensing-master | recovery.m | .m | Compressed-Sensing-master/Compressed Sensing/code/sparse matching pursuit/recovery.m | 5,530 | utf_8 | 03d2295a9337d1a6b607cdfc52f5ede1 | % [x1 time_secs] = recovery(type, x, matrix, recovery_sparsity)
%
% Performs a recovery experiment.
%
% type is the method of the recovery. Can be 'lp', 'tv', 'lp_positive',
% 'gpsr', 'countmin', 'countmin_positive', 'smp' or 'smp(<it>)' or
% 'smp(<it>,<lfactor>)' or 'smp(<it>,<lfactor>,<convergence... |
github | rama055/Compressed-Sensing-master | sparse_experiments_distributed_helper.m | .m | Compressed-Sensing-master/Compressed Sensing/code/sparse matching pursuit/sparse_experiments_distributed_helper.m | 577 | utf_8 | be8ef4b01693e326d27cadaafadb66a4 | % Runs the multiple attempts of a tespoint. Returns the fraction of successful decodings.
function fraction = sparse_experiments_distributed_helper(N, m, k, method, matrix, signaltype, epsilon, attempts)
init
if m == 0 || m < k
fraction = 0;
return;
end
if k == 0
fraction = 1;
return;
end
... |
github | rama055/Compressed-Sensing-master | gen_matrix.m | .m | Compressed-Sensing-master/Compressed Sensing/code/sparse matching pursuit/gen_matrix.m | 2,777 | utf_8 | d6c50afb62577a9f45157834db581114 | % gen_matrix(N, M, description) - Generates an MxN measurement matrix given N,
% M and a description string.
%
% Dispatches to Matrices/gen_matrix_<type> (see those files for descriptions).
%
% Currently recognized strings are:
% 'sparse<d>' (e.g. 'sparse8', 'sparse16')
% Random binary spar... |
github | rama055/Compressed-Sensing-master | gen_signal.m | .m | Compressed-Sensing-master/Compressed Sensing/code/sparse matching pursuit/gen_signal.m | 1,012 | utf_8 | ac664e192f9be5b458df7cfddf72c333 | % gen_signal(N, description) - Generates a signal of size N, sparsity K, given
% a description string.
%
% Currently recognized strings are:
% 'plus_minus_one_peaks' - signal has K peaks of value +/-1
% 'plus_one_peaks' - K peaks of value +1
% 'gaussian_peaks' - K peaks of random gaussian values... |
github | rama055/Compressed-Sensing-master | recover_countmin_positive.m | .m | Compressed-Sensing-master/Compressed Sensing/code/sparse matching pursuit/recover_countmin_positive.m | 769 | utf_8 | 63828b4a55e3f338f854853d9c633ea0 | % x1 = recover_countmin_positive(matrix, b)
%
% Performs a count-min sketch recovery when the signal is known to be
% non-negative. Takes the minimum value in each bucket.
%
% N is the size of the signal
% matrix is the matrix
% b is the vector of measurements
%
% Written by Radu Berinde, MIT, Ja... |
github | rama055/Compressed-Sensing-master | load_image.m | .m | Compressed-Sensing-master/Compressed Sensing/code/sparse matching pursuit/load_image.m | 920 | utf_8 | f8b369ead94cfb1e8df2604530b0f4f0 | % image = load_image(name) - Loads the image with the given name, no wavelet.
%
% image = load_image(name, wavelet, wavelevel) - Loads the image with the given
% name, applies given wavelt at wavelevl. Uses 'per' dwtmode.
%
% image = load_image(name, wavelet, wavelevel, dwtmode) - Loads the image with
% t... |
github | rama055/Compressed-Sensing-master | image_test.m | .m | Compressed-Sensing-master/Compressed Sensing/code/sparse matching pursuit/image_test.m | 858 | utf_8 | 64d3759484c8e44aa7082e689bd21494 | % image_test - performs some tests on an image, change parameters inside script.
% image_test(true) - performs tests but skips tests for which output files
% already exist.
% Written by Radu Berinde, MIT, Jan. 2008
function image_test(skip_done)
if nargin < 1
skip_done = false;
end
image = load_im... |
github | rama055/Compressed-Sensing-master | sparse_experiments_distributed.m | .m | Compressed-Sensing-master/Compressed Sensing/code/sparse matching pursuit/sparse_experiments_distributed.m | 2,038 | utf_8 | c674daa2032f250dc4be0c328e5877fe | % Performs experiments with truly sparse vectors; useful to get a sparsity vs
% measurements probability of success plot.
%
% DCT variant to be run on a cluster.
%
% Written by Radu Berinde, MIT, 2008
function sparse_experiments_distributed(matrix, method, signaltype, extraname)
init
if nargin < 2
me... |
github | rama055/Compressed-Sensing-master | sparse_experiments.m | .m | Compressed-Sensing-master/Compressed Sensing/code/sparse matching pursuit/sparse_experiments.m | 2,174 | utf_8 | 89fb602383927efe527007c891bd1a91 | % Performs experiments with truly sparse vectors; useful to get a sparsity vs
% measurements probability of success plot.
%
% Written by Radu Berinde, MIT, 2008
function sparse_experiments(matrix, method, signaltype, extraname)
init
if nargin < 2
method = 'lp';
end
if nargin < 3
signaltype = 'pl... |
github | rama055/Compressed-Sensing-master | gen_sparse_signal.m | .m | Compressed-Sensing-master/Compressed Sensing/code/sparse matching pursuit/gen_sparse_signal.m | 490 | utf_8 | aa2984eda586d1f3775c5d912ca4aef9 | % generates a sparse signal of size 1xN, with num_peaks +/-1 peaks and
% (optional) additive gaussian noise of stdev noise_magnitude
%
% Written by Radu Berinde, MIT, Jan. 2008
function [signal] = gen_sparse_signal(N, num_peaks, noise_magnitude)
if (nargin < 3) noise_magnitude = 0; end;
if (num_peaks > N)
nu... |
github | rama055/Compressed-Sensing-master | sparse_experiments_plot.m | .m | Compressed-Sensing-master/Compressed Sensing/code/sparse matching pursuit/sparse_experiments_plot.m | 1,224 | utf_8 | ecb1ca535ebc7af960e756eecab06681 | % Generates a recovery probability plot from the ouput of sparse_experiments.
% matrix - the type of matrix, used to generate the filename (see below).
% Written by Radu Berinde, MIT, Jan. 2008
function sparse_experiments_plot(matrix, method, signaltype, extraname)
if nargin < 2
method = 'lp';
end
... |
github | rama055/Compressed-Sensing-master | smp.m | .m | Compressed-Sensing-master/Compressed Sensing/code/sparse matching pursuit/smp.m | 1,132 | utf_8 | 99418990e89752a1dad53823962cca67 | % x = smp(matrix, b, l, T)
% Sparse Matching Pursuit algorithm - recover a vector from the sketch b and
% given measurement matrix; use T iterations and l recovery sparsity.
%
% convergence_factor is optional. If given and greater than 0, the algorithm
% limits the norm of the increment at each iteration to at mos... |
github | rama055/Compressed-Sensing-master | image_experiment.m | .m | Compressed-Sensing-master/Compressed Sensing/code/sparse matching pursuit/image_experiment.m | 3,289 | utf_8 | 094f88b8cfb101bb1fe0a2a6c94be80f | % [J, WcOut, description] = image_experiment(type, image, M, matrix_type, save_output, skip_done)
%
% Performs an image experiment
% type is 'lp' or 'tv
%
% image contains image.name, image.wavelet, image.wavelevel, image.I,
% image.Wc, image.Wl
%
% M is the number of measurement... |
github | rama055/Compressed-Sensing-master | sparsify_slow.m | .m | Compressed-Sensing-master/Compressed Sensing/code/sparse matching pursuit/Util/sparsify_slow.m | 472 | utf_8 | 57a9ed608282d2df0fded61f7ddf5e02 | % retains only the K elephants of signal S
% Written by Radu Berinde, MIT, Jan. 2008
function [res] = sparsify_slow(S, K)
N = length(S);
T = sort(abs(S), 'descend');
kval = T(K);
res = S;
for i = 1:N
if abs(res(i)) < kval
res(i) = 0;
end
end
l0 = nnz(res);
if l0 == K
return;
end
... |
github | rama055/Compressed-Sensing-master | gen_matrix_hadamard.m | .m | Compressed-Sensing-master/Compressed Sensing/code/sparse matching pursuit/Matrices/gen_matrix_hadamard.m | 570 | utf_8 | b57650c04a0144feae1ad151b2037086 | % generates a scrambled Hadamard "matrix" of M measurements
% Written by Radu Berinde, MIT, Jan. 2008
function matrix = gen_matrix_hadamard(N, M, arg1_unused, arg2_unused)
if N ~= round(2^round(log2(N)))
error('N should be a power of 2 for Hadamard matrices.');
end
matrix.N = N;
matrix.M = M;
matrix... |
github | rama055/Compressed-Sensing-master | gen_matrix_countmin_implicit_twowise.m | .m | Compressed-Sensing-master/Compressed Sensing/code/sparse matching pursuit/Matrices/gen_matrix_countmin_implicit_twowise.m | 1,455 | utf_8 | a9b4d28127ce840b6ad96a4acc09c6d4 | % An implicit version of the 2-independent universal hashing matrix (see
% gen_matrix_countmin_twowise). The hash parameters are stored, and the hash is
% recomputed when needed rather than storing the entire matrix.
%
% Written by Radu Berinde, MIT, 2008
function matrix = gen_matrix_countmin_twowise(N, M, D, ar... |
github | rama055/Compressed-Sensing-master | At_fw.m | .m | Compressed-Sensing-master/Compressed Sensing/code/sparse matching pursuit/Matrices/At_fw.m | 699 | utf_8 | c84f17fccb181e2a19e07d0c4115b374 | % At_fw.m
%
% Adjoint for "scrambled Fast Walsh" measurements for wavelet sparse signals.
%
% Usage: x = At_fw(b, OMEGA, idx, P)
%
% b - K length measurement vector
%
% OMEGA - K vector denoting which Walsh coefficients to use
%
% idx - Permutation vector for Walsh transform
%
% P - Permutation to apply to the input ve... |
github | rama055/Compressed-Sensing-master | A_fw.m | .m | Compressed-Sensing-master/Compressed Sensing/code/sparse matching pursuit/Matrices/A_fw.m | 604 | utf_8 | 6d7ecd1724b2090ca97ffe7125dc58b0 | % A_fw.m
%
% Takes "scrambled Fast Walsh" measurements
%
% Usage: b = A_fw(w, OMEGA, idx, P)
%
% w - N length signal vector
%
% b - K vector
%
% OMEGA - K vector denoting which Walsh coefficients to use
%
% idx - Permutation vector for Walsh transform
%
% P - Permutation to apply to the input vector.
%
% Written by: Ma... |
github | rama055/Compressed-Sensing-master | gen_matrix_gaussian.m | .m | Compressed-Sensing-master/Compressed Sensing/code/sparse matching pursuit/Matrices/gen_matrix_gaussian.m | 296 | utf_8 | 91b13f34ccbc9786c9d052bea31635d3 | % generates a Gaussian matrix of M measurements
% Written by Radu Berinde, MIT, Jan. 2008
function matrix = gen_matrix_gaussian(N, M, arg1_unused, arg2_unused)
matrix.N = N;
matrix.M = M;
matrix.A = randn(M, N);
matrix.Afun = @(z) matrix.A * z;
matrix.Atfun = @(z) matrix.A' * z;
|
github | rama055/Compressed-Sensing-master | gen_matrix_fourier.m | .m | Compressed-Sensing-master/Compressed Sensing/code/sparse matching pursuit/Matrices/gen_matrix_fourier.m | 445 | utf_8 | 8515966afd65aad7bb7113859563968b | % generates a scrambled Fourier "matrix" of M measurements
% Written by Radu Berinde, MIT, Jan. 2008
function matrix = gen_matrix_fourier(N, M, arg1_unused, arg2_unused)
matrix.N = N;
matrix.M = M;
matrix.P = randperm(N);
matrix.OMEGA = randperm(N);
matrix.OMEGA = matrix.OMEGA(1:M/2);
addpath l1magic/M... |
github | rama055/Compressed-Sensing-master | gen_matrix_sparse.m | .m | Compressed-Sensing-master/Compressed Sensing/code/sparse matching pursuit/Matrices/gen_matrix_sparse.m | 1,187 | utf_8 | f9aba9332be5e27124716dc39b62c096 | % generates a binary sparse matrix of M lines, N columns, and D 1s on each column
% Written by Radu Berinde, MIT, Jan. 2008
function matrix = gen_matrix_sparse(N, M, D, arg2_unused)
if D >= M
disp('Warning: D should be smaller than M!!');
D = round(M/2) + 1;
disp(sprintf('Changing D to %d', D));
... |
github | rama055/Compressed-Sensing-master | gen_matrix_countmin_twowise.m | .m | Compressed-Sensing-master/Compressed Sensing/code/sparse matching pursuit/Matrices/gen_matrix_countmin_twowise.m | 1,729 | utf_8 | 649cdaf69c94632177fe733d786a0ba1 | % Generates a binary sparse matrix of M lines, N columns, and D 1s on each
% column corresponding to a count-min sketch of M/D buckets; D should divide M
% (the code works without this constraint, but the last (M mod D) rows are
% wasted). The matrix is divided row-wise into D sections, each section having
% exactl... |
github | rama055/Compressed-Sensing-master | randint.m | .m | Compressed-Sensing-master/Compressed Sensing/code/sparse matching pursuit/Matrices/randint.m | 283 | utf_8 | 9cd6c10a1755b05ea7d12729c47be42a | % Generates a random integer matrix, with integers in the [Range(1) Range(2)]
% interval.
function out = rand(N, M, Range)
if (Range(2) < Range(1))
error('Range(2) should be >= Range(1)');
end
out = ones(N, M) * Range(1) + floor(rand(N, M) * (Range(2)-Range(1)+1));
|
github | rama055/Compressed-Sensing-master | gen_matrix_sparseplusminus.m | .m | Compressed-Sensing-master/Compressed Sensing/code/sparse matching pursuit/Matrices/gen_matrix_sparseplusminus.m | 806 | utf_8 | 8c20efd6414abc613dfbf468cf6fc00c | % generates a (+1, -1, 0) sparse matrix of M lines, N columns, and D +/-1s on each
% column Written by Radu Berinde, MIT, Jan. 2008
function matrix = gen_matrix_sparseplusminus(N, M, D, arg2_unused)
matrix.N = N;
matrix.M = M;
L = zeros(1, N*D);
C = zeros(1, N*D);
disp([ 'Creating matrix for M = ' num2st... |
github | rama055/Compressed-Sensing-master | gen_matrix_std.m | .m | Compressed-Sensing-master/Compressed Sensing/code/sparse matching pursuit/Matrices/gen_matrix_std.m | 1,284 | utf_8 | 61447e03fda3db8af73ccedc4cd1bd7a | % Written by Radu Berinde, Mar. 2008
% Based on code by Raghu Kainkaryami
%
% Needs to be updated
function matrix = gen_matrix_std(N, M, D, arg2_unused)
if mod(M, D) ~= 0
disp('WARNING: D does not divide M');
end
matrix.N = N;
matrix.M = M;
matrix.D = D;
B = floor(M/D);
matrix.B = B;
if D >... |
github | rama055/Compressed-Sensing-master | gen_matrix_countmin_threewise.m | .m | Compressed-Sensing-master/Compressed Sensing/code/sparse matching pursuit/Matrices/gen_matrix_countmin_threewise.m | 1,771 | utf_8 | b87d772bac82518ac3067b902703dad4 | % Generates a binary sparse matrix of M lines, N columns, and D 1s on each
% column corresponding to a count-min sketch of M/D buckets; D should divide M
% (the code works without this constraint, but the last (M mod D) rows are
% wasted). The matrix is divided row-wise into D sections, each section having
% exactl... |
github | rama055/Compressed-Sensing-master | gen_matrix_countmin.m | .m | Compressed-Sensing-master/Compressed Sensing/code/sparse matching pursuit/Matrices/gen_matrix_countmin.m | 1,494 | utf_8 | 1e5a7afec9ccb6f16616da16be3f88e2 | % Generates a binary sparse matrix of M lines, N columns, and D 1s on each
% column corresponding to a count-min sketch of M/D buckets; D should divide M
% (the code works without this constraint, but the last (M mod D) rows are
% wasted). The matrix is divided row-wise into D sections, each section having
% exactl... |
github | tinghuiz/appearance-flow-master | classification_demo.m | .m | appearance-flow-master/caffe/matlab/demo/classification_demo.m | 5,412 | utf_8 | 8f46deabe6cde287c4759f3bc8b7f819 | function [scores, maxlabel] = classification_demo(im, use_gpu)
% [scores, maxlabel] = classification_demo(im, use_gpu)
%
% Image classification demo using BVLC CaffeNet.
%
% IMPORTANT: before you run this demo, you should download BVLC CaffeNet
% from Model Zoo (http://caffe.berkeleyvision.org/model_zoo.html)
%
% *****... |
github | kelvins/Reconhecimento-Facial-master | discWaveletTransform2D.m | .m | Reconhecimento-Facial-master/Other/Matlab/discWaveletTransform2D.m | 569 | utf_8 | 0c5770285668f4b73e52d5eda5d425d9 |
function newImage = discWaveletTransform2D(image, level, wname)
% Clear all variables and close all windows
clear vars;
close all;
% Apply the discrete 2D wavelet transform
% Note: uses only the LL result to transform
for i=1:level
[img, LH, HL, HH] = dwt2(image, wname);
end ... |
github | abatz/MATLAB-master | notBoxPlot2.m | .m | MATLAB-master/FUNCTIONS/notBoxPlot2.m | 6,941 | utf_8 | 678e2963bd72bf13f44acd24670e070b | function varargout=notBoxPlot2(y,x,jitter,style,symbols,fc)
% notBoxPlot - Doesn't plot box plots!
%
% function notBoxPlot(y,x,jitter,style)
%
%
% Purpose
% An alternative to a box plot, where the focus is on showing raw
% data. Plots columns of y as different groups located at points
% along the x axis define... |
github | abatz/MATLAB-master | organizedaily.m | .m | MATLAB-master/CLASSES/organizedaily.m | 1,428 | utf_8 | 52881e0690940cae2a87f535728b632b | function [dataout]=organizedata(day,month,year,data);
% function [dataout]=organizedata(day,month,year,data);
% organizes data into matrix of data organized by day of year and year
doy=dayofyear_fixed(year,month,day);
dataout=NaN*ones(366,max(year)-min(year)+1);
minyear=min(year);
for i=1:366
f=find(doy==i);
dataout(... |
github | abatz/MATLAB-master | organizedata.m | .m | MATLAB-master/CLASSES/organizedata.m | 1,428 | utf_8 | 52881e0690940cae2a87f535728b632b | function [dataout]=organizedata(day,month,year,data);
% function [dataout]=organizedata(day,month,year,data);
% organizes data into matrix of data organized by day of year and year
doy=dayofyear_fixed(year,month,day);
dataout=NaN*ones(366,max(year)-min(year)+1);
minyear=min(year);
for i=1:366
f=find(doy==i);
dataout(... |
github | abatz/MATLAB-master | lineartrend.m | .m | MATLAB-master/CLASSES/lineartrend.m | 11,193 | utf_8 | ed7f2c204255e4bc3265c3fc25505b49 | function [TREND,tval]=lineartrend(DATA,pvalue);
% function [TREND,tval]=lineartrend(DATA,pvalue);
% calculates TREND and significance of a time series. Trend is reported
% in units per time unit, significance = 1 if trend is significant, 0 if
% not significant at p<pvalue
d1=squeeze(DATA);
D4=1:length(d1);D... |
github | abatz/MATLAB-master | thornPET.m | .m | MATLAB-master/CLASSES/thornPET.m | 1,027 | utf_8 | 6aa3e9a0a57edf3546ce23556a15fd47 | function [PET]=thornPET(T,lat);
%function [PET]=thornPET(T,lat);
% function estimates monthly potential evapotranspiration using the Thorthwaitte method
% requires monthly data (12-months) and latitude of observation (to deduce day length)
% function returns monthly PET in units of mm
f=find(T<0);T(f)=0;
I=zeros(12,le... |
github | developmentseed/caffe-master | classification_demo.m | .m | caffe-master/matlab/demo/classification_demo.m | 5,412 | utf_8 | 8f46deabe6cde287c4759f3bc8b7f819 | function [scores, maxlabel] = classification_demo(im, use_gpu)
% [scores, maxlabel] = classification_demo(im, use_gpu)
%
% Image classification demo using BVLC CaffeNet.
%
% IMPORTANT: before you run this demo, you should download BVLC CaffeNet
% from Model Zoo (http://caffe.berkeleyvision.org/model_zoo.html)
%
% *****... |
github | ruishihan/R7-with-notes-master | FCCH_fine_correction.m | .m | R7-with-notes-master/src/host/matlab/FCCH_fine_correction.m | 7,244 | utf_8 | e3c8ff20e67799d2a2ad2cd8f96f91dc | % Jiao Xianjun (putaoshu@msn.com; putaoshu@gmail.com)
% GSM FCCH fine synchronization
% A script of project: https://github.com/JiaoXianjun/multi-rtl-sdr-calibration
function [FCCH_pos, r, sampling_ppm, carrier_ppm] = FCCH_fine_correction(s, base_position, oversampling_ratio, carrier_freq)
disp(' ');
r = -1;
FCCH_pos... |
github | ruishihan/R7-with-notes-master | SCH_demod.m | .m | R7-with-notes-master/src/host/matlab/SCH_demod.m | 4,715 | utf_8 | be3c9e919f96d7a2ac294b6a0e94c856 | % Jiao Xianjun (putaoshu@msn.com; putaoshu@gmail.com)
% GSM SCH demodulator
% A script of project: https://github.com/JiaoXianjun/multi-rtl-sdr-calibration
function SCH_demod(s, pos_info, training_sequence, oversampling_ratio)
disp(' ');
if pos_info==-1
disp('SCH demod: Warning! No valid position information!');
... |
github | ruishihan/R7-with-notes-master | raw2iq.m | .m | R7-with-notes-master/src/host/matlab/raw2iq.m | 344 | utf_8 | 6c53e8427e32926270da78eae38bc2ce | % Jiao Xianjun (putaoshu@msn.com; putaoshu@gmail.com)
% convert original uint8 data captured by rtl_sdr to double complex data.
% all variable are assumed to be column vector
function b = raw2iq(a)
c = a(1:2:end,:) + 1i.*a(2:2:end,:);
% c = a(2:2:end,:) + 1i.*a(1:2:end,:); % swap
b = c; %c- kron(ones(size(c,1),1), ( s... |
github | ruishihan/R7-with-notes-master | specific_fft_snr_fix_avg.m | .m | R7-with-notes-master/src/host/matlab/specific_fft_snr_fix_avg.m | 1,115 | utf_8 | 366f3170fe3fd015ef97829e0bf662cd | % Jiao Xianjun (putaoshu@msn.com; putaoshu@gmail.com)
% Find out FCCH location by moving FFT, peak averaging, Peak-to-Average-Ratio monitoring around a specific location.
% A script of project: https://github.com/JiaoXianjun/multi-rtl-sdr-calibration
function [hit_flag, hit_idx, hit_snr] = specific_fft_snr_fix_avg(s, ... |
github | ruishihan/R7-with-notes-master | move_fft_snr_runtime_avg.m | .m | R7-with-notes-master/src/host/matlab/move_fft_snr_runtime_avg.m | 1,473 | utf_8 | 39a899771e43ede499b9840d7f49b496 | % Jiao Xianjun (putaoshu@msn.com; putaoshu@gmail.com)
% Find out FCCH location by moving FFT, peak averaging, Peak-to-Average-Ratio monitoring.
% A script of project: https://github.com/JiaoXianjun/multi-rtl-sdr-calibration
function [hit_flag, hit_idx, hit_avg_snr, hit_snr] = move_fft_snr_runtime_avg(s, mv_len, fft_le... |
github | ruishihan/R7-with-notes-master | SCH_corr_rate_correction.m | .m | R7-with-notes-master/src/host/matlab/SCH_corr_rate_correction.m | 6,503 | utf_8 | 1cb56c5c0b2123a62fccf5b4449b2ee5 | % Jiao Xianjun (putaoshu@msn.com; putaoshu@gmail.com)
% Estimate sampling rate error and carrier frequency error and compansate them according to GSM SCH detection.
% A script of project: https://github.com/JiaoXianjun/multi-rtl-sdr-calibration
function [pos_info, r, sampling_ppm] = SCH_corr_rate_correction(s, FCCH_po... |
github | ruishihan/R7-with-notes-master | FCCH_coarse_position.m | .m | R7-with-notes-master/src/host/matlab/FCCH_coarse_position.m | 3,239 | utf_8 | 84a8126e7fa7637a1ab1309d2a5943c7 | % Jiao Xianjun (putaoshu@msn.com; putaoshu@gmail.com)
% Find out coarse sample index of beginning of GSM FCCH
% A script of project: https://github.com/JiaoXianjun/multi-rtl-sdr-calibration
function [position, snr] = FCCH_coarse_position(s, decimation_ratio)
disp(' ');
position = -1;
snr = -1;
num_sym_per_slot = 625/... |
github | ruishihan/R7-with-notes-master | gsm_normal_training_sequence_gen.m | .m | R7-with-notes-master/src/host/matlab/gsm_normal_training_sequence_gen.m | 3,129 | utf_8 | 2f5aa64c2f9ce7f755f8aed7a391b01d | % Jiao Xianjun (putaoshu@msn.com; putaoshu@gmail.com)
% Generate 8 normal training sequences according to GSM spec
% A script of project: https://github.com/JiaoXianjun/multi-rtl-sdr-calibration
function s = gsm_normal_training_sequence_gen(oversampling_ratio)
filename = ['gsm_normal_training_sequence_' num2str(oversa... |
github | ruishihan/R7-with-notes-master | carrier_correct_post_SCH.m | .m | R7-with-notes-master/src/host/matlab/carrier_correct_post_SCH.m | 5,591 | utf_8 | b503a0731b5dc5b460cb7610ef609e30 | % Jiao Xianjun (putaoshu@msn.com; putaoshu@gmail.com)
% Estimate carrier frequency error and compansate it.
% A script of project: https://github.com/JiaoXianjun/multi-rtl-sdr-calibration
function [r, carrier_ppm] = carrier_correct_post_SCH(s, pos_info, oversampling_ratio, carrier_freq)
disp(' ');
r = -1;
carrier_ppm... |
github | ruishihan/R7-with-notes-master | gsm_SCH_training_sequence_gen.m | .m | R7-with-notes-master/src/host/matlab/gsm_SCH_training_sequence_gen.m | 3,638 | utf_8 | cd075c8e0e3020582307ce251cf1dd65 | % Jiao Xianjun (putaoshu@msn.com; putaoshu@gmail.com)
% Generate GSM SCH channel training sequences according to GSM spec
% A script of project: https://github.com/JiaoXianjun/multi-rtl-sdr-calibration
function s = gsm_SCH_training_sequence_gen(oversampling_ratio)
filename = ['gsm_SCH_training_sequence_' num2str(overs... |
github | unrealcv/unrealcv-master | request.m | .m | unrealcv-master/client/matlab/request.m | 1,704 | utf_8 | dc77610b5d289510b05a83240c04e975 | function response = request(cmd)
% import java.io.*
global client_socket;
if isempty(client_socket)
connect();
end
send_message(client_socket, cmd)
message = [];
while isempty(message) % Set timeout
message = read_message(client_socket);
% fprintf('Got response %s\n',... |
github | unrealcv/unrealcv-master | connect.m | .m | unrealcv-master/client/matlab/connect.m | 1,334 | utf_8 | 1670e3e1400fcaf5e8d1305b68f97941 | function connect(host, port)
import java.net.Socket
if nargin == 0
host = 'localhost';
port = 9000;
end
fprintf('Try connecting to %s:%d\n', ...
host, port);
global client_socket;
if ~isempty(client_socket)
client_socket.close
end
client_socket = Socket(... |
github | vcheplygina/mil-master | find_positive.m | .m | mil-master/find_positive.m | 691 | utf_8 | e2688963e1736635706469cc0b5870fc | %FIND_POSITIVE Find objects labeled positive
%
% [I1,I2] = FIND_POSITIVE(A)
%
% INPUT
% A MIL dataset
%
% OUTPUT
% I1 Indices of the objects labeled 'positive'
% I2 Indices of the objects labeled 'negative'
%
% SEE ALSO
% ISPOSITIVE,GETBAGS
% Copyright: D.M.J. Tax, D.M.J.T... |
github | vcheplygina/mil-master | gendatbirds.m | .m | mil-master/gendatbirds.m | 4,322 | utf_8 | 7351af8b0dd284a2221adb3abc192265 | %GENDATBIRDS Bird song MIL problem
%
% A = GENDATBIRDS(NR)
%
% INPUT
% NR Target class (default = 1)
%
% OUTPUT
% A MIL dataset
%
% DESCRIPTION
% Define the MIL problem of identifying bird songs. This is a
% multi-class problem. Each bag is a recording of one or more birds. The
% bag inher... |
github | vcheplygina/mil-master | milmerge.m | .m | mil-master/milmerge.m | 1,796 | utf_8 | c84c2d8768da4f6b012e3a3f91669b2e | %MILMERGE Merge two MIL datasets
%
% C = MILMERGE(A,B)
%
% INPUT
% A,B MIL dataset
%
% OUTPUT
% C MIL dataset
%
% DESCRIPTION
% Concatenate two MIL datasets, taking care that the bag identifiers are
% not clashing. When the bag identifiers in dataset A and B are
% somewhere equal, bag identifiers are ... |
github | vcheplygina/mil-master | floydtransform.m | .m | mil-master/floydtransform.m | 1,402 | utf_8 | 88f9c5b650ea390306f2e6e9ab8f0fb3 | % FLOYDTRANSFORM Transforms adjacency matrix into shortest path matrix
%
% SP = FLOYDTRANSFORM(A)
%
% INPUT
% A Adjaciency matrix
%
% OUTPUT
% SP Matrix containing the shortest path distance
%
% DESCRIPTION
% If there is a path between nodes i and j, SP_ij will contain the
% length of th... |
github | vcheplygina/mil-master | mildisp.m | .m | mil-master/mildisp.m | 821 | utf_8 | abe37ee98e7b040376ea841332902a09 | %MILDISP Display MIL dataset
%
% MILDISP(X)
%
% Display MIL dataset characteristics
% Copyright: D.M.J. Tax, D.M.J.Tax@prtools.org
% Faculty EWI, Delft University of Technology
% P.O. Box 5031, 2600 GA Delft, The Netherlands
function mildisp(x)
if hasmilbags(x)
%copymethod should be defined
%copymethod = getmili... |
github | vcheplygina/mil-master | logexploss.m | .m | mil-master/logexploss.m | 610 | utf_8 | 180d5a99201e71d8869e5075926592d9 | % [L,dL] = logexploss(w,x,y,A)
%
% The asymmetric Logistic-Exponential loss, used to optimize the
% precision for a linear classifier. W encodes the weights of the linear
% classifier, X,Y and the data and labels (+1 or -1), and A is the
% trade-off value between the exponential loss and the logistic loss.
function [L... |
github | vcheplygina/mil-master | splitseq2mil.m | .m | mil-master/splitseq2mil.m | 1,757 | utf_8 | 39621a252c8ff7f40cb78ced8b4565ef | %SPLITSEQ2MIL Split sequence to MIL dataset
%
% [Y,BAGLAB] = SPLITSEQ2MIL(X,N,DELTAT)
%
% INPUT
% X Data matrix or dataset
% N Length of subsequence
% DELTAT Time step
%
% OUTPUT
% Y Data matrix with subsequences
% BAGLAB Label per sequence
%
% DESCRIPTION
% Consider each row i... |
github | vcheplygina/mil-master | mil_spkernel.m | .m | mil-master/mil_spkernel.m | 3,077 | utf_8 | 52782e6a18fdd9ec4457d4d844c3ceb7 | %MIL_SPKERNEL Shortest path kernel
%
% K = MIL_SPKERNEL(V1, V2, E1, E2, NODEPAR, EDGEPAR, ALPHA)
%
% Shortest path kernel between two graphs. The graphs need to be
% transformed to shortest path graphs prior to computation. The kernel then
% basically computes the random walk kernel for walks of length 1.
%... |
github | vcheplygina/mil-master | miles.m | .m | mil-master/miles.m | 4,411 | utf_8 | 6b2d1218b4a641ac85fc3e0527dbc7ff | %MILES MultiInstance Learning in Embedded Subspaces
%
% W = MILES(A,C,KTYPE,KPAR)
%
% INPUT
% A MIL dataset
% C Tradeoff parameter (default = 1)
% KTYPE Kernel type (default = 'r')
% KPAR Kernel parameter (default = 5)
%
% OUTPUT
% W MILES classifier
%
% DESCRIPTION
% Train the MILES... |
github | vcheplygina/mil-master | milmissingvalues.m | .m | mil-master/milmissingvalues.m | 1,715 | utf_8 | ddfaa429433a3357f56510fd28d8f0d4 | %MISSINGVALUES Fix the missing values in a dataset
%
% [Y,MSG] = MILMISSINGVALUES(X,VAL)
%
% INPUT
% X Dataset
% VAL String or value
%
% OUTPUT
% Y Dataset
% MSG String
%
% DESCRIPTION
% Fix the missing values (represented by NaN's) in dataset X. String MSG
% gives a text message of... |
github | vcheplygina/mil-master | pposterior_mil.m | .m | mil-master/pposterior_mil.m | 2,615 | utf_8 | 534dd5eb558006c9514299022e9ffc00 | %PPOSTERIOR_MIL
%
% W = PPOSTERIOR_MIL(A,FRAC,N,NRP)
%
% INPUT
% A MIL dataset
% FRAC Fraction of positive instances (default = 'presence')
% N Number of words (default = 30)
% NRP Number of degrees to try (default = 10)
%
% OUTPUT
% W Pposterior MIL classifier
%
% DESCRIPTION
% Train a p... |
github | vcheplygina/mil-master | inc_spec_mil.m | .m | mil-master/inc_spec_mil.m | 3,538 | utf_8 | 6679afdb1762a5a537021263fd708b18 | %INC_SPEC_MIL Incrementally Specializing MIL
%
% W = INC_SPEC_MIL(A, FRAC, W_U, REDUCEFRAC, LABELTONEGATIVE)
%
% INPUT
% A MIL dataset
% FRAC Fraction of instances that should be positive
% (default = 0.1)
% W_U Untrained mapping (default = ldc)
% REDUCEFRAC Frac... |
github | vcheplygina/mil-master | createmildatafile.m | .m | mil-master/createmildatafile.m | 2,081 | utf_8 | 936d4b4ba6b6e5d1cfc0d8faa9aa336e | %CREATEMILDATAFILE
%
% CREATEMILDATAFILE(INDIR,OUTDIR)
%
% INPUT
% INDIR Directory containing class directories with files
% OUTDIR Directory containing files suitable for 'prdatafile'
%
% DESCRIPTION
% Create a directory full of data that can be read by Prtools as a
% 'half-baked' datafile. The INDIR d... |
github | vcheplygina/mil-master | rmmilinfo.m | .m | mil-master/rmmilinfo.m | 1,002 | utf_8 | 77e4ca633124d02686cc02f9e26f93ba | %RMMILINFO Remove MIL info from dataset
%
% A = RMMILINFO(A,FIELD)
%
% INPUT
% A MIL dataset
% FIELD Field name
%
% OUTPUT
% A MIL dataset
%
% DESCRIPTION
% Remove the MIL meta data that may be present in dataset A.
% Possible FIELDs are defined in setmilinfo.m
%
%SEE ALSO
% SETMILINFO, GET... |
github | vcheplygina/mil-master | milroc.m | .m | mil-master/milroc.m | 3,691 | utf_8 | 76fe01039ff2e9c9fc5d8bd9aa09773d | %MILROC Receiver Operating Characteristic curve
%
% [E, THR] = MILROC(A,W)
%
% INPUT
% A MIL-set
% W MIL-classifier
%
% OUTPUT
% E Structure containing the ROC curve
% THR Vector containing the threshold values
%
% DESCRIPTION
% Computation of the ROC curve over the output of MIL-dataset A af... |
github | vcheplygina/mil-master | gendattrec.m | .m | mil-master/gendattrec.m | 1,570 | utf_8 | f85dca14743d4f0a8206f57e5d24e6ac | %GENDATANDREWS TREC datasets used by Andrews
%
% A = GENDATTREC(CLASSNR)
%
% INPUT
% CLASSNR Positive class (default = 1)
%
% OUTPUT
% A MIL dataset
%
% DESCRIPTION
% This dataset originates from http://www.cs.columbia.edu/~andrews/mil/datasets.html
% There are 7 possible classes to cho... |
github | vcheplygina/mil-master | milproxm.m | .m | mil-master/milproxm.m | 11,423 | utf_8 | 481ce4871d07c2854818958ba9205492 | %MILPROXM MIL proximity mapping
%
% W = MILPROXM(A,KTYPE,KPAR, INSTPROXM);
%
% INPUT
% A MIL dataset
% KTYPE Kernel/proximity type (default = 'h')
% KPAR Kernel parameter (default = [])
% INSTPROXM
%
% OUTPUT
% W MIL proximity mapping
%
% DESCRIPTION
% Definition of a proximity mapping... |
github | vcheplygina/mil-master | milesvector.m | .m | mil-master/milesvector.m | 3,366 | utf_8 | 264264aa5254ed018c9dd1c4cce33581 | %MILESPROXM MILES inspired vector representation of a bag
%
% W = MILESPROXM(X,RTYPE,PAR,PROTOSEL)
%
% INPUT
% X MIL dataset
% RTYPE Method for obtaining a vector from a bag
% (default = 'rbf')
% PAR Parameter of the method (default = [])
% PROTOSEL Reduce... |
github | vcheplygina/mil-master | milfnfp.m | .m | mil-master/milfnfp.m | 758 | utf_8 | ff72188a0d0d4cba62b600980b52eed9 | %MILFNFP Compute the false negative, false positive fraction
%
% ERR = MILFNFP(Z,W)
%
% INPUT
% Z MIL dataset
% W MIL mapping
%
% OUTPUT
% ERR vector containing the FN and FP rate
%
% DESCRIPTION
% Compute the false negative and false positive rate for MIL dataset Z
% after it is mapped by W.
%
%... |
github | vcheplygina/mil-master | gendatmutagen.m | .m | mil-master/gendatmutagen.m | 2,238 | utf_8 | 8cd813d72f1f947f28543ff0abdbcfd0 | %GENDATMUTAGEN Mutagenesis datasets
%
% A = GENDATMUTAGEN(DIFF)
%
% INPUT
% DIFF Difficulty of dataset (default = 'easy')
%
% OUTPUT
% A MIL dataset
%
% DESCRIPTION
% Define the multi-instance learning problem Mutagenesis, a drug
% activity prediction problem. DIFF indicates the diffic... |
github | vcheplygina/mil-master | labelset.m | .m | mil-master/labelset.m | 2,176 | utf_8 | 05faa896cea3491a72f19bcaa4a42c3a | %LABELSET Derive label from set of labels
%
% NLAB = LABELSET(NLABS,COMBRULE)
%
% INPUT
% NLABS Numerical instance labels
% COMBRULE Method to derive bag labels from instance labels
%
% OUTPUT
% NLAB New numeric label (for a bag)
%
% DESCRIPTION
% Derive the numberic label NLAB from a set of... |
github | vcheplygina/mil-master | mil_graphkernel.m | .m | mil-master/mil_graphkernel.m | 690 | utf_8 | 108d984479b4911f3443e33047ebf145 | %MIL_GRAPHKERNEL miGraph kernel between bags
%
% K = MIL_GRAPHKERNEL(BAG1,BAG2,W1,W2,GAMMA)
%
% Compute the miGraph kernel between BAG1 and BAG2, where a weighted sum
% of the RBF kernel values between all instances in BAG1 and BAG2 is
% taken. The weights per bag instance is defined by W1 and W2, the
% sigma-para... |
github | vcheplygina/mil-master | positive_class.m | .m | mil-master/positive_class.m | 1,738 | utf_8 | 4715590d27a6a6812bed29d3d747951b | %POSITIVE_CLASS Define the positive class
%
% B = POSITIVE_CLASS(A,CLASSLAB)
% B = POSITIVE_CLASS(A,CLASSLAB,LABLISTNAME)
%
% INPUT
% A MIL dataset
% CLASSLAB Class label
% LABLISTNAME New class list
%
% OUTPUT
% B Relabeled MIL dataset
%
% DESCRIPTION
% Rename the classes... |
github | vcheplygina/mil-master | ispositive.m | .m | mil-master/ispositive.m | 1,240 | utf_8 | e81e76530c580acfea5bc47548ad35aa | %ISPOSITIVE
%
% OUT = ISPOSITIVE(A)
%
% INPUT
% A Dataset or label
%
% OUTPUT
% OUT True if A is 'positive', otherwise false.
%
% DESCRIPTION
% Returns TRUE (=1) when an object or label in A is 'positive' and FALSE
% (=0) otherwise. When A is a dataset, the output will be a vector
% containing 0 or 1 per ... |
github | vcheplygina/mil-master | cellprintf.m | .m | mil-master/cellprintf.m | 1,150 | utf_8 | 011ffb5f16ab41df74369d5f03721e17 | %CELLPRINTF Write formatted data to cell array
%
% S = CELLPRINTF(FORMAT,V1,V2,...)
%
% INPUT
% FORMAT String encoding the format of text
% V1,V2,... Vector(s) containing values to filled in FORMAT
%
% OUTPUT
% S Cell array of strings
%
% DESCRIPTION
% Create text strings in a cell array, using f... |
github | vcheplygina/mil-master | gendatcorel.m | .m | mil-master/gendatcorel.m | 2,777 | utf_8 | 051ca3f4994c21a4cc756fc849cc05c6 | %GENDATCOREL Corel data.
%
% A = GENDATCOREL(CLASSNR)
%
% INPUT
% CLASSNR Positive class (default = 0)
%
% OUTPUT
% A MIL dataset
%
% DESCRIPTION
% Define the multi-instance learning problem COREL. There are 20
% possible classes. The class indicated by CLASSNR will be the positive
% class. The feat... |
github | vcheplygina/mil-master | log_DD.m | .m | mil-master/log_DD.m | 740 | utf_8 | ca14988ed2cb9dc3eaa7a39ca8824b6f | %LOG_DD Log diverse density, and derivative
%
% [P,DER] = LOG_DD(PARS,BAGS,BAGLABS)
%
% INPUT
% PARS Params encoding location and scale
% BAGS Cell array of bags
% BAGLABS Bag labels
%
% OUTPUT
% P (log)probability per bag
% DER Derivative w.r.t. PARS
%
% DESCRIPTION
% Suppo... |
github | vcheplygina/mil-master | emdd_mil.m | .m | mil-master/emdd_mil.m | 4,239 | utf_8 | bb8d06ac31a845adccdf4b2b8b34fd4d | %EMDD_MIL Expectation Maximization Maximum Diverse Density
%
% W = EMDD_MIL(X,FRAC,K,EPOCHS,TOL)
% W = X*EMDD_MIL([],FRAC,K,EPOCHS,TOL)
% W = X*EMDD_MIL(FRAC,K,EPOCHS,TOL)
%
% INTPUT
% X MIL dataset
% FRAC Fraction/number of instances taken into account in
% eval... |
github | vcheplygina/mil-master | gendatmil.m | .m | mil-master/gendatmil.m | 2,596 | utf_8 | 9a5ac9d584e4f1303c62953a778b14b8 | %GENDATMIL Randomly sample a training MIL set
%
% [Y,Z,IY,IZ] = GENDATMIL(X,N)
%
% INPUT
% X MIL dataset
% N number of training bags
%
% OUTPUT
% Y,Z MIL datasets
% IY,IZ original indices from dataset X
%
% DESCRIPTION
% Subsample N bags from MIL dataset X and retu... |
github | vcheplygina/mil-master | consistentmillab.m | .m | mil-master/consistentmillab.m | 996 | utf_8 | 233322a86390624c476a32ee188e5b3a | %CONSISTENTMILLAB Consistently label all instances in a bag
%
% B = CONSISTENTMILLAB(A)
%
% INPUT
% A MIL dataset
%
% OUTPUT
% B MIL dataset
%
% DESCRIPTION
% Relabel all instances from the bags in A, such that the instances in a
% positive bag will all get a positive label, and all other instances
... |
github | vcheplygina/mil-master | gendatmilc.m | .m | mil-master/gendatmilc.m | 2,376 | utf_8 | cf61b1cf9ba568ebc31a8c729a2fc49b | %GENDATMILC Concept MIL dataset
%
% X = GENDATMILC(N,DIM,S,INSTPERBAG)
%
% INPUT
% N Number of objects (poss. per class) (default = 10)
% DIM Dimensionality (default = 2)
% S Cluster variance in all directions (default = 1)
% INSTPERBAG Number of instances per bag (default = [5 10])
%
% OUTPU... |
github | vcheplygina/mil-master | bag2instlab.m | .m | mil-master/bag2instlab.m | 657 | utf_8 | 212636e143be1f89cb7c3736c32b5902 | %BAG2INSTLAB Copy bag to instance labels
%
% A = BAG2INSTLAB(A)
%
% INPUT
% A MIL dataset
%
% OUTPUT
% B MIL dataset
%
% DESCRIPTION
% Copy the bag labels of dataset A to instance labels in dataset B. This
% will result in identical labels for all instances in one bag.
%
% SEE ALSO
% getbags, labelset, g... |
github | vcheplygina/mil-master | setmilinfo.m | .m | mil-master/setmilinfo.m | 1,144 | utf_8 | 1e3329683d19a194fc2f1ef2916b9770 | %SETMILINFO Set MIL parameters in dataset
%
% A = SETMILINFO(A,FIELD,VALUE)
%
% INPUT
% A MIL dataset
% FIELD Field to set
% VALUE Value to store
%
% OUTPUT
% A MIL dataset
%
% DESCRIPTION
% Set some parameters, given by FIELD, in dataset A to a value VALUE.
% The possible parameters are:
% ... |
github | vcheplygina/mil-master | misvm.m | .m | mil-master/misvm.m | 2,080 | utf_8 | e33a0ad6aea03249b7e522f41bfbab8a | %MISVM Multi-instance Support Vector machine
%
% W = MISVM(A,FRAC,C,KERNELTYPE,KERNELPAR)
%
% INPUT
% A Dataset
% FRAC Fraction of instance that has to be positive for a
% positive bag (default = 'presence')
% C Regularization parameter (optional; default = 1)
% KERNEL... |
github | vcheplygina/mil-master | milcombine.m | .m | mil-master/milcombine.m | 6,751 | utf_8 | 65b47220a2106c032919e3eaa4a8dc76 | %MILCOMBINE Combine instance outputs to bag output
%
% P = MILCOMBINE(Q,COMBRULE,PFEAT)
%
% INPUT
% Q Outputs (Posterior prob.?) for all instances
% COMBRULE Combining rule
% PFEAT Output for 'positive' class
%
% OUTPUT
% P Output (posterior prob?) for a bag
%
% DESCRIPTION
% Com... |
github | vcheplygina/mil-master | milkernel.m | .m | mil-master/milkernel.m | 827 | utf_8 | 7c7183d63af6cbf2ba8473638f53ed81 | %MILKERNEL MIL kernel definition
%
% K = MILKERNEL(A,B,KTYPE,KPAR);
%
% INPUT
% A MIL dataset
% B MIL dataset
% KTYPE Kernel type (default = 'h')
% KPAR Kernel parameters (default = [])
%
% OUTPUT
% K Kernel dataset
%
% DESCRIPTION
% Computation of the kernel function ... |
github | vcheplygina/mil-master | loglc_weighted.m | .m | mil-master/loglc_weighted.m | 5,958 | utf_8 | 4b5397eb9b93a783d56cebacc2031b4a | %LOGLC_WEIGHTED Weighted Logistic Linear Classifier
%
% W = LOGLC_WEIGHTED(A, W, L)
%
% INPUT
% A Dataset
% W Weight per instance
% L Regularization parameter (L2, default = 0)
%
% OUTPUT
% W Logistic linear classifier
%
% DESCRIPTION
% Computation of the linear classifier for the dataset A by m... |
github | vcheplygina/mil-master | ismilset.m | .m | mil-master/ismilset.m | 1,176 | utf_8 | 1ebb6f10adf6bd82cd56babc65ac3055 | %ISMILSET Check if dataset is MIL
%
% OUT = ISMILSET(A,LABELED)
%
% INPUT
% A Dataset
% LABELED Flag to test for correct labels (default = 1)
%
% OUTPUT
% OUT True if A is correctly MIL
%
% DESCRIPTION
% Test if dataset A is MIL. It should have
% 1. bags defined,
% 2. 'positive'/'negative' lab... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.