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 | pfoser/mapconstruction-master | polynomialCurvePosition.m | .m | mapconstruction-master/algorithms/Karagiorgou_tracebundle/libraries/matGeom/polynomialCurves2d/polynomialCurvePosition.m | 2,965 | utf_8 | e8933d9b90e0b043fc8392746e0be496 | function pos = polynomialCurvePosition(tBounds, varargin)
%POLYNOMIALCURVEPOSITION Compute position on a curve for a given length
%
% POS = polynomialCurvePosition(T, XCOEF, YCOEF, L)
% XCOEF and YCOEF are row vectors of coefficients, in the form:
% [a0 a1 a2 ... an]
% T is a 1x2 row vector, containin... |
github | stefanofasciani/TSAM-master | ComputeScore.m | .m | TSAM-master/MATLAB/ComputeScore.m | 13,906 | utf_8 | 773162d951302fc3ad96bc2b5b258679 | % This file is part of the Timbre Space Analyzer & Mapper (TSAM)
%
% The TSAM can be obtained at http://stefanofasciani.com/tsam.html
% TSAM Copyright (C) 2016 Stefano Fasciani, University of Wollongong
% Inquiries: stefanofasciani@stefanofasciani.com
%
% The TSAM is free software: you can redistribute it and/or modi... |
github | stefanofasciani/TSAM-master | ComputeMapping.m | .m | TSAM-master/MATLAB/ComputeMapping.m | 11,167 | utf_8 | 665708ab31eaa51aa198498644a9e121 | % This file is part of the Timbre Space Analyzer & Mapper (TSAM)
%
% The TSAM can be obtained at http://stefanofasciani.com/tsam.html
% TSAM Copyright (C) 2016 Stefano Fasciani, University of Wollongong
% Inquiries: stefanofasciani@stefanofasciani.com
%
% The TSAM is free software: you can redistribute it and/or modi... |
github | stefanofasciani/TSAM-master | oscsend.m | .m | TSAM-master/MATLAB/oscsend.m | 3,877 | utf_8 | 3980e563020b3577b666f1311abb5606 | function oscsend(u,path,varargin)
% Sends a Open Sound Control (OSC) message through a UDP connection
%
% oscsend(u,path)
% oscsend(u,path,types,arg1,arg2,...)
% oscsedn(u,path,types,[args])
%
% u = UDP object with open connection.
% path = path-string
% types = string with types of arguments,
% supported:... |
github | lucy9215/csensing-master | A_fhp.m | .m | csensing-master/l1magic-1.11/l1magic/Measurements/A_fhp.m | 636 | utf_8 | af0c53d256653e836cfca2f288b2987f | % A_fhp.m
%
% Takes measurements in the upper half-plane of the 2D Fourier transform.
%
% Usage: b = A_fhp(x, OMEGA)
%
% x - N vector
%
% b - K vector = [mean; real part(OMEGA); imag part(OMEGA)]
%
% OMEGA - K/2-1 vector denoting which Fourier coefficients to use
% (the real and imag parts of each freq are kept... |
github | lucy9215/csensing-master | At_fhp.m | .m | csensing-master/l1magic-1.11/l1magic/Measurements/At_fhp.m | 777 | utf_8 | ce7aa4e088993ea22fc2c7bee587e684 | % At_fhp.m
%
% Adjoint of At_fhp (2D Fourier half plane measurements).
%
% Usage: x = At_fhp(b, OMEGA, n)
%
% b - K vector = [mean; real part(OMEGA); imag part(OMEGA)]
%
% OMEGA - K/2-1 vector denoting which Fourier coefficients to use
% (the real and imag parts of each freq are kept).
%
% n - Image is nxn pixe... |
github | lucy9215/csensing-master | A_f.m | .m | csensing-master/l1magic-1.11/l1magic/Measurements/A_f.m | 659 | utf_8 | 21e5a10a1fc2848a7455f0901d893064 | % A_f.m
%
% Takes "scrambled Fourier" measurements.
%
% Usage: b = A_f(x, OMEGA, P)
%
% x - N vector
%
% b - K vector = [real part; imag part]
%
% OMEGA - K/2 vector denoting which Fourier coefficients to use
% (the real and imag parts of each freq are kept).
%
% P - Permutation to apply to the input vector. F... |
github | lucy9215/csensing-master | LineMask.m | .m | csensing-master/l1magic-1.11/l1magic/Measurements/LineMask.m | 1,151 | utf_8 | d0a3fcc07acf9c921d8243d26fdf644b | % LineMask.m
%
% Returns the indicator of the domain in 2D fourier space for the
% specified line geometry.
% Usage : [M,Mh,mi,mhi] = LineMask(L,N)
%
% Written by : Justin Romberg
% Created : 1/26/2004
% Revised : 12/2/2004
function [M,Mh,mi,mhi] = LineMask(L,N)
thc = linspace(0, pi-pi/L, L);
%thc = linspace(pi/(2... |
github | lucy9215/csensing-master | At_f.m | .m | csensing-master/l1magic-1.11/l1magic/Measurements/At_f.m | 718 | utf_8 | c3639ceb479abeddedfe954c615b1f6d | % At_f.m
%
% Adjoint for "scrambled Fourier" measurements.
%
% Usage: x = At_f(b, N, OMEGA, P)
%
% b - K vector = [real part; imag part]
%
% N - length of output x
%
% OMEGA - K/2 vector denoting which Fourier coefficients to use
% (the real and imag parts of each freq are kept).
%
% P - Permutation to apply to... |
github | lucy9215/csensing-master | l1qc_newton.m | .m | csensing-master/l1magic-1.11/l1magic/Optimization/l1qc_newton.m | 4,479 | utf_8 | 6c2f87766fcb3e30cf3255d72c65cc40 | % l1qc_newton.m
%
% 对应P_D 噪声情况下不等式约束的newton求解方法
%
% Newton algorithm for log-barrier subproblems for l1 minimization
% with quadratic constraints.
%
% Usage:
% [xp,up,niter] = l1qc_newton(x0, u0, A, At, b, epsilon, tau,
% newtontol, newtonmaxiter, cgtol, cgmaxiter)
%
% x0,u0 - starting poi... |
github | lucy9215/csensing-master | tvqc_newton.m | .m | csensing-master/l1magic-1.11/l1magic/Optimization/tvqc_newton.m | 5,619 | utf_8 | 62b899733a0d8d110ac752817bea78e0 | % tvqc_newton.m
%
% 对应tv P_D 噪声情况下不等式约束的newton求解方法
%
% Newton algorithm for log-barrier subproblems for TV minimization
% with quadratic constraints.
%
% Usage:
% [xp,tp,niter] = tvqc_newton(x0, t0, A, At, b, epsilon, tau,
% newtontol, newtonmaxiter, cgtol, cgmaxiter)
%
% x0,t0 - starting... |
github | lucy9215/csensing-master | cgsolve.m | .m | csensing-master/l1magic-1.11/l1magic/Optimization/cgsolve.m | 1,731 | utf_8 | ffd6bba186e573563341e871f94a073e | % cgsolve.m
%
% 大概是正定系统的求解
%
% Solve a symmetric positive definite system Ax = b via conjugate gradients.
%
% Usage: [x, res, iter] = cgsolve(A, b, tol, maxiter, verbose)
%
% A - Either an NxN matrix, or a function handle.
%
% b - N vector
%
% tol - Desired precision. Algorithm terminates when
% norm(Ax-b)/norm... |
github | lucy9215/csensing-master | tvdantzig_newton.m | .m | csensing-master/l1magic-1.11/l1magic/Optimization/tvdantzig_newton.m | 5,892 | utf_8 | 861935e79c7284ae3973768fc9c47d57 | % tvdantzig_newton.m
%
% 对应P_D 噪声情况下不等式约束的newton求解方法
%
% Newton iterations for TV Dantzig log-barrier subproblem.
%
% Usage : [xp, tp, niter] = tvdantzig_newton(x0, t0, A, At, b, epsilon, tau,
% newtontol, newtonmaxiter, cgtol, cgmaxiter)
%
% x0,t0 - Nx1 vectors, initial point... |
github | lucy9215/csensing-master | l1eq_pd.m | .m | csensing-master/l1magic-1.11/l1magic/Optimization/l1eq_pd.m | 6,042 | utf_8 | c7b59ef395fbd0fe723f934a57da62ef | % l1eq_pd.m
%
% 对应P_1 等式约束的pd求解
%
% 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 ... |
github | lucy9215/csensing-master | l1decode_pd.m | .m | csensing-master/l1magic-1.11/l1magic/Optimization/l1decode_pd.m | 5,105 | utf_8 | eb8f43742ea494ffc748c6833f9c616c | % l1decode_pd.m
%
% 对应P_2 解码的pd求解法
%
% Decoding via linear programming.
% Solve
% min_x ||b-Ax||_1 .
%
% Recast as the linear program
% min_{x,u} sum(u) s.t. -Ax - u + y <= 0
% Ax - u - y <= 0
% and solve using primal-dual interior point method.
%
% Usage: xp = l1decode_pd(x0, A, At, y, pd... |
github | lucy9215/csensing-master | l1dantzig_pd.m | .m | csensing-master/l1magic-1.11/l1magic/Optimization/l1dantzig_pd.m | 7,057 | utf_8 | 3f06f17279544cfc62a4bb305946ed0f | % l1dantzig_pd.m
%
% 对应P_D l1 dantzig的pd求解法
%
% Solves
% min_x ||x||_1 subject to ||A'(Ax-b)||_\infty <= epsilon
%
% Recast as linear program
% min_{x,u} sum(u) s.t. x - u <= 0
% -x - u <= 0
% A'(Ax-b) - epsilon <= 0
% -A'(Ax-b) - epsilon <= 0
% and use primal-dual... |
github | lucy9215/csensing-master | tveq_newton.m | .m | csensing-master/l1magic-1.11/l1magic/Optimization/tveq_newton.m | 5,598 | utf_8 | c97508cfda146d162dd2cda8a9dcf621 | % tveq_newton.m
%
% 对应tv P_1 等式约束的newton求解方法
%
% Newton algorithm for log-barrier subproblems for TV minimization
% with equality constraints.
%
% Usage:
% [xp,tp,niter] = tveq_newton(x0, t0, A, At, b, tau,
% newtontol, newtonmaxiter, slqtol, slqmaxiter)
%
% x0,t0 - starting points
%
% A ... |
github | lucy9215/csensing-master | tvqc_logbarrier.m | .m | csensing-master/l1magic-1.11/l1magic/Optimization/tvqc_logbarrier.m | 3,728 | utf_8 | a40604e1e987c04663fcbf76ea310259 | % tvqc_logbarrier.m
%
% 对应tv P_D 噪声情况下不等式约束的logbarrier求解方法
%
% Solve quadractically constrained TV minimization
% min TV(x) s.t. ||Ax-b||_2 <= epsilon.
%
% Recast as the SOCP
% min sum(t) s.t. ||D_{ij}x||_2 <= t, i,j=1,...,n
% ||Ax - b||_2 <= epsilon
% and use a log barrier algorithm.
%
% Usage: ... |
github | lucy9215/csensing-master | l1qc_logbarrier.m | .m | csensing-master/l1magic-1.11/l1magic/Optimization/l1qc_logbarrier.m | 3,608 | utf_8 | 9cc50077b34901c6717ae4798a83d2e8 | % l1qc_logbarrier.m
%
% 对应P_D 噪声情况下不等式约束的logbarrier求解方法
%
% Solve quadratically constrained l1 minimization:
% min ||x||_1 s.t. ||Ax - b||_2 <= \epsilon
%
% Reformulate as the second-order cone program
% min_{x,u} sum(u) s.t. x - u <= 0,
% -x - u <= 0,
% 1/2(||Ax-b||^2 - \epsi... |
github | lucy9215/csensing-master | tvdantzig_logbarrier.m | .m | csensing-master/l1magic-1.11/l1magic/Optimization/tvdantzig_logbarrier.m | 3,849 | utf_8 | 454d2182cca65e748c0ddbe62440499d | % tvdantzig_logbarrier.m
%
% 对应P_D 噪声情况下不等式约束的logbarrier求解方法
%
% Solve the total variation Dantzig program
%
% min_x TV(x) subject to ||A'(Ax-b)||_\infty <= epsilon
%
% Recast as the SOCP
% min sum(t) s.t. ||D_{ij}x||_2 <= t, i,j=1,...,n
% <a_{ij},Ax - b> <= epsilon i,j=1,...,n
% and use a log ba... |
github | lucy9215/csensing-master | tveq_logbarrier.m | .m | csensing-master/l1magic-1.11/l1magic/Optimization/tveq_logbarrier.m | 5,332 | utf_8 | f108c59d68b8940297fb6ce5a283e8f4 | % tveq_logbarrier.m
%
% 对应tv P_1 等式约束的logbarrier求解方法
%
% Solve equality constrained TV minimization
% min TV(x) s.t. Ax=b.
%
% Recast as the SOCP
% min sum(t) s.t. ||D_{ij}x||_2 <= t, i,j=1,...,n
% Ax=b
% and use a log barrier algorithm.
%
% Usage: xp = tveq_logbarrier(x0, A, At, b, lbtol, mu, sl... |
github | shine636363/DSTcode-master | emgm.m | .m | DSTcode-master/code/tracking/emgm.m | 3,257 | utf_8 | a057e3e42196a5475194067f48775335 | function [label, model, llh] = emgm(X, init)
% Perform EM algorithm for fitting the Gaussian mixture model.
% X: d x n data matrix
% init: k (1 x 1) or label (1 x n, 1<=label(i)<=k) or center (d x k)
% Written by Michael Chen (sth4nth@gmail.com).
%
% Edited by Jingjing Xiao, 2016
%% initialization
R = initializati... |
github | stwisdom/sista-rnn-master | operator4fpc.m | .m | sista-rnn-master/matlab/SpaRSA_2.0/operator4fpc.m | 158 | utf_8 | 9d998d28e9a8bc27cc8e655ff1163b4a | % %%%%%%%%%%%%%%%%%%%%%
function y = operator4fpc(trans,m,n,x,inds,OMEGA)
if ~trans
y = A_dct(x,OMEGA);
else
y = At_dct(x,OMEGA,n);
end
|
github | stwisdom/sista-rnn-master | l1_ls.m | .m | sista-rnn-master/matlab/SpaRSA_2.0/l1_ls.m | 8,569 | utf_8 | 2188d3e090d8097887add14e666cc07a | function [x,status,history] = l1_ls(A,varargin)
%
% l1-Regularized Least Squares Problem Solver
%
% l1_ls solves problems of the following form:
%
% minimize ||A*x-y||^2 + lambda*sum|x_i|,
%
% where A and y are problem data and x is variable (described below).
%
% CALLING SEQUENCES
% [x,status,history] = l1... |
github | stwisdom/sista-rnn-master | fpc.m | .m | sista-rnn-master/matlab/SpaRSA_2.0/fpc.m | 8,680 | utf_8 | 4d27f8dc492915981fff31167e93b62c | % Fixed Point Continuation (FPC) for l1 Regularized Least Squares
%
%--------------------------------------------------------------------------
% GENERAL DESCRIPTION & INPUTS
%--------------------------------------------------------------------------
%
% Out = fpc(n,A,b,mu,M,opts,varargin)
%
% Solves
%
% m... |
github | stwisdom/sista-rnn-master | fpc_opts.m | .m | sista-rnn-master/matlab/SpaRSA_2.0/fpc_opts.m | 4,080 | utf_8 | 15216a99ff3ca1fcd1d59f9bd494a60d | % Options for Fixed Point Continuation (FPC)
%
%--------------------------------------------------------------------------
% DESCRIPTION
%--------------------------------------------------------------------------
%
% opts = fpc_opts(opts)
%
% If opts is empty upon input, opts will be returned containing the def... |
github | stwisdom/sista-rnn-master | l1homotopy.m | .m | sista-rnn-master/matlab/L1-homotopy/l1homotopy.m | 12,089 | utf_8 | 76cdb88a8c7f1ecafe7cf0349ecebd07 | % l1homotopy.m
%
% A general program that solves homotopy for
% a weighted LASSO/BPDN problem with or without a warm-start vector
%
% Some examples for dynamic updating include
% sequential measurements
% time-varying signal
% iterative reweighting
% measurement replacement
% dictionary learning
% Ka... |
github | stwisdom/sista-rnn-master | genAmat.m | .m | sista-rnn-master/matlab/L1-homotopy/utils/genAmat.m | 1,610 | utf_8 | 9dfe810d5cfeaa8f4a013c157b0aad44 | function A = genAmat(M,N,in);
switch in.type
case 'randn'
% Gaussian measurements
A = (randn(M,N))/sqrt(M);
% A = orth(A')'; % with orthogonal rows
case 'hadamard'
% Hadamard
H = hadamard(N);
q = randperm(N);
A = H(q(1:M),:)/sqrt(M);
case 'sign'
... |
github | stwisdom/sista-rnn-master | daub1018.m | .m | sista-rnn-master/matlab/L1-homotopy/utils/utils_Wavelet/daub1018.m | 1,548 | utf_8 | eb0d866ba1d000d9e457d74b4433f13e | % daub1018.m
%
% Returns the filter coefficients for the popular Daubechies 10,18 wavelet
% set
% Usage : [h0,h1,g0,g1] = daub1018
% h0 - lowpass analysis
% h1 - highpass analysis
% g0 - lowpass synthesis
% g1 - highpass synthesis
%
% Written by : Justin Romberg
% Created : 8/27/2001
function [h0, h1, g0, g1] = daub10... |
github | stwisdom/sista-rnn-master | dauborth.m | .m | sista-rnn-master/matlab/L1-homotopy/utils/utils_Wavelet/dauborth.m | 857 | utf_8 | df90b77367e259b15d1f0b70c6527653 | % dauborth.m
%
% Filter coefficients for Daubechies' compactly supported wavelets.
% Usage: [h0,h1,g0,g1] = dauborth(M)
% h0 - analysis scaling filter
% h1 - analysis wavelet filter, M/2 vanishing moments
% g0 - synthesis scaling filter
% g1 - synthesis wavelet filter
%
% Written by: Justin Romberg
% Created: 3/23/2004... |
github | stwisdom/sista-rnn-master | cdfspline.m | .m | sista-rnn-master/matlab/L1-homotopy/utils/utils_Wavelet/cdfspline.m | 600 | utf_8 | e0ffaea370b60b1edc4de02258aff377 | % cdfspline.m
%
% Filter coefficients for Cohen, Daubechies, Faveau biorth spline filters
% Usage : [h0,g0] = cdfspline(N,M)
% h0 - bspline poly of order N
% g0 - poly using rest of factors from daubpoly((N+M)/2)
% h0 and g0 are scaling filters
%
% Written by : Justin Romberg
% Created : 3/23/2004
function [h0, g0] = ... |
github | stwisdom/sista-rnn-master | idwtmult1_conv.m | .m | sista-rnn-master/matlab/L1-homotopy/utils/utils_Wavelet/idwtmult1_conv.m | 472 | utf_8 | 894672b73cc6ff7b73fece0b75eaccb2 | % idwtmult1_conv.m
%
% adjoint of dwtmult1_conv.
function x = idwtmult1_conv(w, g0, g1, J)
sym = 3;
w = w(:)';
L = length(w);
x = [];
xl = w(1:L*2^(-J+1));
for j = J:-1:1
xh = idwtlevel1(xl, g0, g1, 3);
xh = xh(1:end-1);
if j == 1
x = xh;
return;
end
xp = w(L*2^(-j+1)+1:L*2^(-j+2));
npad = ... |
github | stwisdom/sista-rnn-master | daub79.m | .m | sista-rnn-master/matlab/L1-homotopy/utils/utils_Wavelet/daub79.m | 796 | utf_8 | 0b511a7a9130141e888c86269b80cbb8 | % daub79.m
%
% Returns the filter coefficients (for lowpass and highpass) for the
% Daubechies 7,9 biorthogonal wavelet set
% Usage : [h0,h1,g0,g1] = daub79
% h0 - lowpass analysis
% h1 - highpass analysis
% g0 - lowpass synthesis
% g1 - highpass synthesis
function [h0, h1, g0, g1] = daub79()
b = sqrt(2)*[0.602949018... |
github | stwisdom/sista-rnn-master | dwtmult2.m | .m | sista-rnn-master/matlab/L1-homotopy/utils/utils_Wavelet/dwtmult2.m | 533 | utf_8 | a7aac6438651f95cf46e603f97077e4a | % dwtmult2.m
%
% Performs multiple levels of the 2D discrete wavelet transform.
% Usage : w = dwtmult2(x, h0, h1, L, sym)
%
% Written by : Justin Romberg
% Created : 6/26/2001
function w = dwtmult2(x, h0, h1, L, sym)
if (nargin == 4), sym = 0; end
[Nr,Nc] = size(x);
w = x;
for ll = 1:L
% rows
for ii = 1:(Nr*2^(... |
github | stwisdom/sista-rnn-master | daubpoly.m | .m | sista-rnn-master/matlab/L1-homotopy/utils/utils_Wavelet/daubpoly.m | 741 | utf_8 | c811f1cdaafa03436ab36c2fc04c2e8f | % daubpoly.m
%
% Daubechies polynomial for compactly supported wavelets.
% Factor the answer in different ways to get differnet filter coeffs.
% Usage : [P, Q] = daubpoly(p)
% Q - polynomial for roots at locations other than -1 (for PR)
% P - polynomial conv(q,(1+z)^(2*p))
% Ex:
% let qr = roots(Q), pr = roots(P)
... |
github | stwisdom/sista-rnn-master | cconv.m | .m | sista-rnn-master/matlab/L1-homotopy/utils/utils_Wavelet/cconv.m | 487 | utf_8 | 3ec14843637a8f87bc2769b1fb8013a7 | % cconv.m
%
% Circular convolution.
% Usage : y = cconv(x,h,k)
% x - input signal
% h - filter
% k - output hole in filter (k=0 if the filter is causal)
%
% Written by : Justin Romberg
% Created : 2/16/98, Revised : 5/1/2001
function y = cconv(x,h,k)
if (nargin == 2), k = 0; end
N = length(x);
M = length(h);
inds = ... |
github | stwisdom/sista-rnn-master | dwtmult1_conv.m | .m | sista-rnn-master/matlab/L1-homotopy/utils/utils_Wavelet/dwtmult1_conv.m | 470 | utf_8 | c415c5c1d74154feba3bdde6a177faf5 | % dwtmult1_conv.m
%
% Performs multiple levels of the discrete wavelet transform with linear
% filtering (using dwtlevel1 with sym == 3)
% Usage : w = dwtmult1(x, h0, h1, L)
%
% Modified from dwtmult1.m by Justin Romberg
% NOT TESTED YET...
function w_conv = dwtmult1_conv(x, h0, h1, L)
sym = 3;
N = length(x);
w_... |
github | stwisdom/sista-rnn-master | dwtmult1.m | .m | sista-rnn-master/matlab/L1-homotopy/utils/utils_Wavelet/dwtmult1.m | 402 | utf_8 | 3f7207d10404bcd429192fa7f1cccb8c | % dwtmult1.m
%
% Performs multiple levels of the discrete wavelet transform (using
% dwtlevel1). Lines up stuff for "tree" structure
% Usage : w = dwtmult1(x, h0, h1, L)
%
% Written by : Justin Romberg
% Created : 5/1/2001
function w = dwtmult1(x, h0, h1, L, sym)
if (nargin == 4), sym = 0; end
N = length(x);
w = x... |
github | stwisdom/sista-rnn-master | idwtlevel1.m | .m | sista-rnn-master/matlab/L1-homotopy/utils/utils_Wavelet/idwtlevel1.m | 1,922 | utf_8 | 16d5f459a9ec191910de5df2a6ac63f2 | % idwtlevel1.m
%
% Inverse of one level of the discrete wavelet transform (dwtlevel1).
%
% Written by : Justin Romberg
% Created : 5/1/2001
function x = idwtlevel1(w, g0, g1, sym)
if (nargin == 3), sym = 0; end
N = length(w);
m0 = length(g0);
m1 = length(g1);
if (m0 ~= m1)
error('Use biorfilt to create filters');... |
github | stwisdom/sista-rnn-master | idwtmult1.m | .m | sista-rnn-master/matlab/L1-homotopy/utils/utils_Wavelet/idwtmult1.m | 272 | utf_8 | a7cfce4bc06b6becf22ab394ca7a20b6 | % idwtmult1.m
%
% Inverts dwtmult1.
%
% Written by : Justin Romberg
% Created : 5/1/2001
function x = idwtmult1(w, g0, g1, L, sym)
if (nargin == 4), sym=0; end
N = length(w);
for ll = L:-1:1
w(1:N*2^(-ll+1)) = idwtlevel1(w(1:N*2^(-ll+1)), g0, g1, sym);
end
x = w;
|
github | stwisdom/sista-rnn-master | cshift.m | .m | sista-rnn-master/matlab/L1-homotopy/utils/utils_Wavelet/cshift.m | 506 | utf_8 | 5bfea7656c3f02b650504bbad6a74d99 | % cshift.m
%
% Circular shift of a row vector.
% Usage : y = cshift(x, t, dir)
% x - input vector
% t - number of spots to shift
% dir - either 'r' or 'l' (default is 'r')
%
% Written by : Justin Romberg
function y = cshift(x, t, dir)
if (nargin == 2), dir = 'r'; end
N = size(x,2);
t = mod(t,N);
if (dir == 'r')
y ... |
github | stwisdom/sista-rnn-master | create_DWT.m | .m | sista-rnn-master/matlab/L1-homotopy/utils/utils_Wavelet/create_DWT.m | 2,368 | utf_8 | aaf41e661b7cfdc97908e6d4e25c3cc3 | % Creates a DWT representation matrix without signal extension
function Psi = create_DWT(in)
% A wavelet basis function using orthogonal wavelets
%
% inputs:
% J -- finest scale for wavelets
% wType -- type of wavelets
% sym -- type of extension
% N -- length of signal interval
N = in.N;
wType = in.wType... |
github | stwisdom/sista-rnn-master | symext.m | .m | sista-rnn-master/matlab/L1-homotopy/utils/utils_Wavelet/symext.m | 1,292 | utf_8 | 296ba71b450d0e880c4174361623bd2d | % symext.m
%
% Symmetrically extends the input vector
% Usage : xe = symext(x, ln, rn, par, sym)
% x - vector to be extended, 1xN
% ln - number of values to tack onto the left of x
% rn - number of values to tack onto the right of x
% par - parity of the extension,
% 'ee' or 'e' - repeating ext.,
% 'oo' o... |
github | stwisdom/sista-rnn-master | dwtlevel1.m | .m | sista-rnn-master/matlab/L1-homotopy/utils/utils_Wavelet/dwtlevel1.m | 1,677 | utf_8 | f612b963e2e5229463cddfe23ed1b146 | % dwtlevel1.m
%
% One level of the discrete wavelet transform. Periodic extension (for now)
% and the wavelets are lined up the best way for "tree structure".
% Usage : w = dwtlevel1(x, h0, h1, sym)
%
% Written by : Justin Romberg
% Created : 5/1/2001
function w = dwtlevel1(x, h0, h1, sym)
if (nargin == 3), sym=0; e... |
github | stwisdom/sista-rnn-master | irdwt1.m | .m | sista-rnn-master/matlab/L1-homotopy/utils/utils_Wavelet/irdwt1.m | 874 | utf_8 | ab98ff0f4194a7bc8309f607e750f993 | % irdwt1.m
%
% Inverse redundant discrete wavelet transform.
% Inverts "rdwt1.m"
% Usage : x = irdwt1(w, g0, g1, nlev)
% w - rdwt coefficients, nlev+1xN
% g0,g1 - reconstruction filters
% nlev - number of levels in the decomposition
%
% Written by : Justin Romberg
% Created : 8/10/2001
function x = irdwt1(w, g0, g1, n... |
github | stwisdom/sista-rnn-master | create_LOT.m | .m | sista-rnn-master/matlab/L1-homotopy/utils/utils_LOT/create_LOT.m | 1,360 | utf_8 | 7fa78d102623fda8c6936ee28f5faea7 | % Creates the LOT representation matrix
function Psi = create_LOT(in)
% lapped window modulated by DCT-IV
%
% inputs:
% L -- lenght of LOT window
% eta -- transition width on the left edge (a_p,eta_p)
%
% optional input parameters:
% eta1 -- transition width on the right edge (a_{p+1}, eta_{p+1})
% def... |
github | stwisdom/sista-rnn-master | lotwin.m | .m | sista-rnn-master/matlab/L1-homotopy/utils/utils_LOT/lotwin.m | 834 | utf_8 | 66f9ac03344eb57b544ff325b1eeb467 | % lotwin.m
%
% Window function for the lapped orthgonal transform
%
function g0 = lotwin(t, eta, varargin)
if nargin > 1
eta = varargin{1};
else
eta = 0.25;
end
eta1 = eta;
if nargin > 2
eta1 = varargin{1};
end
% length
%L = 1;
% We should eventually generalize to this parameterization
% edgewidth
%eta... |
github | stwisdom/sista-rnn-master | betaedge.m | .m | sista-rnn-master/matlab/L1-homotopy/utils/utils_LOT/betaedge.m | 420 | utf_8 | a385d5afdb8260178bf866dcc482c90e | % betaedge.m
%
% Transition function for a lapped orthogonal transform.
%
% beta(t) = 0 t < 0
% = sqrt(35t^4-84t^5+70t^6-20t^7) 0<t<1
% = 1 t > 1
%
% (if -1<t<1, then beta(t) needs to be shifted by 1 and scaled by 1/2, i.e, t --> (t+1)/2)
function b = betaedge(t)
b = zeros(length(t),1);
ti = fin... |
github | stwisdom/sista-rnn-master | yall1.m | .m | sista-rnn-master/matlab/L1-homotopy/solvers/yall1.m | 12,678 | utf_8 | 06fc13f18553b925188266ae5e725daa | function [x, Out] = yall1(A, b, opts)
%
% A solver for L1-minimization models:
%
% min ||Wx||_{w,1}, st Ax = b
% min ||Wx||_{w,1} + (1/nu)||Ax - b||_1
% min ||Wx||_{w,1} + (1/2*rho)||Ax - b||_2^2
% min ||x||_{w,1}, st Ax = b and x > = 0
% min ||x||_{w,1} + (1/nu)||Ax - b||_1, st x > = 0
% min ||x||_... |
github | stwisdom/sista-rnn-master | wspgl1.m | .m | sista-rnn-master/matlab/L1-homotopy/solvers/wspgl1.m | 32,717 | utf_8 | 0cbdc3d0669cdd616de3f1d1eb12b090 | function [x,r,g,info] = wspgl1( A, b, tau, sigma, x, options )
%SPGL1 Solve basis pursuit, basis pursuit denoise, and LASSO
%
% [x, r, g, info] = wspgl1(A, b, tau, sigma, x0, options)
%
% ---------------------------------------------------------------------
% Solve a MODIFIED basis pursuit denoise (BPDN) problem
%
% (... |
github | stwisdom/sista-rnn-master | Core_Nesterov_adpW.m | .m | sista-rnn-master/matlab/L1-homotopy/solvers/Core_Nesterov_adpW.m | 18,319 | utf_8 | 641a880b92d8ad5eede4efc757ecb7ab | function [xk,niter,residuals,outputData,opts] = Core_Nesterov(...
A,At,b,mu,delta,opts)
% [xk,niter,residuals,outputData,opts] =Core_Nesterov(A,At,b,mu,delta,opts)
%
% Solves a L1 minimization problem under a quadratic constraint using the
% Nesterov algorithm, without continuation:
%
% min_x || U x ||_1 s.t. |... |
github | stwisdom/sista-rnn-master | NESTA_adpW.m | .m | sista-rnn-master/matlab/L1-homotopy/solvers/NESTA_adpW.m | 14,065 | utf_8 | fc66701a4c4f8f95f11b6edf25e6bef1 | function [xk,niter,residuals,outputData,opts] =NESTA_adpW(A,At,b,muf,delta,opts)
% [xk,niter,residuals,outputData] =NESTA(A,At,b,muf,delta,opts)
%
% Solves a L1 minimization problem under a quadratic constraint using the
% Nesterov algorithm, with continuation:
%
% min_x || U x ||_1 s.t. ||y - Ax||_2 <= delta
%
% ... |
github | stwisdom/sista-rnn-master | spgl1.m | .m | sista-rnn-master/matlab/L1-homotopy/solvers/spgl1.m | 30,253 | utf_8 | 03d7576dbae19e8aa54fe160c192f10a | function [x,r,g,info] = spgl1( A, b, tau, sigma, x, options )
%SPGL1 Solve basis pursuit, basis pursuit denoise, and LASSO
%
% [x, r, g, info] = spgl1(A, b, tau, sigma, x0, options)
%
% ---------------------------------------------------------------------
% Solve the basis pursuit denoise (BPDN) problem
%
% (BPDN) m... |
github | canlab/CANlab_help_examples-master | k2_neurosynth_cogcontrol_pattern_and_region_analyses.m | .m | CANlab_help_examples-master/Second_level_analysis_template_scripts/core_scripts_to_run_without_modifying/k2_neurosynth_cogcontrol_pattern_and_region_analyses.m | 10,777 | utf_8 | 5362bc2ac83a8a8fa361308450bd301a | roimask_imagename = 'v4-topics-100_25_inhibition_response_control_pFgA_z_FDR_0.01.nii';
if ~exist(which(roimask_imagename), 'file')
try
roimask = gunzip([roimask_imagename '.gz']);
roimask_imagename = roimask{1};
catch
end
end
% this map is similar but with fewer unique regions:
%roimask_imagename... |
github | canlab/CANlab_help_examples-master | plugin_signature_condition_contrast_plot.m | .m | CANlab_help_examples-master/Second_level_analysis_template_scripts/core_scripts_to_run_without_modifying/plugin_signature_condition_contrast_plot.m | 8,335 | utf_8 | e5b32a98fc98834c24d0aa9b25e3b627 | % Check for required DAT fields. Skip analysis and print warnings if missing.
% ---------------------------------------------------------------------
% List required fields in DAT, in cell array:
required_fields = {'conditions', 'colors', 'SIG_conditions'};
ok_to_run = plugin_check_required_fields(DAT, required_fields... |
github | canlab/CANlab_help_examples-master | prep_3b_run_SVMs_on_contrasts_and_save.m | .m | CANlab_help_examples-master/Second_level_analysis_template_scripts/core_scripts_to_run_without_modifying/prep_3b_run_SVMs_on_contrasts_and_save.m | 6,081 | utf_8 | 9f04359553d4d5ecf9c7bb4569845237 | % THIS SCRIPT RUNS SVMs for WITHIN-PERSON CONTRASTS
% Specified in DAT.contrasts
% --------------------------------------------------------------------
% USER OPTIONS
% This is a standard block of code that can be used in multiple scripts.
% Each script will have its own options needed and default values for
% these.... |
github | canlab/CANlab_help_examples-master | f2_bucknerlab_network_barplots.m | .m | CANlab_help_examples-master/Second_level_analysis_template_scripts/core_scripts_to_run_without_modifying/f2_bucknerlab_network_barplots.m | 4,636 | utf_8 | e2b6f372b52d6c3d37b6d1d4fbc9a4b2 | figtitlebase = 'BucknerLab rsFMRI Cosine Similarity';
image_set_name = 'bucknerlab'; % keyword for named set to pass into load_image_set
[mapset, netnames] = load_image_set(image_set_name);
mycolors = seaborn_colors(length(netnames));
k = length(DAT.conditions);
myfontsize = get_font_size(k); % This is a function... |
github | canlab/CANlab_help_examples-master | z_batch_publish_analyses.m | .m | CANlab_help_examples-master/Second_level_analysis_template_scripts/core_scripts_to_run_without_modifying/z_batch_publish_analyses.m | 8,963 | utf_8 | 78cb87f13b239dff43755da97f1d43ce | function z_batch_publish_analyses(varargin)
% Runs batch analyses and publishes HTML report with figures and stats to
% results/published_output in local study-specific analysis directory.
%
% Run this from the main base directory (basedir)
%
% Enter string for which analyses to run, in any order
%
% 'contrasts... |
github | canlab/CANlab_help_examples-master | f2_bucknerlab_network_wedgeplots.m | .m | CANlab_help_examples-master/Second_level_analysis_template_scripts/core_scripts_to_run_without_modifying/f2_bucknerlab_network_wedgeplots.m | 4,755 | utf_8 | 4b737edb6291ab93f4b7f9d77eb4714c | figtitlebase = 'BucknerLab rsFMRI Cosine Similarity Wedge';
image_set_name = 'bucknerlab'; % keyword for named set to pass into load_image_set
[mapset, netnames] = load_image_set(image_set_name);
mycolors = seaborn_colors(length(netnames));
k = length(DAT.conditions);
myfontsize = get_font_size(k); % This is a fu... |
github | canlab/CANlab_help_examples-master | plugin_signature_condition_contrast_plot_kragel_emotion.m | .m | CANlab_help_examples-master/Second_level_analysis_template_scripts/core_scripts_to_run_without_modifying/plugin_signature_condition_contrast_plot_kragel_emotion.m | 8,406 | utf_8 | 8e800d16197114bb16db2739cdb46c99 | % Check for required DAT fields. Skip analysis and print warnings if missing.
% ---------------------------------------------------------------------
% List required fields in DAT, in cell array:
required_fields = {'conditions', 'colors', 'EMO_CAT_SIG_conditions'};
ok_to_run = plugin_check_required_fields(DAT, require... |
github | canlab/CANlab_help_examples-master | prep_3a_run_second_level_regression_and_save.m | .m | CANlab_help_examples-master/Second_level_analysis_template_scripts/core_scripts_to_run_without_modifying/prep_3a_run_second_level_regression_and_save.m | 10,002 | utf_8 | d3d4dc475a81d268a5cc5ceb8c182c75 | % THIS SCRIPT RUNS BETWEEN-PERSON (2nd-level) Regression analyses
% for each within-person CONTRAST registered in the analysis
%
% - To specify analysis options, run a2_set_default_options
% - prep_3a_run_second_level_regression_and_save runs regressions and saves
% results in a standard location and format
% - To get... |
github | canlab/CANlab_help_examples-master | d11_signature_similarity_barplots.m | .m | CANlab_help_examples-master/Second_level_analysis_template_scripts/core_scripts_to_run_without_modifying/d11_signature_similarity_barplots.m | 4,328 | utf_8 | 82d4865ea999de49c42d90d60836a3bb | % You can run this with a new image set by changing only the two lines below:
figtitlebase = 'CANlab signatures Cosine Similarity';
image_set_name = 'npsplus'; % keyword for named set to pass into load_image_set
[mapset, netnames] = load_image_set(image_set_name);
mycolors = seaborn_colors(length(netnames));
k = ... |
github | canlab/CANlab_help_examples-master | prep_3d_run_SVM_betweenperson_contrasts.m | .m | CANlab_help_examples-master/Second_level_analysis_template_scripts/core_scripts_to_run_without_modifying/prep_3d_run_SVM_betweenperson_contrasts.m | 7,833 | utf_8 | d6a606b28c52f85694fc8ad0d68cfc87 | % THIS SCRIPT RUNS BETWEEN-PERSON CONTRASTS
% Assuming that groups are concatenated into contrast image lists.
% Requires DAT.BETWEENPERSON.group field specifying group membership for
% each image.
% --------------------------------------------------------------------
% USER OPTIONS
% Now set in a2_set_default_option... |
github | canlab/CANlab_help_examples-master | plugin_canlab_condition_contrast_plot.m | .m | CANlab_help_examples-master/Second_level_analysis_template_scripts/core_scripts_to_run_without_modifying/plugin_canlab_condition_contrast_plot.m | 10,465 | utf_8 | fd75529f30c215dbd4bf66fda0fadcd6 | % [fighan, axh, handles] = plugin_canlab_condition_contrast_plot(data_to_plot, DAT, analysis_name, dv_name)
%
% This plugin function plots a series of conditions in one panel, and a
% series of contrasts across those conditions in another. This is useful
% for showing patterns of means across conditions and contrasts i... |
github | canlab/CANlab_help_examples-master | prep_3e_run_SVM_betweenperson_contrasts_on_conditions.m | .m | CANlab_help_examples-master/Second_level_analysis_template_scripts/core_scripts_to_run_without_modifying/prep_3e_run_SVM_betweenperson_contrasts_on_conditions.m | 12,505 | utf_8 | d337fffd7eb42f9e88745cb75b462786 | % THIS SCRIPT RUNS BETWEEN-PERSON CONTRASTS
% Assuming that groups are concatenated into contrast image lists.
% Requires DAT.BETWEENPERSON.group field specifying group membership for
% each image.
% --------------------------------------------------------------------
% USER OPTIONS
% USER OPTIONS
% This is a standard... |
github | canlab/CANlab_help_examples-master | plugin_svm_contrasts_get_results_per_subject.m | .m | CANlab_help_examples-master/Second_level_analysis_template_scripts/core_scripts_to_run_without_modifying/plugin_svm_contrasts_get_results_per_subject.m | 15,145 | utf_8 | 9757b92acb405377513f72e6272bbda3 | function [dist_from_hyperplane, Y, svm_dist_pos_neg, svm_dist_pos_neg_matrix] = plugin_svm_contrasts_get_results_per_subject(DAT, svm_stats_results, DATA_OBJ)
% [dist_from_hyperplane, Y, svm_dist_pos_neg, svm_dist_pos_neg_matrix] = plugin_svm_contrasts_get_results_per_subject(DAT, svm_stats_results, DATA_OBJ)
%
% The p... |
github | canlab/CANlab_help_examples-master | d3_plot_nps_subregions_bars.m | .m | CANlab_help_examples-master/Second_level_analysis_template_scripts/core_scripts_to_run_without_modifying/d3_plot_nps_subregions_bars.m | 5,615 | utf_8 | f8c1cf9d5b451a3ac62a0f8a6b9dfb38 | mymetric = 'cosine_sim'; % 'dotproduct' or 'cosine_sim'
% Controlling for group admin order covariate (mean-centered by default)
group = [];
if isfield(DAT, 'BETWEENPERSON') && isfield(DAT.BETWEENPERSON, 'group')
group = DAT.BETWEENPERSON.group; % empty for no variable to control/remove
end
% subregion names... |
github | canlab/CANlab_help_examples-master | c2b_SVM_betweenperson_contrasts.m | .m | CANlab_help_examples-master/Second_level_analysis_template_scripts/core_scripts_to_run_without_modifying/c2b_SVM_betweenperson_contrasts.m | 4,078 | utf_8 | e3d72b62aa9eee7e5af4c3cc94b4126f | % THIS SCRIPT RUNS BETWEEN-PERSON CONTRASTS
% Assuming that groups are concatenated into contrast image lists.
% Requires DAT.BETWEENPERSON.group field specifying group membership for
% each image.
% --------------------------------------------------------------------
%% Load stats
savefilenamedata = fullfile(resultsd... |
github | canlab/CANlab_help_examples-master | prep_3b_run_second_level_regression_on_conditions_and_save.m | .m | CANlab_help_examples-master/Second_level_analysis_template_scripts/core_scripts_to_run_without_modifying/prep_3b_run_second_level_regression_on_conditions_and_save.m | 9,949 | utf_8 | df2b8510f40c68d1392465215e1b9d73 | % THIS SCRIPT RUNS BETWEEN-PERSON (2nd-level) Regression analyses
% for each within-person CONTRAST registered in the analysis
%
% - To specify analysis options, run a2_set_default_options
% - prep_3a_run_second_level_regression_and_save runs regressions and saves
% results in a standard location and format
% - To get... |
github | canlab/CANlab_help_examples-master | plugin_add_metadata_to_DATA_OBJ.m | .m | CANlab_help_examples-master/Second_level_analysis_template_scripts/core_scripts_to_run_without_modifying/plugin_add_metadata_to_DATA_OBJ.m | 4,337 | utf_8 | 333e53471f7fa28953d3bf82bcd720de | % This script works with the CANlab batch scripts to add meta-data to
% DATA_OBJ and DATA_OBJsc image data in data_objects.mat and
% data_objects_scaled.mat, and contrast_data_objects.mat
% define basedir and resultsdir first, e.g.:
% basedir = ('/Users/f003vz1/Dropbox (Dartmouth College)/A4_PUBLISHED_KeepHandy/Wager_... |
github | canlab/CANlab_help_examples-master | d14_kragel_emotion_signature_similarity_barplots.m | .m | CANlab_help_examples-master/Second_level_analysis_template_scripts/core_scripts_to_run_without_modifying/d14_kragel_emotion_signature_similarity_barplots.m | 4,366 | utf_8 | a440855da167ab6293d11bc62a3097b2 | % You can run this with a new image set by changing only the two lines below:
figtitlebase = 'Kragel Emotion signatures Cosine Similarity';
image_set_name = 'kragelemotion'; % keyword for named set to pass into load_image_set
[mapset, netnames] = load_image_set(image_set_name);
C=hsv(7); C=C([2 5 1 4 7 6 3],:); fo... |
github | canlab/CANlab_help_examples-master | k_emotionmeta_pattern_and_region_analyses.m | .m | CANlab_help_examples-master/Second_level_analysis_template_scripts/core_scripts_to_run_without_modifying/k_emotionmeta_pattern_and_region_analyses.m | 10,145 | utf_8 | 08d535d1828731690c4ecd6a195285f3 | roimask_imagename = 'Buhle_Silvers_2014_Emotion_Regulation_Meta_thresh.img';
roimask = which(roimask_imagename); % not 1/0
%% Add this to access the roimask
if isempty(which(roimask))
gunzip(which([roimask_imagename, '.gz']))
end
roimask_shortname = 'EmoMetaMask'; % this is a short, unique name identifying this ... |
github | canlab/CANlab_help_examples-master | prep_3c_run_SVMs_on_contrasts_masked.m | .m | CANlab_help_examples-master/Second_level_analysis_template_scripts/core_scripts_to_run_without_modifying/prep_3c_run_SVMs_on_contrasts_masked.m | 6,866 | utf_8 | 092aca91a33be433f109088faf9d5f98 | % THIS SCRIPT RUNS SVMs for WITHIN-PERSON CONTRASTS
% Specified in DAT.contrasts
% Note: See also canlab_run_paired_SVM
% --------------------------------------------------------------------
% USER OPTIONS
% This is a standard block of code that can be used in multiple scripts.
% Each script will have its own options ... |
github | canlab/CANlab_help_examples-master | mlpcr_demo.m | .m | CANlab_help_examples-master/published_html/mlpcr_demo.m/mlpcr_demo.m | 43,390 | utf_8 | d4a8c21fc52bde36e1d4a1f5b1b400e9 | %% Multivariate MVPA prediction with between and within component interpretation
% This tutorial addresses how to use the canlab multilevel PCR method for
% multivariate analysis using canlab tools (it can also be invoked directly
% though using mlpcr2.m in canlabCore on raw data without any canlabCore
% dependencies... |
github | canlab/CANlab_help_examples-master | hyp_opt_and_mlpcr_demo.m | .m | CANlab_help_examples-master/hyp_opt_and_mlpcr/hyp_opt_and_mlpcr_demo.m | 51,610 | utf_8 | 32dd0bfd88909ee35be5dde33eb53bc6 |
%% Multivariate prediction with Bayesian hyperparameter estimation
% This tutorial addresses two distinct but complementary problems. The
% first is on how to use the canlab multilevel PCR method for multivariate
% analysis. The second is to address the use of Bayesian optimization for
% hyperparameter selection, whi... |
github | irolaina/FCRN-DepthPrediction-master | evaluateNYU.m | .m | FCRN-DepthPrediction-master/matlab/evaluateNYU.m | 4,456 | utf_8 | abc06d4d550f3bdd2beb91d52dce202b | function evaluateNYU
% Evaluation of depth prediction on NYU Depth v2 dataset.
% -------------------------------------------------------------------------
% Setup MatConvNet
% -------------------------------------------------------------------------
% Set your matconvnet path here:
matconvnet_path = '../..... |
github | irolaina/FCRN-DepthPrediction-master | setupMatConvNet.m | .m | FCRN-DepthPrediction-master/matlab/setupMatConvNet.m | 938 | utf_8 | 49cad5f5a9f5b03eb316e788b56a6486 | function setupMatConvNet(matconvnet_path)
% check path
if ~exist(fullfile(matconvnet_path, 'matlab', 'vl_setupnn.m'), 'file')
error('Count not find MatConvNet in "%s"!\nPlease point matcovnet_path to the correct directory.\n', matconvnet_path);
end
% check if it is the right version (beta-20)
mcnv = getMa... |
github | irolaina/FCRN-DepthPrediction-master | evaluateMake3D.m | .m | FCRN-DepthPrediction-master/matlab/evaluateMake3D.m | 4,651 | utf_8 | 96f89ba489490bd8a467d4fdc4a7c53f | function evaluateMake3D
% Evaluation of depth prediction on Make3D dataset.
% -------------------------------------------------------------------------
% Setup MatConvNet
% -------------------------------------------------------------------------
% Set your matconvnet path here:
matconvnet_path = '../../mat... |
github | rmgk/Signal-Android-master | echo_diagnostic.m | .m | Signal-Android-master/jni/libspeex/echo_diagnostic.m | 2,076 | utf_8 | 8d5e7563976fbd9bd2eda26711f7d8dc | % Attempts to diagnose AEC problems from recorded samples
%
% out = echo_diagnostic(rec_file, play_file, out_file, tail_length)
%
% Computes the full matrix inversion to cancel echo from the
% recording 'rec_file' using the far end signal 'play_file' using
% a filter length of 'tail_length'. The output is saved to 'o... |
github | rmgk/Signal-Android-master | plot_neteq_delay.m | .m | Signal-Android-master/jni/webrtc/modules/audio_coding/neteq/test/delay_tool/plot_neteq_delay.m | 5,563 | utf_8 | 8b6a66813477863da513b1e6971dbc97 | function [delay_struct, delayvalues] = plot_neteq_delay(delayfile, varargin)
% InfoStruct = plot_neteq_delay(delayfile)
% InfoStruct = plot_neteq_delay(delayfile, 'skipdelay', skip_seconds)
%
% Henrik Lundin, 2006-11-17
% Henrik Lundin, 2011-05-17
%
try
s = parse_delay_file(delayfile);
catch
error(lasterr);
e... |
github | tum-vision/csd_lmnn-master | compute_wks_shape.m | .m | csd_lmnn-master/code/point_desc/compute_wks_shape.m | 2,549 | utf_8 | 5fc2095dc15a51883a4503eeaf018f03 | % This is a modified version of the Wave Kernel Signature described
% in the paper:
%
% The Wave Kernel Signature: A Quantum Mechanical Approach To Shape Analysis
% M. Aubry, U. Schlickewei, D. Cremers
% In IEEE International Conference on Computer Vision (ICCV) - Workshop on
% Dynamic Shape Capture and ... |
github | tum-vision/csd_lmnn-master | SHREC14Eval_modif.m | .m | csd_lmnn-master/code/utils/SHREC14Eval_modif.m | 6,722 | utf_8 | 5b139084f47f10d0eb43075d3a9b3ca3 | function results = SHREC14Eval_modif(rankings, C, task)
% SHREC14Eval(inRank, inCla, outResult)
% Evaluated the results of a method submitted to the SHREC 14 Non-Rigid
% Human Models track (Pickup et al.).
% Variables:
% results - statistical results.
% inRank - filename of file containing the retrieval rankings.
% inC... |
github | tum-vision/csd_lmnn-master | normalize.m | .m | csd_lmnn-master/code/utils/normalize.m | 550 | utf_8 | 56789c01934eecb411578bb556836cc7 | % Y = normalize(X,p,dim)
% Lp normalization of a matrix X along dimension dim
%
% (C) Copyright Alex Bronstein, Michael Bronstein, Maks Ovsjanikov,
% Stanford University, 2009. All Rights Reserved.
function [Y,n] = normalize(X,p,dim)
if nargin < 3, dim = 1; end
if ischar(p),
switch(upper(p)),
c... |
github | tum-vision/csd_lmnn-master | hks.m | .m | csd_lmnn-master/code/thirdparty/point_desc/hks.m | 794 | utf_8 | 85d4f222a511093b399bda2595e0fec7 | % Computes heat kernel signature H_t(x,x), where H_t(x,y) is the heat kernel
%
% Usage: desc = hks(evecs,evals,T)
%
% Input: evecs - (n x k) Laplace-Beltrami eigenvectors arranged as columns
% evals - (k x 1) corresponding Laplace-Beltrami eigenvalues
% T - (1 x t) time values
%
% ... |
github | tum-vision/csd_lmnn-master | compute_wks.m | .m | csd_lmnn-master/code/thirdparty/point_desc/compute_wks.m | 6,374 | utf_8 | fb29da9bc85e6a822fdd05d9c3c31156 | % This is the implementation of the Wave Kernel Signature described
% in the paper:
%
% The Wave Kernel Signature: A Quantum Mechanical Approach To Shape Analysis
% M. Aubry, U. Schlickewei, D. Cremers
% In IEEE International Conference on Computer Vision (ICCV) - Workshop on
% Dynamic Shape Capture and ... |
github | tum-vision/csd_lmnn-master | sihks.m | .m | csd_lmnn-master/code/thirdparty/point_desc/sihks.m | 1,273 | utf_8 | 478ce1aabc6e5b8f983856bb02b99d60 | % Computes scale-covariant and scale-invariant heat kernel signature (SI-HKS)
%
% Usage: [sc,si] = sihks(evecs,evals,T,Omega)
%
% Input: evecs - (n x k) Laplace-Beltrami eigenvectors arranged as columns
% evals - (k x 1) corresponding Laplace-Beltrami eigenvalues
% alpha - log scalespace... |
github | tum-vision/csd_lmnn-master | MNISTdeskew.m | .m | csd_lmnn-master/code/thirdparty/LMNN/usefulstuff/MNISTdeskew.m | 2,017 | utf_8 | 2b631481ebf952d62928244fb5d1c2ba | function [images,labels] = NIST_LoadImages(imageFile,labelFile,id)
% function [images,labels] = NIST_LoadImages(imageFile,labelFile,id)
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% LABELS
tic;
fid = fopen(labelFile,'r');
labelHeaderSize = 8;
header = fread(fid,labelHeaderSize,'uchar');
la... |
github | tum-vision/csd_lmnn-master | makesplits.m | .m | csd_lmnn-master/code/thirdparty/LMNN/usefulstuff/nca/helperfunctions/makesplits.m | 1,798 | utf_8 | 4dd18a2145ef054cb85aafd385f84c49 | function [train,test]=makesplits(y,split,splits,classsplit,k,dummy)
% function [train,test]=makesplits(y,split,splits,classsplit)
%
% SPLITS "y" into "splits" sets with a "split" ratio.
% if classsplit==1 then it takes a "split" fraction from each class
%
if(split==1)
train=randperm(length(y));
test=[];
r... |
github | tum-vision/csd_lmnn-master | knncl.m | .m | csd_lmnn-master/code/thirdparty/LMNN/usefulstuff/nca/helperfunctions/knncl.m | 3,183 | utf_8 | ad8f364cff5e34407b86603bfc8e6f0f | function [Eval,Details]=knncl(L,xTr,lTr,xTe,lTe,KK,varargin)
% function [Eval,Details]=knncl(L,xTr,yTr,xTe,yTe,Kg);
%
% INPUT:
% L : transformation matrix (learned by LMNN)
% xTr : training vectors (each column is an instance)
% yTr : training labels (row vector!!)
% xTe : test vectors
% yTe : test la... |
github | tum-vision/csd_lmnn-master | WolfeLineSearch.m | .m | csd_lmnn-master/code/thirdparty/LMNN/lmnn3/minFunc_2012/minFunc/WolfeLineSearch.m | 10,590 | utf_8 | f962bc5ae0a1e9f80202a9aaab106dab | function [t,f_new,g_new,funEvals,H] = WolfeLineSearch(...
x,t,d,f,g,gtd,c1,c2,LS_interp,LS_multi,maxLS,progTol,debug,doPlot,saveHessianComp,funObj,varargin)
%
% Bracketing Line Search to Satisfy Wolfe Conditions
%
% Inputs:
% x: starting location
% t: initial step size
% d: descent direction
% f: function v... |
github | tum-vision/csd_lmnn-master | minFunc_processInputOptions.m | .m | csd_lmnn-master/code/thirdparty/LMNN/lmnn3/minFunc_2012/minFunc/minFunc_processInputOptions.m | 4,103 | utf_8 | 8822581c3541eabe5ce7c7927a57c9ab |
function [verbose,verboseI,debug,doPlot,maxFunEvals,maxIter,optTol,progTol,method,...
corrections,c1,c2,LS_init,cgSolve,qnUpdate,cgUpdate,initialHessType,...
HessianModify,Fref,useComplex,numDiff,LS_saveHessianComp,...
Damped,HvFunc,bbType,cycle,...
HessianIter,outputFcn,useMex,useNegCurv,precFunc... |
github | tum-vision/csd_lmnn-master | makesplits.m | .m | csd_lmnn-master/code/thirdparty/LMNN/lmnn3/helperfunctions/makesplits.m | 1,798 | utf_8 | 4dd18a2145ef054cb85aafd385f84c49 | function [train,test]=makesplits(y,split,splits,classsplit,k,dummy)
% function [train,test]=makesplits(y,split,splits,classsplit)
%
% SPLITS "y" into "splits" sets with a "split" ratio.
% if classsplit==1 then it takes a "split" fraction from each class
%
if(split==1)
train=randperm(length(y));
test=[];
r... |
github | tum-vision/csd_lmnn-master | scat.m | .m | csd_lmnn-master/code/thirdparty/LMNN/lmnn3/helperfunctions/scat.m | 3,237 | utf_8 | bb0f1b966edbe2f02523ba92cf9794a1 | function H=scat(Y,d,color,varargin);
% function scat(Y,d,color,varargin);
%
% displays points in Y with neigghbors from X
% within d dimensions
% and color
%
% Optional: pars.size size of ball (40 default)
% pars.circles=0 switches circles off
% pars.cla=0 does not clear screen
% par... |
github | tum-vision/csd_lmnn-master | energyclassify.m | .m | csd_lmnn-master/code/thirdparty/LMNN/lmnn3/helperfunctions/energyclassify.m | 3,087 | utf_8 | e2660f14be334b895bd9ea909c3fd0c2 | function [err,yy,Value]=energyclassify(L,x,y,xTest,yTest,Kg,varargin);
% function [err,yy,Value]=energyclassify(L,xTr,yTr,xTe,yTe,Kg,varargin);
%
% INPUT:
% L : transformation matrix (learned by LMNN)
% xTr : training vectors (each column is an instance)
% yTr : training labels (row vector!!)
% xTe : test... |
github | tum-vision/csd_lmnn-master | knncl.m | .m | csd_lmnn-master/code/thirdparty/LMNN/lmnn3/helperfunctions/knncl.m | 3,183 | utf_8 | ad8f364cff5e34407b86603bfc8e6f0f | function [Eval,Details]=knncl(L,xTr,lTr,xTe,lTe,KK,varargin)
% function [Eval,Details]=knncl(L,xTr,yTr,xTe,yTe,Kg);
%
% INPUT:
% L : transformation matrix (learned by LMNN)
% xTr : training vectors (each column is an instance)
% yTr : training labels (row vector!!)
% xTe : test vectors
% yTe : test la... |
github | tum-vision/csd_lmnn-master | bayesopt.m | .m | csd_lmnn-master/code/thirdparty/LMNN/lmnn3/lmnncore/bayesopt.m | 18,771 | utf_8 | ffe5d305c8c48f44b9d04df1e20f250d | function [minsample,minvalue,botrace] = bayesopt(F,opt)
warning('off')
% Check options for minimum level of validity
check_opts(opt);
% Are we doing CBO?
if isfield(opt,'do_cbo') && opt.do_cbo,
DO_CBO = true;
else
DO_CBO = false;
con_values = []; % Dummy value, won't actually be used
end
if ... |
github | tum-vision/csd_lmnn-master | lmnnFindImps.m | .m | csd_lmnn-master/code/thirdparty/LMNN/lmnn3/lmnncore/lmnnFindImps.m | 1,048 | utf_8 | e7beedb16964a2c896d12a38d7b302c1 | function imp=lmnnFindImps(Lx,y)
global NN
global pars
Ni=sum((Lx-Lx(:,NN(end,:))).^2,1)+2;
un=unique(y);
imp=[];
for c=un(1:end-1)
i=find(y==c);
index=find(y>c);
%% experimental
ir=randperm(length(i));ir=ir(1:ceil(length(ir)*pars.subsample));
ir2=randperm(length(index));ir2=ir2(1:ceil(length(ir2)*pars.subsample... |
github | tum-vision/csd_lmnn-master | findLMNNparams.m | .m | csd_lmnn-master/code/thirdparty/LMNN/lmnn3/lmnncore/findLMNNparams.m | 2,652 | utf_8 | be77289798a33f279a298e357d444adf | function [Klmnn,knn,outdim,maxiter]=findLMNNparams(xTr,yTr,xVa,yVa,varargin)
%function [Klmnn,knn,outdim,maxiter]=findLMNNparams(xTr,yTr,xVa,yVa,varargin)
% This function automatically finds the best hyper-parameters for LMNN
% Please see demo2.m for a use case.
%
% copyright Kilian Weinberger 2015
startup;
%% creat... |
github | tum-vision/csd_lmnn-master | lmnnInit.m | .m | csd_lmnn-master/code/thirdparty/LMNN/lmnn3/lmnncore/lmnnInit.m | 1,283 | utf_8 | 63f0c6720d9cfb9862db7525fa031aef | function lmnnInit(x,y,Kg,varargin)
pars.quiet=0;
pars.Ki=50;
pars=extractpars(varargin,pars);
global dfG % gradient component of target neighbors
global NN
global imp
global Gx
global Gy
Ki=pars.Ki;
if(~pars.quiet);fprintf('Computing nearest neighbors ...\n');end;
[~,N]=size(x);
un=unique(y);
NN=zeros(Kg,N);... |
github | tum-vision/csd_lmnn-master | likBeta.m | .m | csd_lmnn-master/code/thirdparty/LMNN/lmnn3/lmnncore/gpml/lik/likBeta.m | 4,830 | utf_8 | 8e503690924874d07a77dc48bc238db1 | function [varargout] = likBeta(link, hyp, y, mu, s2, inf, i)
% likBeta - Beta likelihood function for interval data y from [0,1].
% The expression for the likelihood is
% likBeta(f) = 1/Z * y^(mu*phi-1) * (1-y)^((1-mu)*phi-1) with
% mean=mu and variance=mu*(1-mu)/(1+phi) where mu = g(f) is the Beta intensity,
% f ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.