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
bsxfan/meta-embeddings-master
tracer.m
.m
meta-embeddings-master/code/Niko/matlab/fous-y-tout/bosaris_toolkit/utility_funcs/Optimization_Toolkit/MV2DF/function_library/test/tracer.m
1,081
utf_8
5e8d7ea9aefc9d1c1cc8161546bd9483
function [w,deriv] = tracer(w,vstring,gstring,jstring) % This is an MV2DF. See MV2DF_API_DEFINITION.readme. % % Applies linear transform y = map(w). It needs the transpose of map, % transmap for computing the gradient. map and transmap are function % handles. if nargin==0 test_this(); return; end if nargin<2...
github
bsxfan/meta-embeddings-master
test_MV2DF_noHess.m
.m
meta-embeddings-master/code/Niko/matlab/fous-y-tout/bosaris_toolkit/utility_funcs/Optimization_Toolkit/MV2DF/function_library/test/test_MV2DF_noHess.m
1,125
utf_8
2af48174c2441c011dffbf316b93612d
function test_MV2DF_noHess(f,x0) %id_in = identity_trans([]); %id_out = identity_trans([]); %f = f(id_in); %f = id_out(f); x0 = x0(:); Jc = cstepJacobian(f,x0); Jr = rstepJacobian(f,x0); [y0,deriv] = f(x0); m = length(y0); n = length(x0); J2 = zeros(size(Jr)); for i=1:m; y = zeros(m,1); y(i) = 1; J2(i,...
github
bsxfan/meta-embeddings-master
inv_lu2.m
.m
meta-embeddings-master/code/Niko/matlab/fous-y-tout/bosaris_toolkit/utility_funcs/Optimization_Toolkit/MV2DF/utils/inv_lu2.m
1,044
utf_8
8fa16d13c5b1ad8e681b3f2ba0f9b2c9
function [inv_map,bi_inv_map,logdet,invA] = inv_lu2(A) % INV_LU2 % Does a LU decomposition on A and returns logdet, inverse and % two function handles that respectively map X to A\X and A\X/A. % if nargin==0 test_this(); return; end [L,T,p] = lu(A,'vector'); P = sparse(p,1:length(p),1); % P...
github
bsxfan/meta-embeddings-master
invchol2.m
.m
meta-embeddings-master/code/Niko/matlab/fous-y-tout/bosaris_toolkit/utility_funcs/Optimization_Toolkit/MV2DF/utils/invchol2.m
968
utf_8
936256e3c3a28ed65ad0c15d9fbb04cd
function [inv_map,bi_inv_map,logdet,invA] = invchol2(A) % INVCHOL2 % Does a Cholesky decomposition on A and returns logdet, inverse and % two function handles that respectively map X to A\X and A\X/A. % if nargin==0 test_this(); return; end if isreal(A) R = chol(A); %R'*R = A inv_map = @(X) R\(R'\X);...
github
bsxfan/meta-embeddings-master
invchol_or_lu.m
.m
meta-embeddings-master/code/Niko/matlab/fous-y-tout/bosaris_toolkit/utility_funcs/Optimization_Toolkit/MV2DF/utils/invchol_or_lu.m
1,418
utf_8
468d08dd52dd54bb77a471a5e2d0a856
function [inv_map,bi_inv_map,logdet,invA] = invchol_or_lu(A) % INVCHOL_OR_LU % Does a Cholesky decomposition on A and returns logdet, inverse and % two function handles that respectively map X to A\X and A\X/A. % if nargin==0 test_this(); return; end if isreal(A) R = chol(A); %R'*R = A inv_map = @(X)...
github
bsxfan/meta-embeddings-master
invchol_taylor.m
.m
meta-embeddings-master/code/Niko/matlab/fous-y-tout/bosaris_toolkit/utility_funcs/Optimization_Toolkit/MV2DF/utils/invchol_taylor.m
1,241
utf_8
0f52f57c84dc1ae326e32c031541c496
function [inv_map,logdet] = invchol_taylor(A) % Does a Cholesky decomposition on A and returns: % inv_map: a function handle to solve for X in AX = B % logdet (of A) % % This code is designed to work correctly if A has a small complex % perturbation, such as used in complex step differentiation, even though % the ...
github
bsxfan/meta-embeddings-master
train_system.m
.m
meta-embeddings-master/code/Niko/matlab/fous-y-tout/bosaris_toolkit/utility_funcs/Optimization_Toolkit/MV2DF/discrim_training/train_system.m
4,969
utf_8
69b1726b853595599d4a79414b256c8b
function [w,mce,divergence,w_pen,c_pen,optimizerState,converged] = train_system(classf,system,penalizer,W0,lambda,confusion,maxiters,maxCG,prior,optimizerState) % % Supervised training of a regularized K-class linear logistic % regression. Allows regularization via weight penalties and via % label confusion prob...
github
bsxfan/meta-embeddings-master
sum_of_functions.m
.m
meta-embeddings-master/code/Niko/matlab/fous-y-tout/bosaris_toolkit/utility_funcs/Optimization_Toolkit/MV2DF/function_combination/sum_of_functions.m
1,094
utf_8
af1885792c3ce587c098ffc61a10cc06
function [y,deriv] = sum_of_functions(w,weights,f,g) % This is an MV2DF (see MV2DF_API_DEFINITION.readme) which % represents the new function, s(w), obtained by summing the % weighted outputs of the given functions: % s(w) = sum_i weights(i)*functions{i}(w) % % Usage examples: % % s = @(w) sum_of_functions(w,[1,...
github
bsxfan/meta-embeddings-master
scale_function.m
.m
meta-embeddings-master/code/Niko/matlab/fous-y-tout/bosaris_toolkit/utility_funcs/Optimization_Toolkit/MV2DF/function_combination/scale_function.m
856
utf_8
fae26a24cbea0fcc7ae35cf1642b18e4
function [y,deriv] = scale_function(w,scale,f) % This is an MV2DF (see MV2DF_API_DEFINITION.readme) which % represents the new function, % % g(w) = scale(w)*f(w), % % where scale is scalar-valued and f is matrix-valued. % % % Here scale and f are function handles to MV2DF's. if nargin==0 test_this(); r...
github
bsxfan/meta-embeddings-master
outerprod_of_functions.m
.m
meta-embeddings-master/code/Niko/matlab/fous-y-tout/bosaris_toolkit/utility_funcs/Optimization_Toolkit/MV2DF/function_combination/outerprod_of_functions.m
1,085
utf_8
731782f761b675bb6d3567ddb560c950
function [y,deriv] = outerprod_of_functions(w,f,g,m,n) % This is an MV2DF (see MV2DF_API_DEFINITION.readme) which % represents the new function, % % g(w) = f(w)g(w)' % % where f(w) and g(w) are column vectors of sizes m and n respectively. % % Here f,g are function handles to MV2DF's. if nargin==0 test_thi...
github
bsxfan/meta-embeddings-master
interleave.m
.m
meta-embeddings-master/code/Niko/matlab/fous-y-tout/bosaris_toolkit/utility_funcs/Optimization_Toolkit/MV2DF/function_combination/interleave.m
2,028
utf_8
0cdd5849311559d9813888914f7530cd
function [y,deriv] = interleave(w,functions) % interleave is an MV2DF (see MV2DF_API_DEFINITION.readme) which % represents the new function, s(w), obtained by interleaving the outputs of % f() and g() thus: % % S(w) = [f(w)';g(w)']; % s(w) = S(:); if nargin==0 test_this(); return; end if isempty(w)...
github
bsxfan/meta-embeddings-master
shift_function.m
.m
meta-embeddings-master/code/Niko/matlab/fous-y-tout/bosaris_toolkit/utility_funcs/Optimization_Toolkit/MV2DF/function_combination/shift_function.m
896
utf_8
82abefaa89d6e02403f0b543a3c69a0b
function [y,deriv] = shift_function(w,shift,f) % This is an MV2DF (see MV2DF_API_DEFINITION.readme) which % represents the new function, % % g(w) = shift(w)+f(w), % % where shift is scalar-valued and f is matrix-valued. % % % Here shift and f are function handles to MV2DF's. if nargin==0 test_this(); r...
github
bsxfan/meta-embeddings-master
dotprod_of_functions.m
.m
meta-embeddings-master/code/Niko/matlab/fous-y-tout/bosaris_toolkit/utility_funcs/Optimization_Toolkit/MV2DF/function_combination/dotprod_of_functions.m
952
utf_8
2999899143500736ecbc06d5afc09df0
function [y,deriv] = dotprod_of_functions(w,f,g) % This is an MV2DF (see MV2DF_API_DEFINITION.readme) which % represents the new function, % % g(w) = f(w)'g(w) % % where f(w) and g(w) are column vectors of the same size. % % Here f,g are function handles to MV2DF's. if nargin==0 test_this(); return; en...
github
bsxfan/meta-embeddings-master
dottimes_of_functions.m
.m
meta-embeddings-master/code/Niko/matlab/fous-y-tout/bosaris_toolkit/utility_funcs/Optimization_Toolkit/MV2DF/function_combination/dottimes_of_functions.m
641
utf_8
45195e5dddb789f3431e2f84495b06c7
function [y,deriv] = dottimes_of_functions(w,A,B) % This is an MV2DF (see MV2DF_API_DEFINITION.readme) % % w --> A(w) .* B(w) % % Here A and B are function handles to MV2DF's. if nargin==0 test_this(); return; end if isempty(w) s = stack(w,A,B); y = dottimes(s); return; end if isa(w,'fun...
github
bsxfan/meta-embeddings-master
replace_hessian.m
.m
meta-embeddings-master/code/Niko/matlab/fous-y-tout/bosaris_toolkit/utility_funcs/Optimization_Toolkit/MV2DF/function_combination/replace_hessian.m
1,399
utf_8
1e948d50795df5102876278fd5022da8
function [y,deriv] = replace_hessian(w,f,cstep) % This is an MV2DF. See MV2DF_API_DEFINITION.readme. % if nargin==0 test_this(); return; end if isempty(w) y = @(w)replace_hessian(w,f,cstep); return; end if isa(w,'function_handle') outer = replace_hessian([],f,cstep); y = compose_mv(outer,w,[...
github
bsxfan/meta-embeddings-master
product_of_functions.m
.m
meta-embeddings-master/code/Niko/matlab/fous-y-tout/bosaris_toolkit/utility_funcs/Optimization_Toolkit/MV2DF/function_combination/product_of_functions.m
745
utf_8
ae86bc0a8429bacd6044704a6a8a0e06
function [y,deriv] = product_of_functions(w,A,B,m,k,n) % This is an MV2DF (see MV2DF_API_DEFINITION.readme) % % w --> vec ( reshape(A(w),m,k) * reshape(B(w),k,n) ) % % Here A and B are function handles to MV2DF's. if nargin==0 test_this(); return; end if isempty(w) s = stack(w,A,B); y = gemm(s,...
github
bsxfan/meta-embeddings-master
stack.m
.m
meta-embeddings-master/code/Niko/matlab/fous-y-tout/bosaris_toolkit/utility_funcs/Optimization_Toolkit/MV2DF/function_combination/stack.m
3,136
utf_8
cbfe5ccd3255b5021692c3eb13e1798f
function [y,deriv] = stack(w,f,g,eqlen) % STACK is an MV2DF (see MV2DF_API_DEFINITION.readme) which % represents the new function, s(w), obtained by stacking the outputs of % f() and g() thus: % s(w) = [f(w);g(w)] if nargin==0 test_this(); return; end if ~exist('eqlen','var') eqlen = false; end if i...
github
bsxfan/meta-embeddings-master
scale_and_translate.m
.m
meta-embeddings-master/code/Niko/matlab/fous-y-tout/bosaris_toolkit/utility_funcs/Optimization_Toolkit/MV2DF/function_combination/scale_and_translate.m
1,341
utf_8
121b1cd2e23a3d7111f310db8e3b6a05
function [y,deriv] = scale_and_translate(w,vectors,params,m,n) % This is an MV2DF (see MV2DF_API_DEFINITION.readme) which % represents the new function, obtained by scaling and translating the % column vectors of the output matrix of the function vectors(w). The % scaling and translation parameters, params(w) is also...
github
bsxfan/meta-embeddings-master
compose_mv.m
.m
meta-embeddings-master/code/Niko/matlab/fous-y-tout/bosaris_toolkit/utility_funcs/Optimization_Toolkit/MV2DF/function_combination/compose_mv.m
2,958
utf_8
108f7eb78b4ff77e907d369fc9ae14db
function [y,deriv] = compose_mv(outer,inner,x) % COMPOSE_MV is an MV2DF (see MV2DF_API_DEFINITION.readme) which represents % the combination of two functions. If 'outer' is an MV2DF for a function % g() and 'inner' for a function f(), then this MV2DF represents g(f(x)). %feature scopedaccelenablement off if nargin==0...
github
bsxfan/meta-embeddings-master
pav_calibration.m
.m
meta-embeddings-master/code/Niko/matlab/fous-y-tout/bosaris_toolkit/calibration/pav_calibration.m
2,716
utf_8
2a9298835be5d7757fb4d660a5a2d7b3
function [pav_trans,score_bounds,llr_bounds] = pav_calibration(tar,non,small_val) % Creates a calibration transformation function using the PAV algorithm. % Inputs: % tar: A vector of target scores. % non: A vector of non-target scores. % small_val: An offset to make the transformation function % invertible. ...
github
bsxfan/meta-embeddings-master
align_with_ndx.m
.m
meta-embeddings-master/code/Niko/matlab/fous-y-tout/bosaris_toolkit/classes/@Scores/align_with_ndx.m
2,628
utf_8
5899b5e5bd43dea8280d84cea8fdf0ec
function aligned_scr = align_with_ndx(scr,ndx) % The ordering in the output Scores object corresponds to ndx, so % aligning several Scores objects with the same ndx will result in % them being comparable with each other. % Inputs: % scr: a Scores object % ndx: a Key or Ndx object % Outputs: % aligned_scr: scr res...
github
bsxfan/meta-embeddings-master
filter.m
.m
meta-embeddings-master/code/Niko/matlab/fous-y-tout/bosaris_toolkit/classes/@Scores/filter.m
2,622
utf_8
ebaa2297b42e23384ffa07c12bdcc005
function outscr = filter(inscr,modlist,seglist,keep) % Removes some of the information in a Scores object. Useful for % creating a gender specific score set from a pooled gender score % set. Depending on the value of 'keep', the two input lists % indicate the models and test segments (and their associated % scores) t...
github
bsxfan/meta-embeddings-master
filter.m
.m
meta-embeddings-master/code/Niko/matlab/fous-y-tout/bosaris_toolkit/classes/@Key/filter.m
3,047
utf_8
9274e13ab0bf80ca9a90fd6f46da8ff0
function outkey = filter(inkey,modlist,seglist,keep) % Removes some of the information in a key. Useful for creating a % gender specific key from a pooled gender key. Depending on the % value of 'keep', the two input lists indicate the strings to % retain or the strings to discard. % Inputs: % inkey: A Key object. ...
github
bsxfan/meta-embeddings-master
read_hdf5.m
.m
meta-embeddings-master/code/Niko/matlab/fous-y-tout/bosaris_toolkit/classes/@Key/read_hdf5.m
1,196
utf_8
4057278a996259de22fed6ee29c5d3b2
function key = read_hdf5(infilename) % Reads a Key object from an hdf5 file. % Inputs: % infilename: The name for the hdf5 file to read. % Outputs: % key: A Key object created from the information in the hdf5 % file. assert(nargin==1) assert(isa(infilename,'char')) key = Key(); key.modelset = h5strings_to_ce...
github
bsxfan/meta-embeddings-master
filter.m
.m
meta-embeddings-master/code/Niko/matlab/fous-y-tout/bosaris_toolkit/classes/@Ndx/filter.m
2,788
utf_8
6d39760ecafc786f43259d1adb98a810
function outndx = filter(inndx,modlist,seglist,keep) % Removes some of the information in an Ndx. Useful for creating a % gender specific Ndx from a pooled gender Ndx. Depending on the % value of 'keep', the two input lists indicate the strings to % retain or the strings to discard. % Inputs: % inndx: An Ndx object...
github
bsxfan/meta-embeddings-master
read_hdf5.m
.m
meta-embeddings-master/code/Niko/matlab/fous-y-tout/bosaris_toolkit/classes/@Ndx/read_hdf5.m
838
utf_8
424ae971c22eb22cf8c27af6130b9698
function ndx = read_hdf5(infilename) % Creates an Ndx object from the information in an hdf5 file. % Inputs: % infilename: The name of the hdf5 file contain the information % necessary to construct an Ndx object. % Outputs: % ndx: An Ndx object containing the information in the input % file. assert(nargin=...
github
bsxfan/meta-embeddings-master
filter_on_right.m
.m
meta-embeddings-master/code/Niko/matlab/fous-y-tout/bosaris_toolkit/classes/@Id_Map/filter_on_right.m
1,885
utf_8
deb124220c828ae065475bc93957d53f
function out_idmap = filter_on_right(in_idmap,idlist,keep) % Removes some of the information in an idmap. Depending on the % value of 'keep', the idlist indicates the strings to retain or % the strings to discard. % Inputs: % in_idmap: An Id_Map object to be pruned. % idlist: A cell array of strings which will be ...
github
bsxfan/meta-embeddings-master
read_hdf5.m
.m
meta-embeddings-master/code/Niko/matlab/fous-y-tout/bosaris_toolkit/classes/@Id_Map/read_hdf5.m
777
utf_8
47581f23817e49ffc325aed95a088106
function idmap = read_hdf5(infilename) % Creates an Id_Map object from the information in an hdf5 file. % Inputs: % infilename: The name of the hdf5 file containing the information % necessary to construct an Id_Map object. % Outputs: % idmap: An Id_Map object containing the information in the input % file....
github
bsxfan/meta-embeddings-master
filter_on_left.m
.m
meta-embeddings-master/code/Niko/matlab/fous-y-tout/bosaris_toolkit/classes/@Id_Map/filter_on_left.m
1,871
utf_8
27abe0c92b6ff488892e389fee1fb5e9
function out_idmap = filter_on_left(in_idmap,idlist,keep) % Removes some of the information in an idmap. Depending on the % value of 'keep', the idlist indicates the strings to retain or % the strings to discard. % Inputs: % in_idmap: An Id_Map object to be pruned. % idlist: A cell array of strings which will be c...
github
bsxfan/meta-embeddings-master
L_BFGS.m
.m
meta-embeddings-master/code/Niko/matlab/fous-y-tout/optimization/L_BFGS.m
5,021
utf_8
ccfcc8e580c4dfa191a42bfcbaf055cb
function [w,y,mem,logs] = L_BFGS(obj,w,maxiters,timeout,mem,stpsz0,callback) % L-BFGS Quasi-Newton unconstrained optimizer. % -- This has a small interface change from LBFGS.m -- % % Inputs: % obj: optimization objective, with interface: [y,grad] = obj(w), % where w is the parameter vector, y is the scalar o...
github
bsxfan/meta-embeddings-master
create_PYCRP.m
.m
meta-embeddings-master/code/Niko/matlab/fous-y-tout/CRP/create_PYCRP.m
13,438
utf_8
97417297bf1d08ceaa6be2bbfe82c2bb
function PYCRP = create_PYCRP(alpha,beta,e,n) % alpha: alpha>=0, concentration % beta: 0<= beta <=1, discount if nargin==0 %test_this2(); test_Gibbsmatrix() return; end if nargin==4 PYCRP = create_PYCRP(1,0); PYCRP.set_expected_number_tables(e,n,alpha,be...
github
bsxfan/meta-embeddings-master
rand_fake_Dirichlet.m
.m
meta-embeddings-master/code/Niko/matlab/fous-y-tout/language_recognition/synth_data/rand_fake_Dirichlet.m
810
utf_8
3070cfe2d8487d8ae48c7740fdc24c2d
function R = rand_fake_Dirichlet(alpha,m,n) % This is no longer Dirichlet. I replaced it with a faster ad-hoc % distribution. % % Generates m-by-n matrix of n samples from m-category Dirichlet, with % concentration parameter: alpha > 0. if nargin==0 test_this(); return; end %R = reshape(ra...
github
bsxfan/meta-embeddings-master
create_T_backend.m
.m
meta-embeddings-master/code/Niko/matlab/fous-y-tout/language_recognition/T_backend/create_T_backend.m
6,482
utf_8
ee013ab7facb848049ba586dfb7b6f33
function TBE = create_T_backend(nu,dim,K) % Create a (multivariate) T-distribution generative backend for multiclass classification. % The classes have different means, but the scatter matrix and degrees of % freedom are common to all clases. % % This object provides a method for supervised ML training (EM algorithm), ...
github
bsxfan/meta-embeddings-master
train_TLDIvector.m
.m
meta-embeddings-master/code/Niko/matlab/fous-y-tout/language_recognition/TLDIvector/train_TLDIvector.m
4,374
utf_8
6029b83917586ea3e2977c8fad616093
function [W,Mu,TT] = train_TLDIvector(stats_or_ivectors,N,T,TT,nu,labels,niters,W,Mu) % Inputs: % stats_or_ivectors: can be either F, or ivectors % F: dm-by-n first-order stats (m: UBM size; d: feature dim; n: no segments) % ivectors: k-by-n, classical i-vector point-estimates % N: m-by-n zero order st...
github
bsxfan/meta-embeddings-master
create_diagonalized_C.m
.m
meta-embeddings-master/code/Niko/matlab/fous-y-tout/language_recognition/TLDIvector/create_diagonalized_C.m
4,986
utf_8
c1a642f817fa817097bf89b070af4c04
function C = create_diagonalized_C(B,R,RM,Ra,W,M,a) % Creates object to represent: C = inv(lambda W + B), % % Inputs: % B: positive definite matrix (i-vector dimension) % R: chol(W), so that R'R=W (i-vector dimension) % RM: R*M, where M has language means in columns % Ra: (R')\a, vector (i-vector dime...
github
bsxfan/meta-embeddings-master
create_augmenting_backend.m
.m
meta-embeddings-master/code/Niko/matlab/fous-y-tout/language_recognition/augmentation/create_augmenting_backend.m
3,599
utf_8
852abc76e3f7dfa8796f7015880bc788
function ABE = create_augmenting_backend(nu,dim,T,K,L) % Inputs: % nu: scalar nu>0, t-distribution degrees of freedom % dim: ivector dimension % T: i-vector extr\zctor T-matrix % K: UBM size % L: number of languages if nargin==0 test_this(); return; end assert(dim==size(T,2)); ...
github
bsxfan/meta-embeddings-master
testBackprop_rs.m
.m
meta-embeddings-master/code/Niko/matlab/fous-y-tout/test/testBackprop_rs.m
2,198
utf_8
9d88acaf06002d97bf8eb2fdc07bf7b8
function total = testBackprop_rs(block,X,delta,mask) %same as testFBblock, but with real step if ~iscell(X) X = {X}; end dX = cellrndn(X); if exist('mask','var') assert(length(mask)==length(X)); dX = cellmask(dX,mask); end cX1 = cellstep(X,dX,delta); cX2 = cell...
github
bsxfan/meta-embeddings-master
testBackprop_multi.m
.m
meta-embeddings-master/code/Niko/matlab/fous-y-tout/test/testBackprop_multi.m
2,361
utf_8
ced4a5b7e925d5c00a2d991fb34d012c
function total = testBackprop_multi(block,nout,X,mask) % same as testBackprop, but handles multiple outputs if ~iscell(X) X = {X}; end dX = cellrndn(X); if exist('mask','var') assert(length(mask)==length(X)); dX = cellmask(dX,mask); end cX = cellcomplex(X,dX); D...
github
bsxfan/meta-embeddings-master
testBackprop.m
.m
meta-embeddings-master/code/Niko/matlab/fous-y-tout/test/testBackprop.m
2,015
utf_8
fc73fa404f5441c097eb63f249106078
function total = testBackprop(block,X,mask) if ~iscell(X) X = {X}; end dX = cellrndn(X); if exist('mask','var') assert(length(mask)==length(X)); dX = cellmask(dX,mask); end cX = cellcomplex(X,dX); DX = cell(size(X)); [Y,back] = block(X{:}); ...
github
bsxfan/meta-embeddings-master
create_univariate_Laplace_node.m
.m
meta-embeddings-master/code/Niko/matlab/fous-y-tout/dpmm/create_univariate_Laplace_node.m
2,432
utf_8
723752e00cd25de77113d0e0c21ac71e
function node = create_univariate_Laplace_node(prior) if nargin==0 test_this(); return; end value = prior.sample(); %posterior stuff post_mu = []; %approximate posterior mean post_h = []; %approximate posterior hessian (- precision) %logpost = []; %unnormalized true lo...
github
bsxfan/meta-embeddings-master
create_symmetricDirichlet_node.m
.m
meta-embeddings-master/code/Niko/matlab/fous-y-tout/dpmm/create_symmetricDirichlet_node.m
5,749
utf_8
29d843a52a81df9405bb868555c339bf
function node = create_symmetricDirichlet_node(logalpha,sz) % Creates symmetric Dirichlet node (part of a Bayesian network), that is % equippped to do alternating Gibbs sampling. This node expects a % non-conjugate (upstream) hyper-prior to supply the Dirichlet parameter % alpha. It also expects (downstream) one or mor...
github
bsxfan/meta-embeddings-master
createDPMM.m
.m
meta-embeddings-master/code/Niko/matlab/fous-y-tout/dpmm/createDPMM.m
1,065
utf_8
6c6b4270dc5b4c5c841b1f8101fad8d6
function model = createDPMM(W,B,crp) if nargin==0 test_this(); return; end cholW = chol(W); cholB = chol(B); dim = size(W,1); model.sample = @sample; function [X,Means,hlabels,counts] = sample(n) [labels,counts] = crp.sample(n); m = length(counts)...
github
bsxfan/meta-embeddings-master
create_truncGMM.m
.m
meta-embeddings-master/code/Niko/matlab/fous-y-tout/dpmm/create_truncGMM.m
11,488
utf_8
60dcde7a91887483186b7ebd904866fc
function model = create_truncGMM(W,F,alpha,m) % This is a truncated version of DP micture model, with a specified maximum number of % components. The observations are realted to the hidden cluster variables % like in an SPLDA model. The hidden variable for cluster i is z_i in R^d. % The observations, x_j are in R^D, wh...
github
bsxfan/meta-embeddings-master
test_GMM_Gibbs.m
.m
meta-embeddings-master/code/Niko/matlab/fous-y-tout/dpmm/test_GMM_Gibbs.m
3,062
utf_8
23d78374c004d789decbe42ff4a4e0a9
function test_GMM_Gibbs() close all; dim = 500; tame = 10; sep = 0.6e-3; %increase to move clusters further apart in smulated data %sep = sep*200; %sep = 1; alpha0 = 200; %increase to get more clusters n = 1000; m = 300; alpha = alpha0/m; ...
github
bsxfan/meta-embeddings-master
create_GibbsGMM.m
.m
meta-embeddings-master/code/Niko/matlab/fous-y-tout/dpmm/create_GibbsGMM.m
11,427
utf_8
39c2d8aee27ef2a790747bef2aae64c2
function model = create_GibbsGMM(W,F,alphaPrior,m) % This is a truncated version of DP micture model, with a specified maximum number of % components. The observations are realted to the hidden cluster variables % like in an SPLDA model. The hidden variable for cluster i is z_i in R^d. % The observations, x_j are in R^...
github
bsxfan/meta-embeddings-master
randg.m
.m
meta-embeddings-master/code/Niko/matlab/fous-y-tout/dpmm/randg.m
2,448
utf_8
bf1edfa92d41e108e3e1e2ef55461799
function G = randg(alpha,m,n) % Generates an m-by-n matrix of random gamma variates, having scale = 1 % and shape alpha. % Inputs: % alpha: scalar, vector or matrix % m,n: [optional] size of output matrix. If not given, the size is the % same as that of alpha. If given, then alpha should be m-by-n, or an % m...
github
bsxfan/meta-embeddings-master
test_GMM_Gibbs_Balerion.m
.m
meta-embeddings-master/code/Niko/matlab/fous-y-tout/dpmm/test_GMM_Gibbs_Balerion.m
3,075
utf_8
e0afdf1916c50ecfbb2769db53b73d08
function test_GMM_Gibbs_Balerion() close all; dim = 500; tame = 10; sep = 0.6e-3; %increase to move clusters further apart in smulated data %sep = sep*200; %sep = 1; alpha0 = 1000; %increase to get more clusters n = 100000; m = 2000; alpha = al...
github
bsxfan/meta-embeddings-master
dualAveraging.m
.m
meta-embeddings-master/code/Niko/matlab/fous-y-tout/dpmm/NUTS-matlab-master/dualAveraging.m
3,700
utf_8
95a22ca6047c33503568b405eb9968ef
function [theta, epsilonbar, epsilon_seq, epsilonbar_seq] = dualAveraging(f, theta0, delta, n_warmup, n_updates) % function [theta, epsilonbar, epsilon_seq, epsilonbar_seq] = dualAveraging(f, n_warmup, theta0, delta, n_updates) % % Adjusts the step-size of NUTS by the dual-averaging (stochastic % optimization) algorit...
github
bsxfan/meta-embeddings-master
ESS.m
.m
meta-embeddings-master/code/Niko/matlab/fous-y-tout/dpmm/NUTS-matlab-master/ESS.m
2,793
utf_8
2f52219f2530dd16c3f9b2a395217f66
function [ess, auto_cor] = ESS(x, mu, sigma_sq) % function [ess, auto_cor] = ESS(x, mu, sigma_sq) % % Returns an estimate of effective sample sizes of a Markov chain 'x(:,i)' % for each i. The estimates are based on the monotone positive sequence estimator % of "Practical Markov Chain Monte Carlo" by Geyer (1992). The ...
github
bsxfan/meta-embeddings-master
NUTS.m
.m
meta-embeddings-master/code/Niko/matlab/fous-y-tout/dpmm/NUTS-matlab-master/NUTS.m
8,078
utf_8
7703b67677b18bbfd8fbcce670366463
function [theta, alpha_ave, nfevals, logp, grad] = NUTS(f, epsilon, theta0, logp0, grad0, max_tree_depth) % function [theta, grad, logp, nfevals, alpha_ave] = NUTS(f, epsilon, theta0, max_tree_depth, logp0, grad0) % % Carries out one iteration of No-U-Turn-Sampler. % % Args: % f - function handle: returns the log proba...
github
bsxfan/meta-embeddings-master
ReNUTS.m
.m
meta-embeddings-master/code/Niko/matlab/fous-y-tout/dpmm/NUTS-matlab-master/Recycle/ReNUTS.m
10,790
utf_8
916dd2121fbfb133e73fe81c36d2961b
function [theta, re_theta, alpha_ave, nfevals, logp, grad] = ... ReNUTS(f, epsilon, theta0, nsample, logp0, grad0, max_tree_depth) % function [theta, grad, logp, nfevals, alpha_ave] = ... % ReNUTS(f, epsilon, theta0, n_recycle, logp0, grad0, max_tree_depth) % % Carries out one iteration of Recycled No-U-Turn-Sa...
github
bsxfan/meta-embeddings-master
d2p.m
.m
meta-embeddings-master/code/Niko/matlab/fous-y-tout/dpmm/t-sne/d2p.m
3,155
utf_8
dc48b1dd0688d11671d81af50a0970de
function [P, beta] = d2p(D, u, tol) %D2P Identifies appropriate sigma's to get kk NNs up to some tolerance % % [P, beta] = d2p(D, kk, tol) % % Identifies the required precision (= 1 / variance^2) to obtain a Gaussian % kernel with a certain uncertainty for every datapoint. The desired % uncertainty can be specified...
github
bsxfan/meta-embeddings-master
x2p.m
.m
meta-embeddings-master/code/Niko/matlab/fous-y-tout/dpmm/t-sne/x2p.m
3,297
utf_8
e0d6a8b9bcdd6ebd97037e46252fe200
function [P, beta] = x2p(X, u, tol) %X2P Identifies appropriate sigma's to get kk NNs up to some tolerance % % [P, beta] = x2p(xx, kk, tol) % % Identifies the required precision (= 1 / variance^2) to obtain a Gaussian % kernel with a certain uncertainty for every datapoint. The desired % uncertainty can be specifie...
github
bsxfan/meta-embeddings-master
create_PYCRP.m
.m
meta-embeddings-master/code/Niko/matlab/fous-y-tout/dpmm/CRP/create_PYCRP.m
13,438
utf_8
97417297bf1d08ceaa6be2bbfe82c2bb
function PYCRP = create_PYCRP(alpha,beta,e,n) % alpha: alpha>=0, concentration % beta: 0<= beta <=1, discount if nargin==0 %test_this2(); test_Gibbsmatrix() return; end if nargin==4 PYCRP = create_PYCRP(1,0); PYCRP.set_expected_number_tables(e,n,alpha,be...
github
bsxfan/meta-embeddings-master
trandn.m
.m
meta-embeddings-master/code/Niko/matlab/fous-y-tout/dpmm/trunc_gaussian/trandn.m
3,445
utf_8
319949967a84b816a6cc4d0b882c4c98
function x=trandn(l,u) %% truncated normal generator % * efficient generator of a vector of length(l)=length(u) % from the standard multivariate normal distribution, % truncated over the region [l,u]; % infinite values for 'u' and 'l' are accepted; % * Remark: % If you wish to simulate a random variable % 'Z' from the ...
github
bsxfan/meta-embeddings-master
VB4HTPLDA_iteration.m
.m
meta-embeddings-master/code/Niko/matlab/clean/VB4HTPLDA/VB4HTPLDA_iteration.m
4,532
utf_8
3639a9571c692326b5102546e66240c3
function [F,W,obj] = VB4HTPLDA_iteration(nu,F,W,R,labels,weights) % Iteration of VB algorithm for HT-PLDA training. See HTPLDA_SGME_train_VB() % for details. The model parameters F and W are updated. % % Inputs: % nu: scalar, df > 0 (nu=inf is allowed: it signals G-PLDA) % F: D-by-d factor loading matrix, D > d % ...
github
bsxfan/meta-embeddings-master
VB4HTPLDA_iteration_2.m
.m
meta-embeddings-master/code/Niko/matlab/clean/VB4HTPLDA/VB4HTPLDA_iteration_2.m
4,534
utf_8
50e11eb8be6844dbc9c70f60f49c3c23
function [F,W,obj] = VB4HTPLDA_iteration_2(nu,F,W,R,labels,weights) % Iteration of VB algorithm for HT-PLDA training. See HTPLDA_SGME_train_VB() % for details. The model parameters F and W are updated. % % Inputs: % nu: scalar, df > 0 (nu=inf is allowed: it signals G-PLDA) % F: D-by-d factor loading matrix, D > d ...
github
bsxfan/meta-embeddings-master
VB4HTPLDA_demo.m
.m
meta-embeddings-master/code/Niko/matlab/clean/VB4HTPLDA/VB4HTPLDA_demo.m
7,965
utf_8
52ba6282c157b56dd41335179ade4206
function VB4HTPLDA_demo % Demo and test code for VB training and SGME scoring of HT-PLDA model. % % Training and evaluation data are (independently) sampled from a model with % randomly generated data. A VB algorithm is used to estimate the parameters % of this model from the training data. The accuracy of the traine...
github
bsxfan/meta-embeddings-master
MLNDA_MAP_obj.m
.m
meta-embeddings-master/code/Niko/matlab/SRE18/MLNDA_SRE18/MLNDA_MAP_obj.m
1,526
utf_8
c25e0cb0548424de1497aa4331334429
function [y,back] = MLNDA_MAP_obj(newData,newLabels,oldData,oldLabels,oldWeight,F,W,fi,params,nu) if nargin==0 test_this(); return; end ht = exist('nu','var') && ~isempty(nu) && ~isinf(nu); [newR,logdetJnew,back1] = fi(params,newData); [oldR,logdetJold,back3] = fi(params,oldD...
github
bsxfan/meta-embeddings-master
logdetNice.m
.m
meta-embeddings-master/code/Niko/matlab/SRE18/MLNDA_SRE18/logdetNice.m
864
utf_8
3dbf0e9b2c0ef0c688e5d05ea7956379
function [logdet,back] = logdetNice(sigma,R,d) if nargin==0 test_this(); return; end RR = R.'*R; S = RR/sigma + diag(1./d); [L,U] = lu(S); dim = size(R,1); logdet = ( sum(log(diag(U).^2)) + sum(log(d.^2)) + dim*log(sigma^2) ) /2; back = @back_this; functio...
github
bsxfan/meta-embeddings-master
logdetNice4.m
.m
meta-embeddings-master/code/Niko/matlab/SRE18/MLNDA_SRE18/logdetNice4.m
1,046
utf_8
62f8d2e7cac7cc028322c8d71f81b2e9
function [logdet,back] = logdetNice4(D,L,R) if nargin==0 test_this(); return; end [~,rank] = size(L); DL = bsxfun(@ldivide,D,L); RDL = R.'*DL; S = RDL + eye(rank); [Ls,Us] = lu(S); logdet = ( sum(log(diag(Us).^2)) + sum(log(D.^2)) ) /2; back = @back_this; ...
github
bsxfan/meta-embeddings-master
htplda_llh.m
.m
meta-embeddings-master/code/Niko/matlab/SRE18/MLNDA_SRE18/htplda_llh.m
2,103
utf_8
d1bda1755ab4932ab4a22c90e64c4d1b
function [llh,back] = htplda_llh(R,labels,F,W,nu) % Inputs: % R: D-by-N, i-vectors % labels: sparse, logical K-by-N, one hot columns, K speakers, N recordings if nargin==0 test_this(); return; end [D,d] = size(F); FW = F.'*W; FWR = FW*R; S = FWR*labels.'; %f...
github
bsxfan/meta-embeddings-master
create_nice_Trans4.m
.m
meta-embeddings-master/code/Niko/matlab/SRE18/MLNDA_SRE18/create_nice_Trans4.m
2,926
utf_8
acc1b16001cab1bbc286b4f1c9d385de
function [f,fi,paramsz,fe] = create_nice_Trans4(dim,rank) % Creates affine transform, having a matrix: M = D + L*R.', where D is % diagonal and L and R are of low rank. The forward transform is: % f(X) = M \ X + offset if nargin==0 test_this(); return; end paramsz = dim + 2*dim*rank +...
github
bsxfan/meta-embeddings-master
create_nice_Trans.m
.m
meta-embeddings-master/code/Niko/matlab/SRE18/MLNDA_SRE18/create_nice_Trans.m
3,126
utf_8
564dc31754d76cf3ff3e1b29812bda01
function [f,fi,paramsz,fe] = create_nice_Trans(dim,rank) % Creates affine transform, having a matrix: M = sigma I + L*D*L.', where % L is of low rank and D is diagonal. The forward transform is: % f(X) = M \ X + offset if nargin==0 test_this(); return; end paramsz = 1 + dim*rank + ran...
github
bsxfan/meta-embeddings-master
logdetNice3.m
.m
meta-embeddings-master/code/Niko/matlab/SRE18/MLNDA_SRE18/logdetNice3.m
980
utf_8
64ca857b7b319139b15a8c416ff1ac41
function [logdet,back] = logdetNice3(sigma,L,R) if nargin==0 test_this(); return; end [dim,rank] = size(L); RL = R.'*L; S = RL/sigma + eye(rank); [Ls,Us] = lu(S); logdet = ( sum(log(diag(Us).^2)) + dim*log(sigma^2) ) /2; back = @back_this; function [d...
github
bsxfan/meta-embeddings-master
splda_llh.m
.m
meta-embeddings-master/code/Niko/matlab/SRE18/MLNDA_SRE18/splda_llh.m
1,253
utf_8
9fa88758bc715c7d0d76209bd1936f6a
function [llh,back] = splda_llh(R,labels,F,W) % Inputs: % R: D-by-N, i-vectors % labels: sparse, logical K-by-N, one hot columns, K speakers, N recordings if nargin==0 test_this(); return; end FW = F.'*W; FWR = FW*R; S = FWR*labels.'; %first order natural parameter for sp...
github
bsxfan/meta-embeddings-master
create_nice_Trans3.m
.m
meta-embeddings-master/code/Niko/matlab/SRE18/MLNDA_SRE18/create_nice_Trans3.m
2,943
utf_8
e197b146f2ee6588c45fc36d860a3db9
function [f,fi,paramsz,fe] = create_nice_Trans3(dim,rank) % Creates affine transform, having a matrix: M = sigma I + L*R.', where % L and R are of low rank. The forward transform is: % f(X) = M \ X + offset if nargin==0 test_this(); return; end paramsz = 1 + 2*dim*rank + dim; f =...
github
bsxfan/meta-embeddings-master
create_nice_Trans2.m
.m
meta-embeddings-master/code/Niko/matlab/SRE18/MLNDA_SRE18/create_nice_Trans2.m
2,933
utf_8
aba4972b59d6acfb19b6a85c190bb897
function [f,fi,paramsz,fe] = create_nice_Trans2(dim,rank) if nargin==0 test_this(); return; end paramsz = 1 + dim*rank + rank*rank + dim; f = @f_this; fi = @fi_this; fe = @expand; function T = f_this(P,R) [sigma,L,D,offset] = expand(P); M = sigma*eye...
github
bsxfan/meta-embeddings-master
logdetNice2.m
.m
meta-embeddings-master/code/Niko/matlab/SRE18/MLNDA_SRE18/logdetNice2.m
929
utf_8
469e8c40a8fb711c201f8fbeaf1c8b32
function [logdet,back] = logdetNice2(sigma,R,D) if nargin==0 test_this(); return; end RR = R.'*R; [Ld,Ud] = lu(D); invD = inv(Ud)/Ld; S = RR/sigma + invD; [L,U] = lu(S); dim = size(R,1); logdet = ( sum(log(diag(U).^2)) + sum(log(diag(Ud).^2)) + dim*log(sigma^2) ) /2...
github
bsxfan/meta-embeddings-master
LinvSR.m
.m
meta-embeddings-master/code/Niko/matlab/SRE18/MLNDA_SRE18/param_adaptation/LinvSR.m
562
utf_8
cc684a75c7911f7d518550620e6b8fc7
function [Y,back] = LinvSR(L,S,R) if nargin==0 test_this(); return; end Z = S\R; Y = L*Z; back = @back_this; function [dL,dS,dR] = back_this(dY) % Y = L*Z dL = dY*Z.'; dZ = L.'*dY; % Z = S\R; dR = S.'\dZ; ...
github
bsxfan/meta-embeddings-master
splda_adaptation_obj.m
.m
meta-embeddings-master/code/Niko/matlab/SRE18/MLNDA_SRE18/param_adaptation/splda_adaptation_obj.m
1,783
utf_8
6c6dfe6b4fc0b2eedc0ac2e4802de451
function [y,back] = splda_adaptation_obj(newData,labels,oldF,oldW,params,num_new_Fcols,W_adj_rank,slow) if nargin==0 test_this(); return; end if ~exist('slow','var') slow = false; end [dim,Frank] = size(oldF); [Fcols,Fscal,Cfac] = unpack_SPLDA_adaptation_params(params...
github
bsxfan/meta-embeddings-master
logdetLU.m
.m
meta-embeddings-master/code/Niko/matlab/SRE18/MLNDA_SRE18/param_adaptation/logdetLU.m
393
utf_8
f89f69d0255592e7c1933492e7894c79
function [y,back] = logdetLU(M) if nargin==0 test_this(); return; end [L,U] = lu(M); y = sum(log(diag(U).^2))/2; back = @back_this; function dM = back_this(dy) %dM = dy*(inv(U)/L).'; dM = dy*(L.'\inv(U.')); end end function test_this() ...
github
bsxfan/meta-embeddings-master
posteriorNorm2_slow.m
.m
meta-embeddings-master/code/Niko/matlab/SRE18/MLNDA_SRE18/param_adaptation/posteriorNorm2_slow.m
1,855
utf_8
c490aa24f95c0ecb840e47f99af01af6
function [y,back] = posteriorNorm2_slow(A,B,b,priorFac) % Computes, for every i: log N( 0 | Pi\A(:,i), inv(Pi) ), where % % precisions are Pi = I + b(i)*B % % This is the slow version, used only to verify correctness of the function % value and derivatives of the fast version, posteriorNorm_fast(). % % Inputs: % ...
github
bsxfan/meta-embeddings-master
adaptSPLDA.m
.m
meta-embeddings-master/code/Niko/matlab/SRE18/MLNDA_SRE18/param_adaptation/adaptSPLDA.m
1,791
utf_8
fce312e9e18adccb87760f2788ced832
function [Ft,Wt,back] = adaptSPLDA(Fcols,Fscal,Cfac,F,W) if nargin==0 test_this(); return; end Frank = length(Fscal); Ft = [bsxfun(@times,F,Fscal), Fcols]; % Wt = inv(Ct), Ct = inv(W) + Cfac*Cfac' % Wt = W - W*Cfac*inv(I + Cfac'*W*Cfac)*Cfac'*W WCfac = W*C...
github
bsxfan/meta-embeddings-master
matinv.m
.m
meta-embeddings-master/code/Niko/matlab/SRE18/MLNDA_SRE18/param_adaptation/matinv.m
345
utf_8
140429773a1c0fb820d3ebe7e4d16619
function [Y,back] = matinv(S) if nargin==0 test_this(); return; end Y = inv(S); back = @back_this; function dS = back_this(dY) dS = -Y.'*dY*Y.'; end end function test_this() n = 4; S = randn(n,n); testBackprop(@matinv...
github
bsxfan/meta-embeddings-master
posteriorNorm_mindiv_slow.m
.m
meta-embeddings-master/code/Niko/matlab/SRE18/MLNDA_SRE18/param_adaptation/posteriorNorm_mindiv_slow.m
1,999
utf_8
3a06a111867c52058d73244d0ba36117
function [y,Ezz,back] = posteriorNorm_mindiv_slow(A,B,b) % Computes, for every i: log N( 0 | Pi\A(:,i), inv(Pi) ), where % % precisions are Pi = I + b(i)*B % % This is the slow version, used only to verify correctness of the function % value and derivatives of the fast version, posteriorNorm_fast(). % % Inputs: % ...
github
bsxfan/meta-embeddings-master
splda_llh_full.m
.m
meta-embeddings-master/code/Niko/matlab/SRE18/MLNDA_SRE18/param_adaptation/splda_llh_full.m
3,374
utf_8
9f2a6f749c0dfeb7e8f3ae83f26c362e
function [llh,back] = splda_llh_full(labels,F,W,R,slow) % Like splda_llh(), but backpropagates into all of F,W and R % % Inputs: % R: D-by-N, i-vectors % labels: sparse, logical K-by-N, one hot columns, K speakers, N recordings % F,W: SPLA parameters % slow: [optional, default = false] logical, use slow = true ...
github
bsxfan/meta-embeddings-master
posteriorNorm_slow.m
.m
meta-embeddings-master/code/Niko/matlab/SRE18/MLNDA_SRE18/param_adaptation/posteriorNorm_slow.m
1,815
utf_8
a9b32fbd06cb0f91327d57dac2f41bbd
function [y,back] = posteriorNorm_slow(A,B,b) % Computes, for every i: log N( 0 | Pi\A(:,i), inv(Pi) ), where % % precisions are Pi = I + b(i)*B % % This is the slow version, used only to verify correctness of the function % value and derivatives of the fast version, posteriorNorm_fast(). % % Inputs: % A: dim-by-...
github
bsxfan/meta-embeddings-master
posteriorNorm_fast.m
.m
meta-embeddings-master/code/Niko/matlab/SRE18/MLNDA_SRE18/param_adaptation/posteriorNorm_fast.m
2,131
utf_8
f950d84510798e37996a0f242fd5f9be
function [y,back] = posteriorNorm_fast(A,B,b) % Computes, for every i: log N( 0 | Pi\A(:,i), inv(Pi) ), where % % precisions are Pi = I + b(i)*B % % This is the fast version, which simultaneously diagonalizes all the Pi, % using eigenanalysis of B. % % Inputs: % A: dim-by-n, natural parameters (precision *mean) f...
github
bsxfan/meta-embeddings-master
rkhs_inner_prod.m
.m
meta-embeddings-master/code/Niko/matlab/SRE18/MLNDA_SRE18/mmd/rkhs_inner_prod.m
516
utf_8
8df105a9a35bd9faf72c137fd3d1d6e8
function y = rkhs_inner_prod(sigma,B1,a1,B2,a2) dim = length(a1); I = eye(dim); Bconv = (I+sigma*B1)\B1; % inv(sigmaI + inv(B1)) aconv = (I+sigma*B1)\a1; % Bconv*(B1\a) y = gauss_prod_int(aconv,Bconv,a2,B2); end function y = log_gauss_norm(B,a) [logd,mu,back] = logdet_solveLU(B,a); ...
github
bsxfan/meta-embeddings-master
log_gauss_norm.m
.m
meta-embeddings-master/code/Niko/matlab/SRE18/MLNDA_SRE18/mmd/log_gauss_norm.m
527
utf_8
9dba44b2abd5c0513bb1b75566fab019
function [y,back] = log_gauss_norm(B,a) if nargin==0 test_this(); return; end [logd,mu,back1] = logdet_solveLU(B,a); y = (logd -mu.'*a)/2; back = @back_this; function [dB,da] = back_this(dy) dlogd = dy/2; da = (-dy/2)*mu; dmu = (-dy/2)*a; ...
github
bsxfan/meta-embeddings-master
logdet_solveLU.m
.m
meta-embeddings-master/code/Niko/matlab/SRE18/MLNDA_SRE18/mmd/logdet_solveLU.m
508
utf_8
c3ec88a4a91de8ea84a175ef1857bfa8
function [y,mu,back] = logdet_solveLU(B,a) if nargin==0 test_this(); return; end [L,U] = lu(B); y = sum(log(diag(U).^2))/2; %logdet mu = U\(L\a); %solve back = @back_this; function [dB,da] = back_this(dy,dmu) dB = dy*(L.'\inv(U.')); da = L.'\...
github
bsxfan/meta-embeddings-master
rkhs_proj_onto_I0_slow.m
.m
meta-embeddings-master/code/Niko/matlab/SRE18/MLNDA_SRE18/mmd/rkhs_proj_onto_I0_slow.m
1,766
utf_8
d012ab760719343ddc73bd3f4aa42563
function [y,back] = rkhs_proj_onto_I0_slow(sigma,A,b,B) % RKHS inner products of multivariate Gaussians onto standard normal. The % RKHS kernel is K(x,y) = ND(x|y,sigma I). The first order natural % parameters of the Gaussians are in the columns of A. The precisions are % proportional to the fixed B, with scaling conta...
github
bsxfan/meta-embeddings-master
L_BFGS.m
.m
meta-embeddings-master/code/Niko/matlab/SRE18/MLNDA_SRE18/optimization/L_BFGS.m
5,008
utf_8
8a3bd29f4c568d13b7c0f7e466850904
function [w,y,mem,logs] = L_BFGS(obj,w,maxiters,timeout,mem,stpsz0,callback) % L-BFGS Quasi-Newton unconstrained optimizer. % -- This has a small interface change from LBFGS.m -- % % Inputs: % obj: optimization objective, with interface: [y,grad] = obj(w), % where w is the parameter vector, y is the scalar o...
github
bsxfan/meta-embeddings-master
testBackprop_rs.m
.m
meta-embeddings-master/code/Niko/matlab/SRE18/MLNDA_SRE18/test/testBackprop_rs.m
2,198
utf_8
9d88acaf06002d97bf8eb2fdc07bf7b8
function total = testBackprop_rs(block,X,delta,mask) %same as testFBblock, but with real step if ~iscell(X) X = {X}; end dX = cellrndn(X); if exist('mask','var') assert(length(mask)==length(X)); dX = cellmask(dX,mask); end cX1 = cellstep(X,dX,delta); cX2 = cell...
github
bsxfan/meta-embeddings-master
testBackprop_multi.m
.m
meta-embeddings-master/code/Niko/matlab/SRE18/MLNDA_SRE18/test/testBackprop_multi.m
2,361
utf_8
ced4a5b7e925d5c00a2d991fb34d012c
function total = testBackprop_multi(block,nout,X,mask) % same as testBackprop, but handles multiple outputs if ~iscell(X) X = {X}; end dX = cellrndn(X); if exist('mask','var') assert(length(mask)==length(X)); dX = cellmask(dX,mask); end cX = cellcomplex(X,dX); D...
github
bsxfan/meta-embeddings-master
testBackprop.m
.m
meta-embeddings-master/code/Niko/matlab/SRE18/MLNDA_SRE18/test/testBackprop.m
2,015
utf_8
fc73fa404f5441c097eb63f249106078
function total = testBackprop(block,X,mask) if ~iscell(X) X = {X}; end dX = cellrndn(X); if exist('mask','var') assert(length(mask)==length(X)); dX = cellmask(dX,mask); end cX = cellcomplex(X,dX); DX = cell(size(X)); [Y,back] = block(X{:}); ...
github
gaoxifeng/Robust-Hexahedral-Re-Meshing-master
m2p.m
.m
Robust-Hexahedral-Re-Meshing-master/extern/libigl/python/matlab/m2p.m
786
utf_8
9c36f898544f3e8561f950ac4cc06626
% Converts a Matlab matrix to a python-wrapped Eigen Matrix function [ P ] = m2p( M ) if (isa(M, 'double')) % Convert the matrix to a python 1D array a = py.array.array('d',reshape(M,1,numel(M))); % Then convert it to a eigen type t = py.igl.eigen.MatrixXd(a.tolist()); % Fina...
github
gaoxifeng/Robust-Hexahedral-Re-Meshing-master
p2m.m
.m
Robust-Hexahedral-Re-Meshing-master/extern/libigl/python/matlab/p2m.m
585
utf_8
15f32817630ba8b7a51a95ba7e4d5f2b
% Converts a python-wrapped Eigen Matrix to a Matlab matrix function [ M ] = p2m( P ) if py.repr(py.type(P)) == '<class ''igl.eigen.MatrixXd''>' % Convert it to a python array first t = py.array.array('d',P); % Reshape it M = reshape(double(t),P.rows(),P.cols()); elseif py.repr(p...
github
janhavelka/Stochastic-Finite-Element-Method-master
trisurfc.m
.m
Stochastic-Finite-Element-Method-master/functions/trisurfc.m
14,500
utf_8
850e8c97d2b3250b7af61ed01af5dd00
function [cout,hout] = trisurfc(el,xin,yin,zin,N,shift,magnit) % Contouring and surface function for functions defined on triangular meshes % % xin, yin, zin, are arrays of x,y,z values of the points for your surface. % So [x(1) y(1) z(1)] defines the first point, etc. % % The last input N defines the contourin...
github
janhavelka/Stochastic-Finite-Element-Method-master
position_figure.m
.m
Stochastic-Finite-Element-Method-master/functions/position_figure.m
1,958
utf_8
f5af9ed0a926dc7aa2830616a6cd90aa
% Similar to subplot(), position_figure() divides the screen into rectangular % panes to position figures in. % % Syntax: % position_figure(no_rows, no_columns, fig_no) % % where % 'no_rows' is the total number of figure-rows % 'no_columns' is the total number of figure-...
github
janhavelka/Stochastic-Finite-Element-Method-master
getStiffness.m
.m
Stochastic-Finite-Element-Method-master/functions/mesh_basics/getStiffness.m
2,024
utf_8
95c79401069289772f0168e518bb5393
function K=getStiffness(MESH,lambda) % Jan Havelka (jnhavelka@gmail.com) % Copyright 2016, Czech Technical University in Prague % % This program is free software: you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation, ...
github
janhavelka/Stochastic-Finite-Element-Method-master
nwspgr.m
.m
Stochastic-Finite-Element-Method-master/Stochastic-Collocation/functions/nwspgr.m
55,365
utf_8
d201003f6a079cff4647bd2dda9defda
%***************************************************************************** %nwSpGr: Nodes and weights for numerical integration on sparse grids (Smolyak) %(c) 2007 Florian Heiss, Viktor Winschel %Nov 11, 2007 %***************************************************************************** %**********************...
github
jlowenz/rrwm-master
makePointMatchingProblem.m
.m
rrwm-master/utils/makePointMatchingProblem.m
1,904
utf_8
d8b1523c4e12502cda5a4a603d756604
%% Make test problem function [ problem ] = makePointMatchingProblem( Set ) %% Get values from structure strNames = fieldnames(Set); for i = 1:length(strNames), eval([strNames{i} '= Set.' strNames{i} ';']); end %% Set number of nodes if bOutBoth, nP1 = nInlier + nOutlier; else nP1 = nInlier; end nP2 = nInlier + nOutlie...
github
jlowenz/rrwm-master
wrapper_GM.m
.m
rrwm-master/utils/wrapper_GM.m
1,050
utf_8
1576ee070fa2b9ddbae721e3c9b98b1a
%% Makes current problem into Graph Matching form function [accuracy score time X Xraw] = wrapper_GM(method, cdata) % Make function evaluation script str = ['feval(@' func2str(method.fhandle)]; for j = 1:length(method.variable), str = [str ',cdata.' method.variable{j} ]; end if ~isempty(method.param), for i = 1:length(...
github
jlowenz/rrwm-master
RRWM.m
.m
rrwm-master/Methods/RRWM/RRWM.m
4,758
utf_8
ea71ece6a20675bf027025e76e265427
%% Implementaion of PageRank matching algortihm function [ X ] = RRWM( M, group1, group2, varargin) % MATLAB demo code of Reweighted Random Walks Graph Matching of ECCV 2010 % % Minsu Cho, Jungmin Lee, and Kyoung Mu Lee, % Reweighted Random Walks for Graph Matching, % Proc. European Conference on Computer Vision (ECC...
github
qingsongma/blend-master
make.m
.m
blend-master/tools/libsvm-3.22/matlab/make.m
888
utf_8
4a2ad69e765736f8cca8e3b721fb7ebd
% This make.m is for MATLAB and OCTAVE under Windows, Mac, and Unix function make() try % This part is for OCTAVE if (exist ('OCTAVE_VERSION', 'builtin')) mex libsvmread.c mex libsvmwrite.c mex -I.. svmtrain.c ../svm.cpp svm_model_matlab.c mex -I.. svmpredict.c ../svm.cpp svm_model_matlab.c % This part is fo...
github
kertansul/caffe-segnet-cudnn5-master
classification_demo.m
.m
caffe-segnet-cudnn5-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
ncohn/Windsurf-master
Windsurf_Run_Batch.m
.m
Windsurf-master/Windsurf_Run_Batch.m
261
utf_8
55529be4c74bf42a0cc4951e09301793
%Windsurf_Run_Batch.m - Code which allows to run multiple simulations at once via parfor loop %Created By: N. Cohn, Oregon State University function XBCDM_Run_Batch(Directory) load([Directory, filesep, 'windsurf_setup.mat']); Windsurf_Run; end
github
ncohn/Windsurf-master
Windsurf_BeachNourishment.m
.m
Windsurf-master/Windsurf_BeachNourishment.m
3,484
utf_8
13189e5a9562fdfceaee5f6b8627766e
%Windsurf_BeachNourishment %Code for modifying the beach profile based on volume (type 1), contour (type 2), or fixed time (type 3) changes at some %fixed time intervals based on specified user inputs % %Created By: N. Cohn, Oregon State University if project.flag.nourishment ~= 0 && run_number > 1 ...