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 | quality_fuser_v1.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/applications/fusion2class/systems/aside/quality_fuser_v1.m | 2,225 | utf_8 | 64802a2f8ee68bcd9f60a31166e64fdb | function [fusion,params] = quality_fuser_v1(w,scores,train_vecs,test_vecs,train_ndx,test_ndx,ddim)
%
% Inputs:
%
% scores: the primary detection scores, for training
% D-by-T matrix of T scores for D input systems
%
% train_vecs: K1-by-M matrix, one column-vector for each of M training
% ... |
github | bsxfan/meta-embeddings-master | quality_fuser_v2.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/applications/fusion2class/systems/aside/quality_fuser_v2.m | 1,827 | utf_8 | 702d7721d2e75e4164bd1fc9b7ba4c57 | function [fusion,params] = quality_fuser_v2(w,scores,train_vecs,test_vecs,train_ndx,test_ndx,ddim)
%
% Inputs:
%
% scores: the primary detection scores, for training
% D-by-T matrix of T scores for D input systems
%
% train_vecs: K1-by-M matrix, one column-vector for each of M training
% ... |
github | bsxfan/meta-embeddings-master | quality_fuser_v4.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/applications/fusion2class/systems/aside/quality_fuser_v4.m | 1,217 | utf_8 | d5315c3a78ba4e1277f9493c119d0cc8 | function [fusion,params] = quality_fuser_v4(w,scores,quality_inputs)
%
% Inputs:
%
% scores: the primary detection scores, for training
% D-by-T matrix of T scores for D input systems
%
% quality_input: K-by-T matrix of quality measures
%
% Output:
% fusion: is numeric if w is numeric, or a handl... |
github | bsxfan/meta-embeddings-master | sigmoid_logdistance.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/applications/fusion2class/quality_modules/sigmoid_logdistance.m | 1,561 | utf_8 | b124d29ef74e835d894f8dd7de72c760 | function [sld,params] = sigmoid_logdistance(w,input_data,ddim)
%
% Algorithm: sld = sigmoid(
% log(
% sum(bsxfun(@minus,M*input_data,c).^2,1)
% ))
%
%
% Inputs:
% w: is vec([M,c]), where M is ddim-by-D and c is ddim-by-1
% Use w=[] to let output sld be a... |
github | bsxfan/meta-embeddings-master | QtoLLH.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/applications/fusion2class/quality_modules/QtoLLH.m | 612 | utf_8 | e0bc4e7d0bfd4082fc37fb474bc44c8c | function [LLH,w0] = QtoLLH(w,Q,n)
%
if nargin==0
test_this();
return;
end
if ~exist('Q','var') || isempty(Q)
LLH = sprintf(['QtoLLH:',repmat(' %g',1,length(w))],w);
return;
end
[m,k] = size(Q);
wsz = m*n;
if nargout>1, w0 = zeros(wsz,1); end
LLH = linTrans(w,@(w)map_this(w),@(w)transmap_this(w)... |
github | bsxfan/meta-embeddings-master | fused_sigmoid.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/applications/fusion2class/quality_modules/fused_sigmoid.m | 1,293 | utf_8 | 1f35e45a3c945008307dd1222a281bb8 | function [ps,params] = fused_sigmoid(w,input_data)
%
% Algorithm: ps = sigmoid( alpha'*input_data +beta)
%
%
% Inputs:
% w: is [alpha; beta], where alpha is D-by-1 and beta is scalar.
% Use w=[] to let output ps be an MV2DF function handle.
% If w is a function handle to an MV2DF then ps is the function hand... |
github | bsxfan/meta-embeddings-master | sigmoid_log_sumsqdist.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/applications/fusion2class/quality_modules/sigmoid_log_sumsqdist.m | 1,638 | utf_8 | 0b9f81df4bc93fe52ac7dbaa98594160 | function [sig,params] = sigmoid_log_sumsqdist(w,data1,data2,ndx1,ndx2,ddim)
%
% Similar to prod_sigmoid_logdist, but adds square distances from two sides
% before doing sigmoid(log()).
%
if nargin==0
test_this();
return;
end
datadim = size(data1,1);
assert(datadim==size(data2,1),'data1 and data2 must have s... |
github | bsxfan/meta-embeddings-master | prmtrzd_sig_log_dist.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/applications/fusion2class/quality_modules/prmtrzd_sig_log_dist.m | 1,767 | utf_8 | edf7387841000e5933bda732bca5b79b | function [ps,params] = prmtrzd_sig_log_dist(w,input_data,ddim)
%
% Algorithm: ps = sigmoid(
% offs+scal*log(
% sum(bsxfun(@minus,M*input_data,c).^2,1)
% ))
%
%
% Inputs:
% w: is [ vec(M); c; scal; offs], where M is ddim-by-D; c is ddim-by-1;
% and scal and o... |
github | bsxfan/meta-embeddings-master | QQtoLLH.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/applications/fusion2class/quality_modules/QQtoLLH.m | 623 | utf_8 | 73d37a5922aafaa7dd4dd6e5a2cfbe51 | function [LLH,w0] = QQtoLLH(w,qleft,qright,n)
%
if nargin==0
test_this();
return;
end
qleft = [qleft;ones(1,size(qleft,2))];
qright = [qright;ones(1,size(qright,2))];
qdim = size(qleft,1);
qdim2 = size(qright,1);
assert(qdim==qdim2);
q2 = qdim*(qdim+1)/2;
wsz = n*q2;
if nargout>1, w0 = zeros(wsz,1); end... |
github | bsxfan/meta-embeddings-master | QQtoP.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/applications/fusion2class/quality_modules/QQtoP.m | 771 | utf_8 | 0a940f8a8a56510a32ad6a45accddc02 | function [P,params] = QQtoP(w,qleft,qright,n)
%
if nargin==0
test_this();
return;
end
qleft = [qleft;ones(1,size(qleft,2))];
qright = [qright;ones(1,size(qright,2))];
[qdim,nleft] = size(qleft);
[qdim2,nright] = size(qright);
assert(qdim==qdim2);
q2 = qdim*(qdim+1)/2;
wsz = n*q2;
[whead,wtail] = splitvec_... |
github | bsxfan/meta-embeddings-master | prod_sigmoid_logdist.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/applications/fusion2class/quality_modules/prod_sigmoid_logdist.m | 2,506 | utf_8 | f31a256c5434fca4b6c0641d23a2ebc1 | function [sig,params] = prod_sigmoid_logdist(w,data1,data2,ndx1,ndx2,ddim)
%
% Algorithm: sig = distribute(ndx1,sigmoid(
% log(
% sum(bsxfun(@minus,M*data_1,c).^2,1)
% )))
% *
% distribute(ndx2,sigmoid(
% log( ... |
github | bsxfan/meta-embeddings-master | outerprod_of_sigmoids.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/applications/fusion2class/quality_modules/outerprod_of_sigmoids.m | 1,033 | utf_8 | 2577209cada6747a9615d0ce3b375b7f | function [Q,params] = outerprod_of_sigmoids(w,qleft,qright)
%
if nargin==0
test_this();
return;
end
[qdim,nleft] = size(qleft);
[qdim2,nright] = size(qright);
assert(qdim==qdim2);
wsz = qdim+1;
[whead,wtail] = splitvec_fh(wsz,w);
params.get_w0 = @(ssat) init_w0(ssat);
params.tail = wtail;
% fleft = sigmoid... |
github | bsxfan/meta-embeddings-master | parallel_cal.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/applications/fusion2class/quality_modules/parallel_cal.m | 983 | utf_8 | 252822b934d5469fc96448f80d2f3e90 | function [calscores,w0] = parallel_cal(w,scores,wfuse)
%
if nargin==0
test_this();
return;
end
if ~exist('scores','var') || isempty(scores)
calscores = sprintf(['parallel calibration:',repmat(' %g',1,length(w))],w);
return;
end
[m,n] = size(scores);
if nargout>1, w0 = init_w0(wfuse); end
cals... |
github | bsxfan/meta-embeddings-master | parallel_cal_augm.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/applications/fusion2class/quality_modules/parallel_cal_augm.m | 1,115 | utf_8 | f5a8bba6d164ab5577c8429ce5835305 | function [calscores,params] = parallel_cal_augm(w,scores)
%
if nargin==0
test_this();
return;
end
if ~exist('scores','var') || isempty(scores)
calscores = sprintf(['parallel calibration:',repmat(' %g',1,length(w))],w);
return;
end
[m,n] = size(scores);
scores = [scores;zeros(1,n)];
wsz = 2*m;
[... |
github | bsxfan/meta-embeddings-master | prod_of_prmtrzd_sigmoids.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/applications/fusion2class/quality_modules/prod_of_prmtrzd_sigmoids.m | 1,537 | utf_8 | 6c18de0879f128ada38d483ace60b57f | function [ps,params] = prod_of_prmtrzd_sigmoids(w,input_data)
%
% Algorithm: ps = prod_i sigmoid( alpha_i*input_data(i,:) + beta_i)
%
%
% Inputs:
% w: is vec([alpha; beta]), where alpha and beta are 1-by-D.
% Use w=[] to let output ps be an MV2DF function handle.
% If w is a function handle to an MV2DF then ... |
github | bsxfan/meta-embeddings-master | prmtrzd_sigmoid.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/applications/fusion2class/quality_modules/prmtrzd_sigmoid.m | 1,312 | utf_8 | 616d28e7f84f188fcd7759c98a9c3c66 | function [ps,params] = prmtrzd_sigmoid(w,input_data)
%
% Algorithm: ps = sigmoid( w0+w1'*input_data ), where
% w = [w1;w0]; w0 is scalar; and w1 is vector
%
%
% Inputs:
% w = [w1;w0]; w0 is scalar; and w1 is vector.
% Use w=[] to let output ps be an MV2DF function handle.
% If w is a function handle to a... |
github | bsxfan/meta-embeddings-master | augmentmatrix_fh.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/applications/fusion2class/mv2df_function_library/augmentmatrix_fh.m | 826 | utf_8 | d2182cb06b78c3d43519f09b297ddad2 | function fh = augmentmatrix_fh(m,value,w)
% This is almost an MV2DF, but it does not return derivatives on numeric
% input, w.
%
% Algorithm: y = [reshape(w,m,n);ones(1,n)](:)
if nargin==0
test_this();
return;
end
function y = map_this(w)
n = length(w)/m;
y = [reshape(w,m,n);value*ones... |
github | bsxfan/meta-embeddings-master | bsx_col_plus_row.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/applications/fusion2class/mv2df_function_library/bsx_col_plus_row.m | 912 | utf_8 | 59d5f6f7ea9d75509fbc6bf64b63b465 | function fh = bsx_col_plus_row(m,n,w)
% This is almost an MV2DF, but it does not return derivatives on numeric
% input, w.
%
% Algorithm: col = w(1:m)
% row = w(m+1:end)
% y = bsxfun(@plus,col(:),row(:)'),
%
if nargin==0
test_this();
return;
end
function y = map_this(w)
... |
github | bsxfan/meta-embeddings-master | duplicator_fh.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/applications/fusion2class/mv2df_function_library/duplicator_fh.m | 805 | utf_8 | 890c37f077bde2305a0f1c545b71c36a | function f = duplicator_fh(duplication_indices,xdim,w)
%
% This factory creates a function handle to an MV2DF, which represents the
% function:
%
% y = x(duplication_indices)
%
if nargin==0
test_this();
return;
end
map = @(x) x(duplication_indices);
%xdim = max(duplication_indices);
ydim = length(duplica... |
github | bsxfan/meta-embeddings-master | splitvec_fh.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/applications/fusion2class/mv2df_function_library/splitvec_fh.m | 1,343 | utf_8 | aff993bc1037dc1d6673762983fd5497 | function [head,tail] = splitvec_fh(head_size,w)
%
%
% If head_size <0 then tail_size = - head_size
if nargin==0
test_this();
return;
end
tail_size = - head_size;
function w = transmap_head(y,sz)
w=zeros(sz,1);
w(1:head_size)=y;
end
function w = transmap_tail(y,sz)
w=zeros(sz,1); ... |
github | bsxfan/meta-embeddings-master | log_distance_mv2df.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/applications/fusion2class/mv2df_function_library/log_distance_mv2df.m | 1,968 | utf_8 | ab190182251a8ee9a8cce755c6615e99 | function [y,deriv] = log_distance_mv2df(w,input_data,new_dim)
% This is an MV2DF. See MV2DF_API_DEFINITION.readme.
%
% The function projects each column of input_data to a subspace and then
% computes log distance from a centroid. The input_data is fixed, but
% the projection and centroid parameters are variable.
%
%... |
github | bsxfan/meta-embeddings-master | AWB_fh.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/applications/fusion2class/mv2df_function_library/AWB_fh.m | 675 | utf_8 | 3ab5ec4ad82fe2f901f95abf30fb3193 | function fh = AWB_fh(A,B,w)
% This is almost an MV2DF, but it does not return derivatives on numeric
% input, w.
%
% Algorithm: Y = A*reshape(w,..)*B
if nargin==0
test_this();
return;
end
[m,n] = size(A);
[r,s] = size(B);
function y = map_this(w)
w = reshape(w,n,r);
y = A*w*B;
end
... |
github | bsxfan/meta-embeddings-master | xoverxplusalpha.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/applications/fusion2class/mv2df_function_library/xoverxplusalpha.m | 792 | utf_8 | 9fbd612d42a50cee70f2b05dce2bf16c | function [y,deriv] = xoverxplusalpha(w,x)
% This is an MV2DF. See MV2DF_API_DEFINITION.readme.
%
% alpha --> x./(x+alpha)
%
if nargin==0
test_this();
return;
end
if isempty(w)
y = @(w)xoverxplusalpha(w,x);
return;
end
if isa(w,'function_handle')
f = xoverxplusalpha([],x);
y = compose_mv(... |
github | bsxfan/meta-embeddings-master | tril_to_symm_fh.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/applications/fusion2class/mv2df_function_library/tril_to_symm_fh.m | 786 | utf_8 | 9ea53a1f6c15720e67c1c446d7dfad43 | function fh = tril_to_symm_fh(m,w)
% This is almost an MV2DF, but it does not return derivatives on numeric
% input, w.
%
% Algorithm: w is vector of sizem*(m+1)/2
% w -> m-by-m lower triangular matrix Y
% Y -> Y + Y'
if nargin==0
test_this();
return;
end
indx = tril(true(m));
fun... |
github | bsxfan/meta-embeddings-master | square_distance_mv2df.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/applications/fusion2class/mv2df_function_library/square_distance_mv2df.m | 1,835 | utf_8 | a5d544c6956f70a3c3afdec634a2c891 | function [y,deriv] = square_distance_mv2df(w,input_data,new_dim)
% This is an MV2DF. See MV2DF_API_DEFINITION.readme.
%
% The function computes the square distance of the vectors for each trial.
% y.' = sum((W(:,1:end-1).'*input_data + W(:,end)).^2,1)
%
% W is the augmented matrix [M c] where M maps a score vect... |
github | bsxfan/meta-embeddings-master | addtotranspose_fh.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/applications/fusion2class/mv2df_function_library/addtotranspose_fh.m | 493 | utf_8 | c009e482a302e2825fb3f59940bcc79e | function fh = addtotranspose_fh(m,w)
% This is almost an MV2DF, but it does not return derivatives on numeric
% input, w.
if nargin==0
test_this();
return;
end
function y = map_this(w)
w = reshape(w,m,m);
y = w+w.';
end
map = @(y) map_this(y);
transmap = @(y) map_this(y);
fh = l... |
github | bsxfan/meta-embeddings-master | subvec_fh.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/applications/fusion2class/mv2df_function_library/subvec_fh.m | 544 | utf_8 | a8942d310965ca178a123eb3f4a78f21 | function fh = subvec_fh(first,len,w)
% This is almost an MV2DF, but it does not return derivatives on numeric
% input, w.
if nargin==0
test_this();
return;
end
map = @(w) w(first:first+len-1);
function w = transmap_this(y,sz)
w=zeros(sz,1);
w(first:first+len-1)=y;
end
transmap = @(y,sz) ... |
github | bsxfan/meta-embeddings-master | linTrans_adaptive.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/applications/fusion2class/mv2df_function_library/templates/linTrans_adaptive.m | 1,173 | utf_8 | 66276c8cd337da71a4e14efc67112765 | function [y,deriv] = linTrans_adaptive(w,map,transmap)
% 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 isempty(... |
github | bsxfan/meta-embeddings-master | logsumexp_fh.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/MV2DF/function_library/vector/logsumexp_fh.m | 1,287 | utf_8 | 764511ba624a62ac12e572a26a5e7aa2 | function f = logsumexp_fh(m,direction,w)
% This is a factory for a function handle to an MV2DF, which represents
% the vectorization of the logsumexp function. The whole mapping works like
% this, in MATLAB-style psuedocode:
%
% F: R^(m*n) --> R^n, where y = F(x) is computed thus:
%
% n = length(x)/m
% If directi... |
github | bsxfan/meta-embeddings-master | one_over_one_plus_w_mv2df.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/MV2DF/function_library/vector/one_over_one_plus_w_mv2df.m | 717 | utf_8 | d735233c52193c323d03cdb85d0948f5 | function [y,deriv] = one_over_one_plus_w_mv2df(w)
% This is an MV2DF. See MV2DF_API_DEFINITION.readme.
% y = 1 ./ (1 + w)
if nargin==0
test_this();
return;
end
if isempty(w)
y = @(w)one_over_one_plus_w_mv2df(w);
return;
end
if isa(w,'function_handle')
outer = one_over_one_plus_w_mv2df([]);
y... |
github | bsxfan/meta-embeddings-master | sigmoid_mv2df.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/MV2DF/function_library/vector/sigmoid_mv2df.m | 758 | utf_8 | e0591c88d68032fcf2a300fe7f2e8df0 | function [y,deriv] = sigmoid_mv2df(w)
% This is an MV2DF. See MV2DF_API_DEFINITION.readme.
% y = sigmoid(w) = 1./(1+exp(-w)), vectorized as MATLAB usually does.
if nargin==0
test_this();
return;
end
if isempty(w)
y = @(w)sigmoid_mv2df(w);
return;
end
if isa(w,'function_handle')
outer = sigmoid_m... |
github | bsxfan/meta-embeddings-master | neglogsigmoid_fh.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/MV2DF/function_library/vector/neglogsigmoid_fh.m | 1,075 | utf_8 | dc180d133fc039197aa99a5e4186c6a7 | function f = neglogsigmoid_fh(w)
% This is a factory for a function handle to an MV2DF, which represents
% the vectorization of the logsigmoid function. The mapping is, in
% MATLAB-style code:
%
% y = log(sigmoid(w)) = log(1./1+exp(-w)) = -log(1+exp(-w))
%
% Inputs:
% m: the number of inputs to each individual lo... |
github | bsxfan/meta-embeddings-master | logsumsquares_fh.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/MV2DF/function_library/vector/logsumsquares_fh.m | 1,275 | utf_8 | c1e543f6680e7257b1f55ff61d967598 | function f = logsumsquares_fh(m,direction,w)
% This is a factory for a function handle to an MV2DF, which represents
% the vectorization of the logsumsquares function. The whole mapping works like
% this, in MATLAB-style psuedocode:
%
% F: R^(m*n) --> R^n, where y = F(x) is computed thus:
%
% n = length(x)/m
% If... |
github | bsxfan/meta-embeddings-master | expneg_mv2df.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/MV2DF/function_library/vector/expneg_mv2df.m | 675 | utf_8 | f12485f16e7f66d9deb530df461bdcdc | function [y,deriv] = expneg_mv2df(w)
% This is an MV2DF. See MV2DF_API_DEFINITION.readme.
% y = exp(-w), vectorized as MATLAB usually does.
if nargin==0
test_this();
return;
end
if isempty(w)
y = @(w)expneg_mv2df(w);
return;
end
if isa(w,'function_handle')
outer = expneg_mv2df([]);
y = compo... |
github | bsxfan/meta-embeddings-master | square_mv2df.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/MV2DF/function_library/vector/square_mv2df.m | 634 | utf_8 | f7604570a85ea6be67d98ae414127642 | function [y,deriv] = square_mv2df(w)
% This is an MV2DF. See MV2DF_API_DEFINITION.readme.
% y = w.^2
if nargin==0
test_this();
return;
end
if isempty(w)
y = @(w)square_mv2df(w);
return;
end
if isa(w,'function_handle')
outer = square_mv2df([]);
y = compose_mv(outer,w,[]);
return;
end
w... |
github | bsxfan/meta-embeddings-master | logsigmoid_fh.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/MV2DF/function_library/vector/logsigmoid_fh.m | 1,068 | utf_8 | 65bf6e2f03af50449d9492d02f7e3c98 | function f = logsigmoid_fh(w)
% This is a factory for a function handle to an MV2DF, which represents
% the vectorization of the logsigmoid function. The mapping is, in
% MATLAB-style code:
%
% y = log(sigmoid(w)) = log(1./1+exp(-w)) = -log(1+exp(-w))
%
% Inputs:
% m: the number of inputs to each individual logsu... |
github | bsxfan/meta-embeddings-master | exp_mv2df.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/MV2DF/function_library/vector/exp_mv2df.m | 659 | utf_8 | 410b48565ed23cbda996866e44dfb2fa | function [y,deriv] = exp_mv2df(w)
% This is an MV2DF. See MV2DF_API_DEFINITION.readme.
% y = exp(w), vectorized as MATLAB usually does.
if nargin==0
test_this();
return;
end
if isempty(w)
y = @(w)exp_mv2df(w);
return;
end
if isa(w,'function_handle')
outer = exp_mv2df([]);
y = compose_mv(oute... |
github | bsxfan/meta-embeddings-master | vectorized_function.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/MV2DF/function_library/vector/templates/vectorized_function.m | 4,600 | utf_8 | 9c5431b821aa6587c3849945d31dd1fd | function [y,deriv] = vectorized_function(w,f,m,direction)
% This is an MV2DF. See MV2DF_API_DEFINITION.readme.
%
% This template vectorizes the given function F: R^m -> R as follows:
% k = length(w)/m;
% If direction=1, X = reshape(w,m,k), y(j) = F(X(:,j)), or
% if direction=2, X = reshape(w,k,m), y(i) = F(X(i,:)... |
github | bsxfan/meta-embeddings-master | logdet_chol.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/MV2DF/function_library/scalar/logdet_chol.m | 1,185 | utf_8 | 706e5c1e5b5b660da50408bd221522a0 | function [y,deriv] = logdet_chol(w)
% This is an MV2DF. See MV2DF_API_DEFINITION.readme.
% y = log(det(W)), where W is positive definite and W = reshape(w,...)
if nargin==0
test_this();
return;
end
if isempty(w)
y = @(w)logdet_chol(w);
return;
end
if isa(w,'function_handle')
outer = logdet_chol(... |
github | bsxfan/meta-embeddings-master | sumsquares_penalty.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/MV2DF/function_library/scalar/sumsquares_penalty.m | 916 | utf_8 | 8f40fb9f94c7424808c89e165ec9960c | function [y,deriv] = sumsquares_penalty(w,lambda)
% This is an MV2DF. See MV2DF_API_DEFINITION.readme.
% See code for details.
if nargin==0
test_this();
return;
end
if isempty(w)
y = @(w)sumsquares_penalty(w,lambda);
return;
end
if isa(w,'function_handle')
outer = sumsquares_penalty([],lambda);
... |
github | bsxfan/meta-embeddings-master | wmlr_obj.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/MV2DF/function_library/scalar/wmlr_obj.m | 2,299 | utf_8 | f450d5fdd89f4854a123b7d7947d32c3 | function [y,deriv] = wmlr_obj(w,X,T,weights,logprior);
% This is a SCAL2DF. See SCAL2DF_API_DEFINITION.readme.
% Weighted multiclass linear logistic regression objective function.
% w is vectorized D-by-K parameter matrix W (to be optimized)
% X is D-by-N data matrix, for N trials
% T is K-by-N, 0/1 class label m... |
github | bsxfan/meta-embeddings-master | boost_obj.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/MV2DF/function_library/scalar/boost_obj.m | 1,556 | utf_8 | eaa722fa0cd7b1b492401c4e6adf807b | function [y,deriv] = boost_obj(w,T,weights,logit_prior)
% This is an MV2DF. See MV2DF_API_DEFINITION.readme.
%
% Weighted binary classifier cross-entropy objective, based on 'boosting'
% proper scoring rule. This rule places more emphasis on extreme scores,
% than the logariothmic scoring rule.
%
% Differentiable inpu... |
github | bsxfan/meta-embeddings-master | neg_gaussll_taylor.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/MV2DF/function_library/scalar/neg_gaussll_taylor.m | 1,332 | utf_8 | 4efafbe09f47ca5947e223ca80f063c6 | function [y,deriv] = neg_gaussll_taylor(w,x)
% This is an MV2DF. See MV2DF_API_DEFINITION.readme.
% This function represents the part of log N(x|0,W) that is dependent on
% W = reshape(w,...), where w is variable and x is given.
%
% y = -0.5*x'*inv(W)*x - 0.5*log(det(W)), where W is positive definite and W = reshap... |
github | bsxfan/meta-embeddings-master | brier_obj.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/MV2DF/function_library/scalar/brier_obj.m | 1,722 | utf_8 | f68fae1776aa1a970b6f329e4c0d1027 | function [y,deriv] = brier_obj(w,T,weights,logit_prior)
% This is an MV2DF. See MV2DF_API_DEFINITION.readme.
%
% Weighted binary classifier cross-entropy objective, based on 'Brier'
% quadratic proper scoring rule. This rule places less emphasis on extreme scores,
% than the logariothmic scoring rule.
%
% Differentiab... |
github | bsxfan/meta-embeddings-master | gauss_ll.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/MV2DF/function_library/scalar/gauss_ll.m | 1,461 | utf_8 | 76707fbe20f1dae43305e2542e9644ce | function [y,deriv] = gauss_ll(w,x)
% This is an MV2DF. See MV2DF_API_DEFINITION.readme.
% This function represents the part of log N(x|0,W) that is dependent on
% W = reshape(w,...), where w is variable and x is given.
%
% y = -0.5*x'*inv(W)*x - 0.5*log(det(W)), where W is positive definite and W = reshape(w,...)
... |
github | bsxfan/meta-embeddings-master | cllr_obj.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/MV2DF/function_library/scalar/cllr_obj.m | 1,611 | utf_8 | 374952d66aa4641a000a48cc12baebad | function [y,deriv] = cllr_obj(w,T,weights,logit_prior)
% This is an MV2DF. See MV2DF_API_DEFINITION.readme.
%
% Weighted binary classifier cross-entropy objective, based on logarithmic
% cost function.
%
% Differentiable inputs:
% w: is vector of N detection scores (in log-likelihood-ratio format)
%
% Fixed parame... |
github | bsxfan/meta-embeddings-master | mce_obj.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/MV2DF/function_library/scalar/mce_obj.m | 1,711 | utf_8 | 93cfa59b8a57d279ebbdb02376bd696c | function [y,deriv] = mce_obj(w,T,weights,logprior)
% This is an MV2DF. See MV2DF_API_DEFINITION.readme.
%
% Weighted multiclass cross-entropy objective.
% w is vectorized K-by-N score matrix W (to be optimized)
% T is K-by-N, 0/1 class label matrix, with exactly one 1 per column.
% weights is N-vector of objectiv... |
github | bsxfan/meta-embeddings-master | sum_ai_f_of_w_i.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/MV2DF/function_library/scalar/templates/sum_ai_f_of_w_i.m | 1,367 | utf_8 | af9137c86c4b6c7456dbd1688c9ba0bb | function [y,deriv] = sum_ai_f_of_w_i(w,a,f,b)
% This is an MV2DF. See MV2DF_API_DEFINITION.readme.
%
% Does y = sum_i a_i f(w_i) + b, where f is non-linear.
%
%Notes:
%
% f is a function handle, with behaviour as demonstrated in the test code
% of this function.
%
% b is optional, defaults to 0 if omitted
if nargi... |
github | bsxfan/meta-embeddings-master | KtimesW.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/MV2DF/function_library/linear/KtimesW.m | 726 | utf_8 | d53d40345ce7668d43a1efa9eb621335 | function [y,deriv] = KtimesW(w,K)
% This is an MV2DF . See MV2DF_API_DEFINITION.readme.
%
%
%
if nargin==0
test_this();
return;
end
if isempty(w)
map = @(w) map_this(w,K);
transmap = @(y) transmap_this(y,K);
y = linTrans(w,map,transmap);
return;
end
if isa(w,'function_handle')
f = ... |
github | bsxfan/meta-embeddings-master | scaleRows.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/MV2DF/function_library/linear/scaleRows.m | 798 | utf_8 | c848225d200f35d733b8bb76c2495127 | function [y,deriv] = scaleRows(w,scales)
% This is an MV2DF. See MV2DF_API_DEFINITION.readme.
%
% w --> bsxfun(@times,reshape(w,m,[]),scales(:))
%
% where m = length(scales);
%
% Note: this is a symmetric linear transform.
if nargin==0
test_this();
return;
end
if isempty(w)
map = @(w)map_this(w,scale... |
github | bsxfan/meta-embeddings-master | sumcolumns_fh.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/MV2DF/function_library/linear/sumcolumns_fh.m | 602 | utf_8 | 7a2cd01c3b7076cda20fa6a96cae0069 | function fh = sumcolumns_fh(m,w)
% This is almost an MV2DF, but it does not return derivatives on numeric
% input, w.
%
% w -> W = reshape(w,m,[]) -> sum(W,1)'
if nargin==0
test_this();
return;
end
map = @(w) map_this(w,m);
transmap = @(y) transmap_this(y,m);
fh = linTrans([],map,transmap);
if exist('w'... |
github | bsxfan/meta-embeddings-master | columnJofN_fh.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/MV2DF/function_library/linear/columnJofN_fh.m | 634 | utf_8 | 23448c0cc436ac53b95d5e4ec48c7b35 | function fh = columnJofN_fh(j,n,w)
% This is almost an MV2DF, but it does not return derivatives on numeric
% input, w.
%
% w -> W = reshape(w,[],n) -> W(:,j)
if nargin==0
test_this();
return;
end
map = @(w) map_this(w,j,n);
transmap = @(y) transmap_this(y,j,n);
fh = linTrans([],map,transmap);
if exist(... |
github | bsxfan/meta-embeddings-master | scaleColumns.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/MV2DF/function_library/linear/scaleColumns.m | 811 | utf_8 | cacb0b80cb3f3871595674e741382d26 | function [y,deriv] = scaleColumns(w,scales)
% This is an MV2DF. See MV2DF_API_DEFINITION.readme.
%
% w --> bsxfun(@times,reshape(w,[],n),scales(:)')
%
% where n = length(scales);
%
% Note: this is a symmetric linear transform.
if nargin==0
test_this();
return;
end
if isempty(w)
map = @(w)map_this(w,s... |
github | bsxfan/meta-embeddings-master | subvec.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/MV2DF/function_library/linear/subvec.m | 733 | utf_8 | ed189df10ecad63eca1130710c559631 | function [y,deriv] = subvec(w,size,first,length)
% This is an MV2DF . See MV2DF_API_DEFINITION.readme.
%
% w --> w(first:first+length-1)
%
if nargin==0
test_this();
return;
end
last = first+length-1;
if isempty(w)
map = @(w) w(first:last);
transmap = @(w) transmap_this(w,size,first,last);
y... |
github | bsxfan/meta-embeddings-master | identity_trans.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/MV2DF/function_library/linear/identity_trans.m | 495 | utf_8 | aec19df7ff1e1fa5079b22973d9122fc | function [y,deriv] = identity_trans(w)
% This is an MV2DF . See MV2DF_API_DEFINITION.readme.
%
% w --> w
%
if nargin==0
test_this();
return;
end
if isempty(w)
map = @(w) w;
y = linTrans(w,map,map);
return;
end
if isa(w,'function_handle')
f = identity_trans([]);
y = compose_mv(f,w,[])... |
github | bsxfan/meta-embeddings-master | WtimesK.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/MV2DF/function_library/linear/WtimesK.m | 726 | utf_8 | 20d6a4715d3fb8e2c51fc17f1a45e865 | function [y,deriv] = WtimesK(w,K)
% This is an MV2DF . See MV2DF_API_DEFINITION.readme.
%
%
%
if nargin==0
test_this();
return;
end
if isempty(w)
map = @(w) map_this(w,K);
transmap = @(y) transmap_this(y,K);
y = linTrans(w,map,transmap);
return;
end
if isa(w,'function_handle')
f = ... |
github | bsxfan/meta-embeddings-master | transpose_mv2df.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/MV2DF/function_library/linear/transpose_mv2df.m | 700 | utf_8 | 58016f72134e4ccf6256f2ea1f952a43 | function [y,deriv] = transpose_mv2df(w,M,N)
% This is an MV2DF . See MV2DF_API_DEFINITION.readme.
%
% vec(A) --> vec(A'),
%
% where A is M by N
%
% Note: this is an orthogonal linear transform.
if nargin==0
test_this();
return;
end
if isempty(w)
map = @(w) reshape(reshape(w,M,N).',[],1);
transmap... |
github | bsxfan/meta-embeddings-master | fusion_mv2df.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/MV2DF/function_library/linear/fusion_mv2df.m | 1,182 | utf_8 | df0b186cde5dcc42aea6490f13d6d479 | function [y,deriv] = fusion_mv2df(w,scores)
% This is an MV2DF. See MV2DF_API_DEFINITION.readme.
%
% The function is a 'score fusion' computed thus:
% y.' = w(1:end-1).'*scores + w(end)
%
% Here w is the vector of fusion weights, one weight per system and
% an offset.
%
% Parameters:
% scores: is... |
github | bsxfan/meta-embeddings-master | addSigmaI.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/MV2DF/function_library/linear/addSigmaI.m | 771 | utf_8 | 78b1a5b40a699c613a11ce64085abe6e | function [y,deriv] = addSigmaI(w)
% This is an MV2DF . See MV2DF_API_DEFINITION.readme.
%
%
%
if nargin==0
test_this();
return;
end
if isempty(w)
map = @(w) map_this(w);
transmap = @(w) transmap_this(w);
y = linTrans(w,map,transmap);
return;
end
if isa(w,'function_handle')
f = addS... |
github | bsxfan/meta-embeddings-master | addOffset.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/MV2DF/function_library/linear/addOffset.m | 1,057 | utf_8 | 38390e8a3f92c5a6b760571e3ba340e3 | function [y,deriv] = addOffset(w,K,N)
% This is an MV2DF. See MV2DF_API_DEFINITION.readme.
%
% w = [vec(A);b] --> vec(bsxfun(@plus,A,b))
%
% This function retrieves a K by N matrix as well as a K-vector from w,
% adds the K-vector to every column of the matrix
% and outputs the vectorized result.
% Note this... |
github | bsxfan/meta-embeddings-master | const_mv2df.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/MV2DF/function_library/linear/templates/const_mv2df.m | 856 | utf_8 | 541e86c2041370727a8705935c4d575e | function [y,deriv] = const_mv2df(w,const)
% This is an MV2DF. See MV2DF_API_DEFINITION.readme.
%
% y = const(:);
%
% This wraps the given constant into an MV2DF. The output, y, is
% independent of input w. The derivatives are sparse zero vectors of the
% appropriate size.
if nargin==0
test_this();
return;
... |
github | bsxfan/meta-embeddings-master | linTrans.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/MV2DF/function_library/linear/templates/linTrans.m | 1,012 | utf_8 | 5c26cd329441fa971c05127c464dfae5 | function [y,deriv] = linTrans(w,map,transmap)
% 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 isempty(w)
y ... |
github | bsxfan/meta-embeddings-master | affineTrans.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/MV2DF/function_library/linear/templates/affineTrans.m | 1,378 | utf_8 | f1c4abd92c1dca63db5b0ccf3915a631 | function [y,deriv] = affineTrans(w,affineMap,linMap,transMap)
% This is an MV2DF. See MV2DF_API_DEFINITION.readme.
%
% Applies affine transform y = affineMap(w). It needs also needs
% linMap, the linear part of the mapping, as well as transMap, the
% transpose of linMap. All of affineMap, linMap and transMap are funct... |
github | bsxfan/meta-embeddings-master | logsoftmax_trunc_mv2df.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/MV2DF/function_library/multivariate/logsoftmax_trunc_mv2df.m | 1,380 | utf_8 | 7933852f24348cedbc4c8750142e51de | function [y,deriv] = logsoftmax_trunc_mv2df(w,m)
% This is a MV2DF. See MV2DF_API_DEFINITION.readme.
%
% Does:
% (i) Reshapes w to m-by-n.
% (ii) effectively (not physically) append a bottom row of zeros
% (iii) Computes logsoftmax of each of n columns.
% (iv) Omits last row (effectively)
if nargin==0
test_this... |
github | bsxfan/meta-embeddings-master | mm_special.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/MV2DF/function_library/multivariate/mm_special.m | 1,465 | utf_8 | 735b9c605bad33588197fcc0c0d59eb5 | function [prod,deriv] = mm_special(w,extractA,extractB)
% This is an MV2DF. See MV2DF_API_DEFINITION.readme.
%
% [vec(A);vec(B)] --> vec(A*B)
%
% where
% A is extractA(w)
% B is extractB(w)
if nargin==0
test_this();
return;
end
if isempty(w)
prod = @(w)mm_special(w,extractA,extractB);
return;... |
github | bsxfan/meta-embeddings-master | sums_of_squares.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/MV2DF/function_library/multivariate/sums_of_squares.m | 898 | utf_8 | 1fa8d45eea9355807d8ef47606407b36 | function [y,deriv] = sums_of_squares(w,m)
% This is a MV2DF. See MV2DF_API_DEFINITION.readme.
% Does:
% (i) Reshapes w to m-by-n.
% (ii) Computes sum of squares of each of n columns.
% (iii) Transposes to output n-vector.
if nargin==0
test_this();
return;
end
if isempty(w)
y = @(w)sums_of_squares(w,m)... |
github | bsxfan/meta-embeddings-master | gemm.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/MV2DF/function_library/multivariate/gemm.m | 1,283 | utf_8 | b9245303ab8248f450ad033cde69bf29 | function [prod,deriv] = gemm(w,m,k,n)
% This is an MV2DF. See MV2DF_API_DEFINITION.readme.
%
% [vec(A);vec(B)] --> vec(A*B)
%
% where
% A is m-by-k
% B is k-by-n
if nargin==0
test_this();
return;
end
if isempty(w)
prod = @(w)gemm(w,m,k,n);
return;
end
if isa(w,'function_handle')
outer =... |
github | bsxfan/meta-embeddings-master | XtKX.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/MV2DF/function_library/multivariate/XtKX.m | 849 | utf_8 | 0298041dbd9ce1171c7cf66e0edb8a09 | function [y,deriv] = XtKX(w,K)
%This is an MV2DF.
%
% vec(X) --> vec(X'KX)
%
if nargin==0
test_this();
return;
end
m = size(K,1);
if isempty(w)
y = @(w) XtKX(w,K);
return;
end
if isa(w,'function_handle')
outer = XtKX([],K);
y = compose_mv(outer,w,[]);
return;
end
X = reshape(w,m,[]);... |
github | bsxfan/meta-embeddings-master | UtU.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/MV2DF/function_library/multivariate/UtU.m | 945 | utf_8 | 086256cb24f7c7b69d69614ceff1519b | function [prod,deriv] = UtU(w,m,n)
% This is a MV2DF. See MV2DF_API_DEFINITION.readme.
% U = reshape(w,m,n), M = U'*U, prod = M(:).
if nargin==0
test_this();
return;
end
if isempty(w)
prod = @(w)UtU(w,m,n);
return;
end
if isa(w,'function_handle')
outer = UtU([],m,n);
prod = compose_mv(outer... |
github | bsxfan/meta-embeddings-master | bsxtimes.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/MV2DF/function_library/multivariate/bsxtimes.m | 1,144 | utf_8 | 599b65f85120f5dec9d1a62d06393c35 | function [y,deriv] = bsxtimes(w,m,n)
% This is an MV2DF
%
% w = [vec(A); vec(b) ] --> vec(bsxfun(@times,A,b)),
%
% where A is an m-by-n matrix and
% b is a 1-by-n row.
%
if nargin==0
test_this();
return;
end
if isempty(w)
y = @(w) bsxtimes(w,m,n);
return;
end
if isa(w,'function_... |
github | bsxfan/meta-embeddings-master | calibrateScores.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/MV2DF/function_library/multivariate/calibrateScores.m | 1,095 | utf_8 | 36a554ff63a06324896dbea86ca33308 | function [y,deriv] = calibrateScores(w,m,n)
% This is an MV2DF. See MV2DF_API_DEFINITION.readme.
%
% [vec(A);scal;offs] --> vec(bsxfun(@plus,scal*A,b))
%
% This function retrieves from w:
% (i) an m-by-n matrix, 'scores'
% (ii) a scalar 'scal', and
% (iii) an m-vector, 'offset'
%
% Then it scales ... |
github | bsxfan/meta-embeddings-master | solve_AXeqB.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/MV2DF/function_library/multivariate/solve_AXeqB.m | 1,054 | utf_8 | cff7830e92caa23fabdd038a4e53750d | function [y,deriv] = solve_AXeqB(w,m)
% This is an MV2DF.
%
% [A(:);B(:)] --> inv(A) * B
%
if nargin==0
test_this();
return;
end
if isempty(w)
y = @(w)solve_AXeqB(w,m);
return;
end
if isa(w,'function_handle')
outer = solve_AXeqB([],m);
y = compose_mv(outer,w,[]);
return;
end
[A,B... |
github | bsxfan/meta-embeddings-master | logsoftmax_mv2df.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/MV2DF/function_library/multivariate/logsoftmax_mv2df.m | 1,248 | utf_8 | 1c29a9da21772e72c800bb7be4025fe6 | function [y,deriv] = logsoftmax_mv2df(w,m)
% This is a MV2DF. See MV2DF_API_DEFINITION.readme.
%
% Does:
% (i) Reshapes w to m-by-n.
% (ii) Computes logsoftmax of each of n columns.
if nargin==0
test_this();
return;
end
if isempty(w)
y = @(w)logsoftmax_mv2df(w,m);
return;
end
if isa(w,'function_h... |
github | bsxfan/meta-embeddings-master | sqdist.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/MV2DF/function_library/multivariate/sqdist.m | 1,170 | utf_8 | bfa9c639ce948848c20501fec93af59c | function [y,deriv] = sqdist(w,dim)
% This is an MV2DF. See MV2DF_API_DEFINITION.readme.
%
% If W = reshape(w,dim,n), then Y = vec of symmetric n-by-n matrix of
% 1/2 squared euclidian distances between all columns of W.
if nargin==0
test_this();
return;
end
if isempty(w)
y = @(w)sqdist(w,dim);
retu... |
github | bsxfan/meta-embeddings-master | dottimes.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/MV2DF/function_library/multivariate/dottimes.m | 884 | utf_8 | 7e8e3dedc670c1f93364db61f3d2b41d | function [y,deriv] = dottimes(w)
% This is an MV2DF
%
% [a; b ] --> a.*b
%
% where length(a) == length(b)
%
if nargin==0
test_this();
return;
end
if isempty(w)
y = @(w) dottimes(w);
return;
end
if isa(w,'function_handle')
f = dottimes([]);
y = compose_mv(f,w,[]);
return;
end
... |
github | bsxfan/meta-embeddings-master | solveChol_AXeqB.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/MV2DF/function_library/multivariate/solveChol_AXeqB.m | 1,391 | utf_8 | f2ded36f846a5e9904fd8299ba4a5ed1 | function [y,deriv] = solveChol_AXeqB(w,m)
% This is an MV2DF.
%
% [A(:);B(:)] --> inv(A) * B
%
% We assume A is positive definite and we solve using Choleski
if nargin==0
test_this();
return;
end
if isempty(w)
y = @(w)solveChol_AXeqB(w,m);
return;
end
if isa(w,'function_handle')
outer = solve... |
github | bsxfan/meta-embeddings-master | test_MV2DF.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/bosaris_toolkit/utility_funcs/Optimization_Toolkit/MV2DF/function_library/test/test_MV2DF.m | 2,104 | utf_8 | 1f7eea1823322c4c0741c86792fc73c4 | function test_MV2DF(f,x0,do_cstep)
%id_in = identity_trans([]);
%id_out = identity_trans([]);
%f = f(id_in);
%f = id_out(f);
x0 = x0(:);
if ~exist('do_cstep','var')
do_cstep = 1;
end
if do_cstep
Jc = cstepJacobian(f,x0);
end
Jr = rstepJacobian(f,x0);
[y0,deriv] = f(x0);
m = length(y0);
n = length(x0);
J2 ... |
github | bsxfan/meta-embeddings-master | tracer.m | .m | meta-embeddings-master/code/snapshot_for_anya/matlab/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/snapshot_for_anya/matlab/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/snapshot_for_anya/matlab/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/snapshot_for_anya/matlab/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/snapshot_for_anya/matlab/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/snapshot_for_anya/matlab/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/snapshot_for_anya/matlab/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/snapshot_for_anya/matlab/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/snapshot_for_anya/matlab/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/snapshot_for_anya/matlab/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/snapshot_for_anya/matlab/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/snapshot_for_anya/matlab/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/snapshot_for_anya/matlab/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/snapshot_for_anya/matlab/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/snapshot_for_anya/matlab/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/snapshot_for_anya/matlab/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/snapshot_for_anya/matlab/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/snapshot_for_anya/matlab/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/snapshot_for_anya/matlab/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/snapshot_for_anya/matlab/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/snapshot_for_anya/matlab/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/snapshot_for_anya/matlab/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/snapshot_for_anya/matlab/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.
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.