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 | blondon/UGM-master | UGM_Sample_Exact.m | .m | UGM-master/UGM/sample/UGM_Sample_Exact.m | 2,025 | utf_8 | 600ae4a1ff0c872505b136acee734156 | function [samples] = UGM_Sample_Exact(nodePot,edgePot,edgeStruct)
% Exact sampling
UGM_assert(prod(double(edgeStruct.nStates)) < 50000000,'Brute Force Exact Sampling not recommended for models with > 50 000 000 states');
[nNodes,maxState] = size(nodePot);
nEdges = size(edgePot,3);
edgeEnds = edgeStruct.edgeEnds;
nSta... |
github | blondon/UGM-master | UGM_MFGibbsFreeEnergy.m | .m | UGM-master/UGM/infer/UGM_MFGibbsFreeEnergy.m | 826 | utf_8 | b5b0347451245eaa8e3d43565f4f22c3 |
function [F] = MFGibbsFreeEnergy(nodePot,edgePot,nodeBel,nStates,edgeEnds,V,E)
[nNodes,maxState] = size(nodePot);
nEdges = size(edgeEnds,1);
threshold = 1e-10;
U1 = 0;
U2 = 0;
S1 = 0;
for n = 1:nNodes
% Local Mean-Field Average Energy Term
b = nodeBel(n,1:nStates(n));
U1 = U1 + sum(b .* log(nodePot(n,1... |
github | blondon/UGM-master | UGM_Infer_Junction.m | .m | UGM-master/UGM/infer/UGM_Infer_Junction.m | 12,530 | utf_8 | 64bab552027c713f64d7a81361d9ead3 | function [nodeBel,edgeBel,logZ,cliques] = UGM_Infer_Junction(nodePot,edgePot,edgeStruct,ordering)
debug = 0;
[nNodes,maxState] = size(nodePot);
nEdges = size(edgePot,3);
edgeEnds = edgeStruct.edgeEnds;
V = edgeStruct.V;
E = edgeStruct.E;
nStates = edgeStruct.nStates;
if nargin < 4
ordering = 1:nNodes;
end
%% Tr... |
github | blondon/UGM-master | UGM_Infer_Exact.m | .m | UGM-master/UGM/infer/UGM_Infer_Exact.m | 2,152 | utf_8 | e48e6d8983106338ee17b98ef9d14548 | function [nodeBel, edgeBel, logZ] = UGM_Infer_Exact(nodePot, edgePot, edgeStruct)
% INPUT
% nodePot(node,class)
% edgePot(class,class,edge) where e is referenced by V,E (must be the same
% between feature engine and inference engine)
%
% OUTPUT
% nodeBel(node,class) - marginal beliefs
% edgeBel(class,class,e) ... |
github | blondon/UGM-master | UGM_Infer_MeanField.m | .m | UGM-master/UGM/infer/UGM_Infer_MeanField.m | 1,948 | utf_8 | ede67501908e427ccbcd6a4cc07df9c6 | function [nodeBel, edgeBel, logZ] = UGM_Infer_MeanField(nodePot,edgePot,edgeStruct)
if edgeStruct.useMex
[nodeBel,edgeBel,logZ] = UGM_Infer_MFC(nodePot,edgePot,edgeStruct.edgeEnds,edgeStruct.nStates,edgeStruct.V,edgeStruct.E,int32(edgeStruct.maxIter));
else
[nodeBel,edgeBel,logZ] = Infer_MF(nodePot,edgePot,edg... |
github | blondon/UGM-master | UGM_CRF_MinFlow.m | .m | UGM-master/UGM/train/UGM_CRF_MinFlow.m | 3,394 | utf_8 | a980b2a1c71f3f826aed025616ae2170 | function [obj,g] = UGM_CRF_MinFlow(w,Xnode,Xedge,Y,nodeMap,edgeMap,edgeStruct)
% Minimum Probability Flow objective using all neighbors as alternative
% states
% (this function could be made more efficient by using that only a few
% terms change when you change one label)
[nNodes,maxState] = size(nodeMap);
nNodeFeatur... |
github | blondon/UGM-master | UGM_Decode_ICM.m | .m | UGM-master/UGM/decode/UGM_Decode_ICM.m | 1,593 | utf_8 | df1f1b0df8414aa8e52956e6b77ab471 | function [y] = UGM_Decode_ICM(nodePot, edgePot, edgeStruct,y)
% INPUT
% nodePot(node,class)
% edgePot(class,class,edge) where e is referenced by V,E (must be the same
% between feature engine and inference engine)
%
% OUTPUT
% nodeLabel(node)
if nargin < 4
[junk y] = max(nodePot,[],2);
end
if edgeSt... |
github | blondon/UGM-master | UGM_Decode_Junction.m | .m | UGM-master/UGM/decode/UGM_Decode_Junction.m | 10,247 | utf_8 | 4250b31fb436d8532debb5fa63e70b65 | function [yMap] = UGM_Decode_Junction(nodePot, edgePot, edgeStruct, ordering)
% INPUT
% nodePot(node,class)
% edgePot(class,class,edge) where e is referenced by V,E (must be the same
% between feature engine and inference engine)
%
% OUTPUT
% nodeLabel(node)
debug = 0;
[nNodes,maxState] = size(nodePot);
... |
github | blondon/UGM-master | UGM_Decode_AlphaExpansionBetaShrink.m | .m | UGM-master/UGM/decode/UGM_Decode_AlphaExpansionBetaShrink.m | 4,141 | utf_8 | 34ccfcddae983ec8e5d10336d7434458 | function [y] = UGM_Decode_AlphaExpansionBetaShrink(nodePot, edgePot, edgeStruct, decodeFunc, betaSelect, y)
% INPUT
% nodePot(node,class)
% edgePot(class,class,edge) where e is referenced by V,E (must be the same
% between feature engine and inference engine)
%
% OUTPUT
% nodeLabel(node)
[nNodes,maxStates] =... |
github | blondon/UGM-master | UGM_Decode_Exact.m | .m | UGM-master/UGM/decode/UGM_Decode_Exact.m | 1,353 | utf_8 | 7377c6644da0e32d4bff47256d89f430 | function [nodeLabels] = UGM_Decode_Exact(nodePot, edgePot, edgeStruct)
% INPUT
% nodePot(node,class)
% edgePot(class,class,edge) where e is referenced by V,E (must be the same
% between feature engine and inference engine)
%
% OUTPUT
% nodeLabel(node)
UGM_assert(prod(double(edgeStruct.nStates)) < 50000000,'B... |
github | blondon/UGM-master | WolfeLineSearch.m | .m | UGM-master/minFunc/WolfeLineSearch.m | 11,065 | utf_8 | d08c7689ba778999274da330a47625ca | function [t,f_new,g_new,funEvals,H] = WolfeLineSearch(...
x,t,d,f,g,gtd,c1,c2,LS_interp,LS_multi,maxLS,progTol,debug,doPlot,saveHessianComp,funObj,varargin)
%
% Bracketing Line Search to Satisfy Wolfe Conditions
%
% Inputs:
% x: starting location
% t: initial step size
% d: descent direction
% f: function v... |
github | blondon/UGM-master | minFunc_processInputOptions.m | .m | UGM-master/minFunc/minFunc_processInputOptions.m | 4,180 | utf_8 | 0993f3a76c6430d2c9adec2b52df6133 |
function [verbose,verboseI,debug,doPlot,maxFunEvals,maxIter,optTol,progTol,method,...
corrections,c1,c2,LS_init,cgSolve,qnUpdate,cgUpdate,initialHessType,...
HessianModify,Fref,useComplex,numDiff,LS_saveHessianComp,...
Damped,HvFunc,bbType,cycle,...
HessianIter,outputFcn,traceFunc,useMex,useNegCur... |
github | ahmedhamdy2121/CV_Action_Recognition_2015-master | kernel_svm_one_vs_all_modified.m | .m | CV_Action_Recognition_2015-master/code/classifiers/kernel_svm_one_vs_all_modified.m | 2,414 | utf_8 | 185d481006c6399718ee64ab363d592e | % One-Vs-all SVM
% Final decision is based on max(w*x+b)
function [total_accuracy, class_wise_accuracy, confusion_matrix] =...
kernel_svm_one_vs_all_modified(K_train_train, K_test_train,...
training_labels, test_labels, C_val)
unique_classes = unique(training_labels);
n_classes = length(unique... |
github | ahmedhamdy2121/CV_Action_Recognition_2015-master | drawskt.m | .m | CV_Action_Recognition_2015-master/data/MSRAction3D/real_world_coordinates/drawskt.m | 1,142 | utf_8 | 39ba4c3f206fe79351b2d3ba8f183a80 | %USAGE: drawskt(1,3,1,4,1,2) --- show actions 1,2,3 performed by subjects 1,2,3,4 with instances 1 and 2.
function drawskt(a1,a2,s1,s2,e1,e2)
J=[20 1 2 1 8 10 2 9 11 3 4 7 7 5 6 14 15 16 17;
3 3 3 8 10 12 9 11 13 4 ... |
github | noureldien/RecommenderSystem-master | lanbpro.m | .m | RecommenderSystem-master/inexact_alm_mc/PROPACK/lanbpro.m | 19,514 | utf_8 | 897b157335c2a5c269845380328709c4 | function [U,B_k,V,p,ierr,work] = lanbpro(varargin)
%LANBPRO Lanczos bidiagonalization with partial reorthogonalization.
% LANBPRO computes the Lanczos bidiagonalization of a real
% matrix using the with partial reorthogonalization.
%
% [U_k,B_k,V_k,R,ierr,work] = LANBPRO(A,K,R0,OPTIONS,U_old,B_old,V_old)
% ... |
github | noureldien/RecommenderSystem-master | lanpro.m | .m | RecommenderSystem-master/inexact_alm_mc/PROPACK/lanpro.m | 14,762 | utf_8 | ff3aa513289e3776117575af43b5ed1b | function [Q_k,T_k,r,anorm,ierr,work] = lanpro(A,nin,kmax,r,options,...
Q_k,T_k,anorm)
%LANPRO Lanczos tridiagonalization with partial reorthogonalization
% LANPRO computes the Lanczos tridiagonalization of a real symmetric
% matrix using the symmetric Lanczos algorithm with partial
% reorthogonalization... |
github | noureldien/RecommenderSystem-master | BPMF.m | .m | RecommenderSystem-master/BPTF/BPMF.m | 5,803 | utf_8 | 515c39c005cc0259c4e1d4587f890881 | % (C) Copyright 2011, Liang Xiong (lxiong[at]cs[dot]cmu[dot]edu)
%
% This piece of software is free for research purposes.
% We hope it is helpful but do not privide any warranty.
% If you encountered any problems please contact the author.
function [Us, Vs, rmseTe] = BPMF(CTr, CTe, D, alpha, hyper_params, ini... |
github | noureldien/RecommenderSystem-master | PMF_Grad.m | .m | RecommenderSystem-master/BPTF/PMF_Grad.m | 2,317 | utf_8 | 3467d9ba9cbffabd2fbad819c7bf6fa0 | % (C) Copyright 2011, Liang Xiong (lxiong[at]cs[dot]cmu[dot]edu)
%
% This piece of software is free for research purposes.
% We hope it is helpful but do not privide any warranty.
% If you encountered any problems please contact the author.
function [U, V, obj, rmseTe] = PMF_Grad(C, CTe, init, options)
% PMF ... |
github | noureldien/RecommenderSystem-master | BPTF_Predict.m | .m | RecommenderSystem-master/BPTF/BPTF_Predict.m | 1,179 | utf_8 | e08bada9079a29efdf5a2dc6288332ed | % (C) Copyright 2011, Liang Xiong (lxiong[at]cs[dot]cmu[dot]edu)
%
% This piece of software is free for research purposes.
% We hope it is helpful but do not privide any warranty.
% If you encountered any problems please contact the author.
function [Y U V T rmse] = BPTF_Predict(Us, Vs, Ts, D, TTe, range)
%[Y... |
github | noureldien/RecommenderSystem-master | BPMF_Predict.m | .m | RecommenderSystem-master/BPTF/BPMF_Predict.m | 983 | utf_8 | ee44a551e7430fe01b6edeba2dfebd89 | % (C) Copyright 2011, Liang Xiong (lxiong[at]cs[dot]cmu[dot]edu)
%
% This piece of software is free for research purposes.
% We hope it is helpful but do not privide any warranty.
% If you encountered any problems please contact the author.
function [Y U V rmse] = BPMF_Predict(Us, Vs, D, C, range)
% apply the... |
github | noureldien/RecommenderSystem-master | BPTF.m | .m | RecommenderSystem-master/BPTF/BPTF.m | 8,110 | utf_8 | aedbe4503fa688c2ae31fe28ec4fa8ae | % (C) Copyright 2011, Liang Xiong (lxiong[at]cs[dot]cmu[dot]edu)
%
% This piece of software is free for research purposes.
% We hope it is helpful but do not privide any warranty.
% If you encountered any problems please contact the author.
function [Us Vs Ts rmseTe alpha] = BPTF(TTr, TTe, D, hyper_params, ini... |
github | noureldien/RecommenderSystem-master | cell2vars.m | .m | RecommenderSystem-master/BPTF/lib/cell2vars.m | 518 | utf_8 | fbcb249b53d9e179fc9a6d9ba9a8073b | % (C) Copyright 2011, Liang Xiong (lxiong[at]cs[dot]cmu[dot]edu)
%
% This piece of software is free for research purposes.
% We hope it is helpful but do not privide any warranty.
% If you encountered any problems please contact the author.
function [varargout] = cell2vars(c, idx)
if nargin < 2
idx = 1... |
github | noureldien/RecommenderSystem-master | RI.m | .m | RecommenderSystem-master/BPTF/lib/RI.m | 799 | utf_8 | 05c942f96dfd320a9a07887c33403d8d | % (C) Copyright 2011, Liang Xiong (lxiong[at]cs[dot]cmu[dot]edu)
%
% This piece of software is free for research purposes.
% We hope it is helpful but do not privide any warranty.
% If you encountered any problems please contact the author.
function [idx] = RI(n, max_idx, replace, sorted)
%[idx] = RI(n, max_idx, rep... |
github | noureldien/RecommenderSystem-master | RMSE.m | .m | RecommenderSystem-master/BPTF/lib/RMSE.m | 307 | utf_8 | fa7a16bc04b302440ba3212cef60fbd8 | % (C) Copyright 2011, Liang Xiong (lxiong[at]cs[dot]cmu[dot]edu)
%
% This piece of software is free for research purposes.
% We hope it is helpful but do not privide any warranty.
% If you encountered any problems please contact the author.
function [r]=RMSE(err)
% r=RMSE(err)
r=sqrt(mean(err(:).^2));
|
github | noureldien/RecommenderSystem-master | GetOptions.m | .m | RecommenderSystem-master/BPTF/lib/GetOptions.m | 1,311 | utf_8 | 361768510438866126e7ea394b346c64 | % (C) Copyright 2011, Liang Xiong (lxiong[at]cs[dot]cmu[dot]edu)
%
% This piece of software is free for research purposes.
% We hope it is helpful but do not privide any warranty.
% If you encountered any problems please contact the author.
function [varargout]=GetOptions(options, varargin)
%[varargout]=GetOp... |
github | noureldien/RecommenderSystem-master | GroupIndex.m | .m | RecommenderSystem-master/BPTF/lib/GroupIndex.m | 575 | utf_8 | 00a4a593a823c894d37c2b142443597b | % (C) Copyright 2011, Liang Xiong (lxiong[at]cs[dot]cmu[dot]edu)
%
% This piece of software is free for research purposes.
% We hope it is helpful but do not privide any warranty.
% If you encountered any problems please contact the author.
function [gI]=GroupIndex(I, n)
%[gI]=GroupIndex(I, n)
% group the in... |
github | noureldien/RecommenderSystem-master | EncodeInt.m | .m | RecommenderSystem-master/BPTF/lib/EncodeInt.m | 1,230 | utf_8 | cc7050bd32e99b78592942ca53241de6 | % (C) Copyright 2011, Liang Xiong (lxiong[at]cs[dot]cmu[dot]edu)
%
% This piece of software is free for research purposes.
% We hope it is helpful but do not privide any warranty.
% If you encountered any problems please contact the author.
function [r]=EncodeInt(input, codebook, vals)
%function [r]=EncodeInt... |
github | noureldien/RecommenderSystem-master | mvnrndpre.m | .m | RecommenderSystem-master/BPTF/lib/mvnrndpre.m | 517 | utf_8 | 0b83c90d42266f50524096f99d7fb740 | % (C) Copyright 2011, Liang Xiong (lxiong[at]cs[dot]cmu[dot]edu)
%
% This piece of software is free for research purposes.
% We hope it is helpful but do not privide any warranty.
% If you encountered any problems please contact the author.
function [x, src] = mvnrndpre(mu, L, n)
% generate samples of norm va... |
github | noureldien/RecommenderSystem-master | install_mex.m | .m | RecommenderSystem-master/HASI/install_mex.m | 3,238 | utf_8 | 462028f1ad00a3565b66deaefb5d36d3 | function install_mex(VERB)
% install_mex
% installs mex files for SoftImpute and PROPACK package
% install_mexSimple( verbose )
% will display more verbose diagnoistic messages
% if the variable "verbose" is true.
%
% This install_mex file has been modified by Rahul Mazumder based on the one
% written by Steph... |
github | noureldien/RecommenderSystem-master | install_mex.m | .m | RecommenderSystem-master/HASI/PROPACK_utils/install_mex.m | 3,390 | utf_8 | ee0aef4fdc8b8582e6a5983b5db5dfbe | function install_mex(VERB)
% install_mexSimple
% installs mex files for SVT and the PROPACK subpackage
% install_mexSimple( verbose )
% will display more verbose diagnoistic messages
% if the variable "verbose" is true.
%
% Stephen Becker, Jan 2010, SVT package. srbecker@caltech.edu
addpath('PROPACK_utils/')
add... |
github | noureldien/RecommenderSystem-master | lanbpro.m | .m | RecommenderSystem-master/HASI/PROPACK_utils/lanbpro.m | 19,514 | utf_8 | 897b157335c2a5c269845380328709c4 | function [U,B_k,V,p,ierr,work] = lanbpro(varargin)
%LANBPRO Lanczos bidiagonalization with partial reorthogonalization.
% LANBPRO computes the Lanczos bidiagonalization of a real
% matrix using the with partial reorthogonalization.
%
% [U_k,B_k,V_k,R,ierr,work] = LANBPRO(A,K,R0,OPTIONS,U_old,B_old,V_old)
% ... |
github | noureldien/RecommenderSystem-master | lanpro.m | .m | RecommenderSystem-master/HASI/PROPACK_utils/lanpro.m | 14,762 | utf_8 | ff3aa513289e3776117575af43b5ed1b | function [Q_k,T_k,r,anorm,ierr,work] = lanpro(A,nin,kmax,r,options,...
Q_k,T_k,anorm)
%LANPRO Lanczos tridiagonalization with partial reorthogonalization
% LANPRO computes the Lanczos tridiagonalization of a real symmetric
% matrix using the symmetric Lanczos algorithm with partial
% reorthogonalization... |
github | noureldien/RecommenderSystem-master | lanbpro_fnhandle.m | .m | RecommenderSystem-master/HASI/Matlab_files/private/lanbpro_fnhandle.m | 13,866 | utf_8 | 7d57c273518283ac6f003ef69fdb0e80 | function [U,B_k,V,p,ierr,work] = lanbpro_fnhandle(varargin)
% LANBPRO Lanczos bidiagonalization with partial reorthogonalization.
%from original PROPACK, modified by RM for specific function-handles,
% required by soft_impute.m to perform Soft-Impute
% expected calling sequence for function-handles
% [U,B,V,p,ierr,w]... |
github | noureldien/RecommenderSystem-master | sparcoSetup.m | .m | RecommenderSystem-master/SVD/sparcoSetup.m | 4,395 | utf_8 | 3c92a1a0d9763e487b83670d8e8e4d9d | function sparcoSetup(varargin)
%SPARCOSETUP Setup the SPARCO toolbox.
%
% SPARCOSETUP will install the SPARCO toolbox.
% Copyright 2008, Ewout van den Berg and Michael P. Friedlander
% http://www.cs.ubc.ca/labs/scl/sparco
% $Id: sparcoSetup.m 1040 2008-06-26 20:29:02Z ewout78 $
pathlist = {};
% Get root loca... |
github | noureldien/RecommenderSystem-master | error_rate.m | .m | RecommenderSystem-master/SVD/error_rate.m | 336 | utf_8 | 6a84e0bf5679982ae222801b8034505b |
function mae = error_rate(act,pred)
er=zeros(size(act,1),size(act,2));
for x=1:size(act,1)
for y = 1:size(act,2)
if act(x,y)~=0
er(x,y)= pred(x,y)-act(x,y);
end
end
end
abs_err = sum(sum(abs(er)));
ind = find(er);
l=length(ind);
mae=ab... |
github | noureldien/RecommenderSystem-master | bias_sgd.m | .m | RecommenderSystem-master/SVD/bias_sgd.m | 627 | utf_8 | bef959652d97846beb67aacf0f671ea9 |
function [bi, bu]=bias_sgd(train_data,X,bu,bi,g_mean,lambda_b)
rate=0.001;
N=size(train_data,1);
perm = randperm(N);
for n=1:N
user = train_data(perm(n),1);
movie = train_data(perm(n),2);
rating = train_data(perm(n),3);
bu_grad=-2 * (rating... |
github | noureldien/RecommenderSystem-master | solveTV.m | .m | RecommenderSystem-master/SVD/tools/solveTV.m | 5,610 | utf_8 | 4eec04a61f37b333e4087cb7736975dc | function x = solveTV(M,B,TV,b,x0,options)
% SOLVETV Demo total-variation solver
%
% Function [X] = SOLVETV(M,B,TV,b,X0,OPTIONS), solves
%
% Minimize ||MBx - b||^2 + gammaL1 * ||W_L1 * x ||_p
% + gammaTV * ||W_TV * TV(Bx)||_q
%
% where M is the measurement matrix and B is the sparsity ba... |
github | noureldien/RecommenderSystem-master | generateAngiogram.m | .m | RecommenderSystem-master/SVD/tools/generateAngiogram.m | 2,499 | utf_8 | f9da07b278576eefa5a5bb912b373401 | function result = generateAngiogram(m,n)
%GENERATEANGIOGRAM Generate artificial Angiogram signal.
%
% GENERATEANGIOGRAM(M,N) generates an M by N image filled with 18
% non-overlapping ellipses.
%
% Based on the SparseMRI implementation by M. Lustig, 2007.
%
% References
% M. Lustig, D.L. Donoho, and J.M. ... |
github | noureldien/RecommenderSystem-master | checkOperators.m | .m | RecommenderSystem-master/SVD/tools/checkOperators.m | 5,223 | utf_8 | 9dfe1fd2fecfae085a60e0716be8f9ce | function checkOperators
% Initialize random number generators
randn('state',0); rand('state',1);
% Check basic operators
A = opBinary(103,407,0); checkOperator(A);
A = opBinary(103,407,1); checkOperator(A);
A = opBlur(103,407); checkOperator(A);
kernel = sin(linspace(0,9,351)... |
github | noureldien/RecommenderSystem-master | opDifference.m | .m | RecommenderSystem-master/SVD/tools/opDifference.m | 1,614 | utf_8 | 35a454d058c0bfd47a1eb81f381775f6 | function op = opDifference(size)
%OPDIFFERENCE Generation of difference function
%
% OPDIFFERENCE(SIZE) returns the handle of a difference function
% that takes the arguments X and MODE. When MODE is 1 the vector
% X is reshaped to SIZE and the difference is taken in the ROW
% and COLUMN direction and output i... |
github | noureldien/RecommenderSystem-master | parseDefaultOpts.m | .m | RecommenderSystem-master/SVD/tools/parseDefaultOpts.m | 3,427 | utf_8 | 3144287d4d977331b2b7e3e1b2dd63bf | function [opts,args] = parseDefaultOpts(varargin)
%PARSEDEFAULTOPTS Parses default options for Sparco
%
% [OPTS,ARGS] = PARSEDEFAULTOPTS(VARARGIN) scans the argument
% list VARARGIN for a number of default flags such as 'update',
% 'show', and options, including 'problempath', 'datapath',
% 'linewidth', 'fonts... |
github | noureldien/RecommenderSystem-master | fftn_fast.m | .m | RecommenderSystem-master/SVD/tools/nufft/fftn_fast.m | 2,036 | utf_8 | 2b1b5566a9a38eae2937d7676fe71dec | function Xs = fftn_fast(xs, ns)
%function Xs = fftn_fast(xs, ns)
%
% For some reason, matlab's fftn routine is suboptimal
% for the case of 2D FFTs, at least on some machines.
% The improvement herein was found by Hugo Shi.
%
% Copyright 2004-6-28, Jeff Fessler, The University of Michigan
if nargin < 1, help(mfilenam... |
github | noureldien/RecommenderSystem-master | nufft_init.m | .m | RecommenderSystem-master/SVD/tools/nufft/nufft_init.m | 8,962 | utf_8 | 548aa266fba85cd90e5f445fd4f23855 | function st = nufft_init(om, Nd, Jd, Kd, varargin)
%function st = nufft_init(om, Nd, Jd, Kd, [n_shift,] ...)
%
% Initialize structure for d-dimension NUFFT using KB interpolator,
% particularly the interpolation matrix in sparse format.
% caution: this routine can require a lot of memory!
% in
% om [M,d] "digital" fre... |
github | noureldien/RecommenderSystem-master | dtft.m | .m | RecommenderSystem-master/SVD/tools/nufft/dtft.m | 2,358 | utf_8 | 50debf34f758513c3f45c86337245a1a | function X = dtft(x, omega, n_shift, useloop)
%function X = dtft(x, omega, n_shift, useloop)
% Compute d-dimensional DTFT of signal x at frequency locations omega
% In
% x [[Nd],L] signal values
% omega [M,dd] frequency locations (radians)
% n_shift [dd,1] use [0:N-1]-n_shift (default [0 0])
% useloop 1 to reduce ... |
github | noureldien/RecommenderSystem-master | newfft.m | .m | RecommenderSystem-master/SVD/tools/nufft/newfft.m | 9,985 | utf_8 | c2ab1e61994ecfc57f13272288f4e1f0 | function st = newfft(om_in, Nd_in, varargin)
%function st = nufft_init(om, Nd, [options])
%
% UNDER CONSTRUCTION
% New version of NUFFT (pun intended) that uses real interpolation kernels.
% (The original NUFFT code used complex interpolation needlessly.)
%
% This returns a "strum" object with methods for both forward... |
github | noureldien/RecommenderSystem-master | kaiser_bessel.m | .m | RecommenderSystem-master/SVD/tools/nufft/kaiser_bessel.m | 4,256 | utf_8 | 301767ac2118bbaed64a676abb820d1b | function [kb, alpha, kb_m] = kaiser_bessel(x, J, alpha, kb_m, K_N)
%function [kb, alpha, kb_m] = kaiser_bessel(x, J, alpha, kb_m)
%function [kb, alpha, kb_m] = kaiser_bessel(x, J, 'best', 0, K_N)
%
% generalized Kaiser-Bessel function for x in support [-J/2,J/2]
% shape parameter "alpha" (default 2.34 J)
% order param... |
github | noureldien/RecommenderSystem-master | kaiser_bessel_xray.m | .m | RecommenderSystem-master/SVD/tools/nufft/kaiser_bessel_xray.m | 2,151 | utf_8 | eabbb77a86ba6ca37d248d41bc6ca06a | function [proj, J, alpha, kb_m, d] = kaiser_bessel_xray(r, J, alpha, kb_m, d)
%function [proj, J, alpha, kb_m, d] = kaiser_bessel_xray(r, J, alpha, kb_m, d)
%
% X-ray transform of generalized Kaiser-Bessel function,
% See (A7) in lewitt:90:mdi, JOSA-A, Oct. 1990.
%
% in
% r [?] radial locations in projection space (un... |
github | noureldien/RecommenderSystem-master | ifftn_fast.m | .m | RecommenderSystem-master/SVD/tools/nufft/ifftn_fast.m | 2,060 | utf_8 | b6f51f528249704b080b10ad1dbe05ba | function ys = ifftn_fast(xs)
%function ys = ifftn_fast(xs)
%
% For some reason, matlab's ifftn routine is suboptimal
% for the case of 2D FFTs, at least on some machines.
% The improvement herein was found by Hugo Shi.
%
% Note: matlab's ifft() and ifftn() handle an optional second "N" argument in
% different ways! S... |
github | noureldien/RecommenderSystem-master | my_fftn.m | .m | RecommenderSystem-master/SVD/tools/nufft/my_fftn.m | 607 | utf_8 | 437360ef79da5cad65fc652431af3c10 | function X = my_fftn(x)
if nargin < 1, fftn_test, return, end
X = fft(fft(x).').';
return
X = fft(fft(x, [], 1), [], 2);
return
dd = ndims(x);
X = fft(x, [], 1);
for id=2:dd
X = fft(X, [], id);
end
return
X = fft(x);
for id=2:dd
ord = 1:dd;
ord([1 id]) = [id 1];
x = permute(X, ord);
X = fft(x);
X = ipermute(... |
github | noureldien/RecommenderSystem-master | nufft1_build.m | .m | RecommenderSystem-master/SVD/tools/nufft/nufft1_build.m | 6,851 | utf_8 | 9a41417e59ac8652156bbeb7fb86edab | function st = nufft1_build(J, varargin)
%function st = nufft1_build(J, [option])
% Build 1D LS-NUFFT interpolation coefficients by brute force.
%
% in
% J neighborhood size: [-J/2,J/2]
% option
% om [M,1] frequency locations, if not provided build fine table
% N # of signal values (default: 2^8)
% K # of DFT freque... |
github | noureldien/RecommenderSystem-master | nufft_scale.m | .m | RecommenderSystem-master/SVD/tools/nufft/nufft_scale.m | 1,669 | utf_8 | 5a2420ebfd1d557e057eb19f03594528 | function sn = nufft_scale(Nd, Kd, alpha, beta)
%function sn = nufft_scale(Nd, Kd, alpha, beta)
% Compute scaling factors for NUFFT
% in:
% Nd,Kd
% alpha {d}
% beta {d}
% out:
% sn [[Nd]] scaling factors
%
% Copyright 2004-7-8, Jeff Fessler, The University of Michigan
if nargin < 4, help(mfilename), nufft_scale_test,... |
github | noureldien/RecommenderSystem-master | nufft_sinc.m | .m | RecommenderSystem-master/SVD/tools/nufft/nufft_sinc.m | 702 | utf_8 | f6961c442f629fcea3ebf35a072f5db3 | function y = nufft_sinc(x)
%function y = nufft_sinc(x)
%
% my version of "sinc" function, because matlab's sinc() is in a toolbox
%
% Copyright 2001-12-8, Jeff Fessler, The University of Michigan
if nargin < 1, help(mfilename), error(mfilename), end
if streq(x, 'test'), nufft_sinc_test, return, end
iz = find(x == 0)... |
github | noureldien/RecommenderSystem-master | dtft_adj.m | .m | RecommenderSystem-master/SVD/tools/nufft/dtft_adj.m | 2,508 | utf_8 | 508feba223fc7da25b26bf0de1c2fb1f | function x = dtft_adj(X, omega, Nd, n_shift, useloop)
%function x = dtft_adj(X, omega, Nd, n_shift, useloop)
% Compute adjoint of d-dim DTFT for spectrum X at frequency locations omega
% In
% X [M,L] dD DTFT values
% omega [M,d] frequency locations (radians)
% n_shift [d,1] use [0:N-1]-n_shift (default [0 ... 0])
%... |
github | noureldien/RecommenderSystem-master | updateFigure.m | .m | RecommenderSystem-master/SVD/problems/private/updateFigure.m | 2,446 | utf_8 | b7dcdb185a2e6d84d11d75eefe75f0e7 | function updateFigure(opts, figTitle, figFilename)
% Copyright 2008, Ewout van den Berg and Michael P. Friedlander
% http://www.cs.ubc.ca/labs/scl/sparco
% $Id: updateFigure.m 1040 2008-06-26 20:29:02Z ewout78 $
% Ensure default values are available
opts.linewidth = getOption(opts,'linewidth', []);
opts.fontsi... |
github | noureldien/RecommenderSystem-master | opHadamard.m | .m | RecommenderSystem-master/SVD/operators/opHadamard.m | 1,439 | utf_8 | d059bf0e35bea844c84ab1b5a42b2f57 | function op = opHadamard(n,normalized)
% OPHADAMARD Hadamard matrix
%
% OPHADAMARD(N,NORMALIZED) creates a Hadamard operator for
% vectors of length N. When N is not a power of two, vectors are
% internally padded by zeroes to the next power of
% two. Multiplication is done using a fast routine. When the
%... |
github | noureldien/RecommenderSystem-master | opBlur.m | .m | RecommenderSystem-master/SVD/operators/opBlur.m | 1,015 | utf_8 | a56f27b7bad56ce94ab42f00977d3e29 | function op = opBlur(m,n)
%OPBLUR Two-dimensional blurring operator
%
% OPBLUR(M,N) creates an blurring operator for M by N
% images. This function is used for the GPSR-based test problems
% and is based on the implementation by Figueiredo, Nowak and
% Wright, 2007.
% Copyright 2008, Ewout van den Berg and... |
github | noureldien/RecommenderSystem-master | opToepSign.m | .m | RecommenderSystem-master/SVD/operators/opToepSign.m | 2,717 | utf_8 | 09d3e8a42667f6a81ffd85d309683dc1 | function [op,d] = opToepSign(m,n,type,normalized)
%OPTOEPSIGN Toeplitz matrix with random sign entries
%
% OP = OPTOEPSIGN(M,N,TYPE,NORMALIZED) creates an M by N
% Toeplitz matrix with random +1 and -1 entries. TYPE can either
% be 'toeplitz' or 'circular'. For the 'toeplitz' type matrix,
% m+n-1 different gen... |
github | noureldien/RecommenderSystem-master | opFoG.m | .m | RecommenderSystem-master/SVD/operators/opFoG.m | 1,525 | utf_8 | e9d2e51d56887ced263d6aea61cdd12b | function op = opFoG(varargin)
% OPFOG Concatenate a sequence of operators into a single operator.
%
% OPFOG(OP1,OP2,...OPn) creates an operator that successively
% applies each of the operators OP1, OP2, ..., OPn on a given
% input vector. In non-adjoint mode this is done in reverse
% order, starting with... |
github | noureldien/RecommenderSystem-master | opGaussian.m | .m | RecommenderSystem-master/SVD/operators/opGaussian.m | 2,913 | utf_8 | e349dccf74dc36e3d3148bac61e4d1cc | function op = opGaussian(m,n,mode)
% OPGAUSSIAN Gaussian ensemble
%
% OPGAUSSIAN(M,N,MODE) creates an M by N Gaussian ensemble
% operator. By setting MODE a number of different types of
% ensemble can be generated; MODE = 0 (default) explicitly
% creates an unnormalized matrix from the Normal
% distribut... |
github | noureldien/RecommenderSystem-master | opDictionary.m | .m | RecommenderSystem-master/SVD/operators/opDictionary.m | 2,209 | utf_8 | 6bdfa44ba3441f5083c8f58d99dc4134 | function op = opDictionary(varargin)
% OPDICTIONARY Dictionary of concatenated operators
%
% OPDICTIONARY(WEIGHTS, OP1, OP2, ...) creates a dictionary
% operator consisting of the concatenation of all operators;
% [WEIGHT1*OP1 | WEIGHT2*OP2 | ...]. The WEIGHT parameter is
% optional and can either be a sca... |
github | noureldien/RecommenderSystem-master | opSum.m | .m | RecommenderSystem-master/SVD/operators/opSum.m | 1,946 | utf_8 | 568868cc5acd7d78180613a1ff8d179e | function op = opSum(varargin)
% OPSUM Summate a sequence of operators into a single operator.
%
% OPSUM(WEIGHTS,OP1,OP2,...OPn) creates an operator that
% consists of the weighted sum of OP1, OP2, ..., OPn. An
% alternative but equivalent way to call this function is
% OPSUM(WEIGHTS,{OP1,OP2,...,OPn}). Th... |
github | noureldien/RecommenderSystem-master | opWindowedOp.m | .m | RecommenderSystem-master/SVD/operators/opWindowedOp.m | 2,704 | utf_8 | 3849575774008a510b8737ce40b8bd5f | function op = opWindowedOp(m,operator,window,overlap)
% OPWINDOWEDOP Overcomplete windowed operator
%
% OPWINDOWEDOP(M,OPERATOR,WINDOW,OVERLAP) creates an
% overcomplete windowed operator with overlap:
%
% / +------------+-------------------------+
% | | | |
% |... |
github | noureldien/RecommenderSystem-master | opReal.m | .m | RecommenderSystem-master/SVD/operators/opReal.m | 519 | utf_8 | 91641de8032649565bc6762cb6ed09d9 | function op = opReal(n)
% OPREAL Discard imaginary components
%
% OPREAL(N) creates an operator that discards the imaginary
% components of input vectors of length N.
% Copyright 2008, Ewout van den Berg and Michael P. Friedlander
% http://www.cs.ubc.ca/labs/scl/sparco
% $Id: opReal.m 1040 2008-06-26 20:2... |
github | noureldien/RecommenderSystem-master | opKron.m | .m | RecommenderSystem-master/SVD/operators/opKron.m | 1,402 | utf_8 | b8cff5e56f78d9adc420ac7608d135dd | function op = opKron(op1,op2)
% OPKRON Kronecker tensor product
%
% OPKRON(OP1,OP2) creates an operator that is the Kronecker
% tensor product of OP1 and OP2.
% Copyright 2008, Rayan Saab, Ewout van den Berg and
% Michael P. Friedlander
% http://www.cs.ubc.ca/labs/scl/sparco
% $Id: opKro... |
github | noureldien/RecommenderSystem-master | opBinary.m | .m | RecommenderSystem-master/SVD/operators/opBinary.m | 1,424 | utf_8 | 9bd5131bf3d3392041aac28ce17037c9 | function op = opBinary(m,n,mode)
%OPBINARY Binary (0/1) ensemble
%
% OP = OPBINARY(M,N,MODE) creates an M by N binary ensemble
% operator. When choosing MODE = 0 an explicit binary matrix is
% formed and used when applying the operator. Choosing MODE = 1
% causes the operator to generate the above matrix on the... |
github | noureldien/RecommenderSystem-master | opBlockDiag.m | .m | RecommenderSystem-master/SVD/operators/opBlockDiag.m | 2,716 | utf_8 | 70270b7f225fd0c9cb0e5c11da3e9847 | function op = opBlockDiag(varargin)
% OPBLOCKDIAG Operator-diagonal operator
%
% OPBLOCKDIAG(WEIGHTS, OP1, OP2, ...) creates a compound
% operator with the given weighted operators on the diagonal;
% DIAG([WEIGHT1*OP1, WEIGHT2*OP2, ...]). The WEIGHT parameter is
% optional and can either be a scalar or a v... |
github | noureldien/RecommenderSystem-master | opMask.m | .m | RecommenderSystem-master/SVD/operators/opMask.m | 682 | utf_8 | 93df803bb947725c88911c6fa3758733 | function op = opMask(A)
% OPMASK Selection mask
%
% OPMASK(A) creates an operator that computes the dot-product of
% a given vector with the (binary) mask provided by A. If A is a
% matrix it will be vectorized prior to use.
%
% See also opColRestrict, opRestriction.
% Copyright 2008, Ewout van den Berg... |
github | noureldien/RecommenderSystem-master | opCurvelet2d.m | .m | RecommenderSystem-master/SVD/operators/opCurvelet2d.m | 2,655 | utf_8 | 6b97b36ed90390cff36851b788b1a76f | function op = opCurvelet2d(m,n,nbscales,nbangles,ttype)
% OPCURVELET2D Two-dimensional curvelet operator
%
% OPCURVELET2D(M,N,NBSCALES,NBANGLES,TTYPE) creates a
% two-dimensional curvelet operator for M by N matrices. The
% curvelet transform is computed using the Curvelab code.
%
% The remaining three par... |
github | noureldien/RecommenderSystem-master | opFFT2d.m | .m | RecommenderSystem-master/SVD/operators/opFFT2d.m | 744 | utf_8 | 7da54aa8f159fc5a9a57df7badd38d5f | function op = opFFT2d(m,n)
% OPFFT2D Two-dimensional fast Fourier transform (FFT)
%
% OPFFT2D(M,N) creates a two-dimensional normalized Fourier
% transform operator for matrices of size M by N. Input and
% output of the matrices is done in vectorized form.
% Copyright 2008, Ewout van den Berg and Michael P... |
github | noureldien/RecommenderSystem-master | opFFT2C.m | .m | RecommenderSystem-master/SVD/operators/opFFT2C.m | 861 | utf_8 | 2a565614203f12a63c7117c615ab685d | function op = opFFT2C(m,n)
% OPFFT2C Centralized two-dimensional fast Fourier transform (FFT).
%
% OPFFT2C(M,N) creates a two-dimensional normalized Fourier
% Transform that operates on matrices of size M by N. The
% components are shifted to have to zero-frequency component in
% the center of the spectrum... |
github | noureldien/RecommenderSystem-master | opFFT.m | .m | RecommenderSystem-master/SVD/operators/opFFT.m | 593 | utf_8 | 0b3ed7dd4a02f839b86a22d0e35385d6 | function op = opFFT(n)
% OPFFT One-dimensional fast Fourier transform (FFT).
%
% OPFFT(N) create a one-dimensional normalized Fourier transform
% operator for vectors of length N.
% Copyright 2008, Ewout van den Berg and Michael P. Friedlander
% http://www.cs.ubc.ca/labs/scl/sparco
% $Id: opFFT.m 1040 200... |
github | noureldien/RecommenderSystem-master | opTranspose.m | .m | RecommenderSystem-master/SVD/operators/opTranspose.m | 597 | utf_8 | 60d5299bf482eb5be88fe4223d57b1f8 | function op = opTranspose(op)
% OPTRANSPOSE Transpose operator
%
% OPTRANSPOSE(OP) creates an operator that is the the adjoint
% operator OP.
% Copyright 2008, Ewout van den Berg and Michael P. Friedlander
% http://www.cs.ubc.ca/labs/scl/sparco
% $Id: opTranspose.m 1040 2008-06-26 20:29:02Z ewout78 $
op... |
github | noureldien/RecommenderSystem-master | opConvolve1d.m | .m | RecommenderSystem-master/SVD/operators/opConvolve1d.m | 1,810 | utf_8 | a88935935265d87fcba2aa60fad60f18 | function op = opConvolve1d(kernel,offset,circular)
% OPCONVOLVE1D One-dimensional convolution operator
%
% OPCONVOLVE1D(KERNEL,OFFSET,CIRCULAR) creates a one-dimensional
% convolution operator with the KERNEL function. The length of
% the KERNEL vector must coincide with the signal length. OFFSET
% gives ... |
github | noureldien/RecommenderSystem-master | opSign.m | .m | RecommenderSystem-master/SVD/operators/opSign.m | 2,403 | utf_8 | a6d76068ce3be09b5688d612d1605f03 | function op = opSign(m,n,mode)
% OPSIGN Sign-ensemble operator.
%
% OPSIGN(M,N,MODE) creates an M by N sign-ensemble operator. By
% setting MODE a number of different types of ensemble can be
% generated; MODE = 0 (default) explicitly creates an
% unnormalized matrix with random +1 and -1 entries. MODE = ... |
github | noureldien/RecommenderSystem-master | opPadding.m | .m | RecommenderSystem-master/SVD/operators/opPadding.m | 1,292 | utf_8 | f712aaae48a021369dfd1aaf6012bbed | function op = opPadding(sizeLHS, sizeRHS)
% OPPADDING Padding operator
%
% OPPADDING(SIZELHS,SIZERHS) create an operator that pads and
% unpads matrices equally around each size. SIZELHS and SIZERHS
% give the matrix size before and after padding. SIZERHS must
% be greater than or equal to SIZELHS, and both m... |
github | noureldien/RecommenderSystem-master | opHeaviside.m | .m | RecommenderSystem-master/SVD/operators/opHeaviside.m | 1,076 | utf_8 | a94b727e1d81c4eefa740d9e25fd4398 | function op = opHeaviside(n,s)
% OPHEAVISIDE Heaviside operator
%
% OPHEAVISIDE(N,S) creates an operator for multiplication by an
% N by N Heaviside matrix. These matrices have ones below and on
% the diagonal and zeros elsewhere. S is a flag indicating
% whether the columns should be scaled to unit Euclid... |
github | noureldien/RecommenderSystem-master | opDirac.m | .m | RecommenderSystem-master/SVD/operators/opDirac.m | 476 | utf_8 | 6f348c2204c87842ee61ded2c2b530a2 | function op = opDirac(n)
% OPDIRAC Identity operator
%
% OPDIRAC(N) creates the identity operator for vectors of length
% N.
% Copyright 2008, Ewout van den Berg and Michael P. Friedlander
% http://www.cs.ubc.ca/labs/scl/sparco
% $Id: opDirac.m 1040 2008-06-26 20:29:02Z ewout78 $
op = @(x,mode) opDirac_... |
github | noureldien/RecommenderSystem-master | opRestriction.m | .m | RecommenderSystem-master/SVD/operators/opRestriction.m | 951 | utf_8 | f364aebade957b34ac2b4ca6fad701bd | function op = opRestriction(n,idx)
% OPRESTRICTION Restriction operator
%
% OPRESTRICTION(N,IDX) creates a restriction operator that
% selects the entries listed in IDX from an input vector of
% length N. The adjoint of the operator creates a vector of
% length N and fills the entries given by IDX with the ... |
github | noureldien/RecommenderSystem-master | opDiag.m | .m | RecommenderSystem-master/SVD/operators/opDiag.m | 799 | utf_8 | eb768912c06b1f57f6195ab19ef5d32d | function op = opDiag(n,d)
% OPDIAG Scaling operator (i.e., diagonal matrix).
%
% OPDIAG(N,D) creates an operator for N by N diagonal matrix
% multiplication. The diagonal is given by D which can be either
% a vector of length N or a scalar. OPDIAG(D) is a shortcut for
% OPDIAG(LENGTH(D),D) and can be used... |
github | noureldien/RecommenderSystem-master | opCrop.m | .m | RecommenderSystem-master/SVD/operators/opCrop.m | 2,591 | utf_8 | 19338b862fee0901854542dff684cc47 | function op = opCrop(opIn, m,n, mOffset, nOffset, scale)
% OPCROP Crop rectangular region from given operator
%
% OPCROP(OP,M,N,MOFFSET,NOFFSET,SCALE) creates an M by N
% operator that restricts OP to the M by N rectangular region
% starting at (zero-based) row MOFFSET and column
% NOFFSET. Parameter SCAL... |
github | noureldien/RecommenderSystem-master | opSplitComplex.m | .m | RecommenderSystem-master/SVD/operators/opSplitComplex.m | 770 | utf_8 | a76ca9745ee795dfdfcdc6c88f1bdeed | function op = opSplitComplex(n)
% OPSPLITCOMPLEX Complex to real and imaginary
%
% OPSPLITCOMPLEX(N) creates a nonlinear operator that splits a
% complex vector of length N into its real and imaginary parts
% [real(x); imag(x)]. In transpose mode it combines the real and
% imaginary parts into a complex ve... |
github | noureldien/RecommenderSystem-master | opMatrix.m | .m | RecommenderSystem-master/SVD/operators/opMatrix.m | 1,234 | utf_8 | 1d3e7478bd52eb07a97f017c9031573c | function op = opMatrix(A,opinfo)
% OPMATRIX Apply arbitrary matrix as operator.
%
% OPMATRIX(A,OPINFO) creates an operator that performs
% matrix-vector multiplication with matrix A. Optional parameter
% OPINFO can be used to override the default operator
% information returned when querying the operator, ... |
github | noureldien/RecommenderSystem-master | opDCT.m | .m | RecommenderSystem-master/SVD/operators/opDCT.m | 557 | utf_8 | f86b6bde3639b80d46b88c0dadd94b57 | function op = opDCT(n)
% OPDCT One-dimensional discrete cosine transform (DCT)
%
% OPDCT(N) creates a one-dimensional discrete cosine transform
% operator for vectors of length N.
% Copyright 2008, Ewout van den Berg and Michael P. Friedlander
% http://www.cs.ubc.ca/labs/scl/sparco
% $Id: opDCT.m 1040 200... |
github | noureldien/RecommenderSystem-master | opToepGauss.m | .m | RecommenderSystem-master/SVD/operators/opToepGauss.m | 3,101 | utf_8 | 186322e7781cd7aa1fe0344648a19452 | function [op,d] = opToepGauss(m,n,type,normalized)
%OPTOEPGAUSS Toeplitz matrix with Gaussian entries
%
% OP = OPTOEPGAUSS(M,N,TYPE,NORMALIZED) creates an M by N
% Toeplitz matrix with Gaussian entries. TYPE can either be
% 'toeplitz' or 'circular'. For the 'toeplitz' type matrix, m+n-1
% different generating ... |
github | noureldien/RecommenderSystem-master | opWavelet.m | .m | RecommenderSystem-master/SVD/operators/opWavelet.m | 2,020 | utf_8 | bff7e38c79303375960d69d1ff37f63c | function op = opWavelet(m,n, family, filter, levels, type)
% OPWAVELET Wavelet operator
%
% OPWAVELET(M,N,FAMILY,FILTER,LEVELS,TYPE) creates a wavelet
% operator of given FAMILY, for M by N matrices. The wavelet
% transformation is computed using the Rice Wavelet Toolbox.
%
% The remaining three parameters... |
github | noureldien/RecommenderSystem-master | opColumnRestrict.m | .m | RecommenderSystem-master/SVD/operators/opColumnRestrict.m | 1,763 | utf_8 | ad36e8a4a7339f6c555f1b05dc98f91d | function op = opColumnRestrict(m,n,idx,type)
% OPCOLUMNRESTRICT Restriction operator on matrix columns
%
% OPCOLUMNRESTRICT(M,N,IDX,TYPE), with TYPE = 'DISCARD', creates
% an operator that extracts the columns indicated by IDX from a
% given M by N matrix. The adjoint operator takes an M by
% length(IDX)... |
github | noureldien/RecommenderSystem-master | opStack.m | .m | RecommenderSystem-master/SVD/operators/opStack.m | 2,285 | utf_8 | d5519fb75633ce87b8cdb873eb84daf8 | function op = opStack(varargin)
% OPSTACK Stack of vertically concatenated operators
%
% OPSTACK(WEIGHTS, OP1, OP2, ...) creates a stacked operator
% consisting of the vertical concatenation of all operators;
%
% [WEIGHT1*OP1
% WEIGHT2*OP2
% ...
% ... |
github | noureldien/RecommenderSystem-master | prox_l1pos.m | .m | RecommenderSystem-master/TFOCS/prox_l1pos.m | 1,051 | utf_8 | df896aa5af4695a669eaa52d4b31eba5 | function op = prox_l1pos( q )
%PROX_L1POS L1 norm, restricted to x >= 0
% OP = PROX_L1( q ) implements the nonsmooth function
% OP(X) = norm(q.*X,1) + indicator_{ X >= 0 }
% Q is optional; if omitted, Q=1 is assumed. But if Q is supplied,
% then it must be a positive real scalar (or must be same size... |
github | noureldien/RecommenderSystem-master | proj_spectral.m | .m | RecommenderSystem-master/TFOCS/proj_spectral.m | 6,398 | utf_8 | a9810731c634c00c50d0dea5fae3c18f | function op = proj_spectral( q, SYM_FLAG, LARGESCALE )
%PROJ_SPECTRAL Projection onto the set of matrices with spectral norm less than or equal to q
% OP = PROJ_SPECTRAL( q ) returns a function that implements the
% indicator for matrices with spectral norm less than q.
% Q is optional; if omitted, Q=1 is ass... |
github | noureldien/RecommenderSystem-master | proj_max.m | .m | RecommenderSystem-master/TFOCS/proj_max.m | 1,090 | utf_8 | bb06f734ce25031a9d1b82026065d34f | function op = proj_max( q )
%PROJ_max Projection onto the scaled max-function ball.
% OP = PROJ_MAX( Q ) returns an operator implementing the
% indicator function for the max-function ball of size q,
% { X | max( X(:) ) <= q }. Q is optional; if omitted,
% Q=1 is assumed. But if Q is supplied, it must b... |
github | noureldien/RecommenderSystem-master | test_smooth.m | .m | RecommenderSystem-master/TFOCS/test_smooth.m | 3,337 | utf_8 | 861065b0f26a7201512e8a150eeb986d | function varargout = test_smooth( f, N, DOM )
% TEST_SMOOTH Runs diagnostic checks on a TFOCS smooth function object.
% TEST_SMOOTH( F )
% tests whether the function handle F works as a TFOCS smooth
% function object.
%
% Requirements: f = F(X) must return the value of the function at X.
% [f,g] = F(X) must... |
github | noureldien/RecommenderSystem-master | proj_Rplus.m | .m | RecommenderSystem-master/TFOCS/proj_Rplus.m | 1,778 | utf_8 | ac57767eee4c5f365d49c8c0054e034d | function op = proj_Rplus( scale )
%PROJ_RPLUS Projection onto the nonnegative orthant.
% OP = PROJ_RPLUS returns an implementation of the indicator
% function for the nonnegative orthant.
% OP2 = PROJ_RPLUS( scale ) returns the indicator function
% of the scaled nonnegative orthant: that is,
% O... |
github | noureldien/RecommenderSystem-master | solver_sDantzig.m | .m | RecommenderSystem-master/TFOCS/solver_sDantzig.m | 2,598 | utf_8 | de0863ea076769a99d0201edd61bd669 | function varargout = solver_sDantzig( A, b, delta, mu, x0, z0, opts, varargin )
% SOLVER_SDANTZIG Dantzig selector problem. Uses smoothing.
%[ x, out, opts ] = solver_sDantzig( A, b, delta, mu, x0, z0, opts )
% Solves the smoothed Dantzig
% minimize norm(x,1) + (1/2)*mu*norm(x-x0).^2
% s.t. norm(D.... |
github | noureldien/RecommenderSystem-master | solver_psdCompConstrainedTrace.m | .m | RecommenderSystem-master/TFOCS/solver_psdCompConstrainedTrace.m | 2,837 | utf_8 | 43123c345c00d73229fcc0463c37c710 | function [ x, out, opts ] = solver_psdCompConstrainedTrace( Xinc, tr, opts )
% SOLVER_PSDCOMPCONSTRAINEDTRACE Matrix completion with constrained trace, for PSD matrices.
% [ x, out, opts ] = solver_psdCompConstrainedTrace( Xinc, tr, opts )
% Solves the PSD matrix completion problem
% minimize (1/2)*norm(X(ij)... |
github | noureldien/RecommenderSystem-master | proj_nuclear.m | .m | RecommenderSystem-master/TFOCS/proj_nuclear.m | 1,837 | utf_8 | 8cc2bcfafd556f644d53885e378d223c | function op = proj_nuclear( q )
%PROJ_NUCLEAR Projection onto the set of matrices with nuclear norm less than or equal to q.
% OP = PROJ_NUCLEAR( q ) returns a function that implements the
% indicator for matrices with nuclear norm less than q.
% Q is optional; if omitted, Q=1 is assumed. But if Q is supplie... |
github | noureldien/RecommenderSystem-master | test_nonsmooth.m | .m | RecommenderSystem-master/TFOCS/test_nonsmooth.m | 5,791 | utf_8 | 03ae0b22bbfb8e44c31bac1ec5ccde62 | function varargout = test_nonsmooth( f, N, DOM )
% TEST_NONSMOOTH Runs diagnostic tests to ensure a non-smooth function conforms to TFOCS conventions
% TEST_NONSMOOTH( F )
% tests whether the function handle F works as a tfocs non-nonsmooth
% function object.
%
% Requirements:
% f = F(X) must return the va... |
github | noureldien/RecommenderSystem-master | prox_nuclear.m | .m | RecommenderSystem-master/TFOCS/prox_nuclear.m | 3,875 | utf_8 | b57cc252a7b2aac9ec9aee0cb2b1a43c | function op = prox_nuclear( q, LARGESCALE )
%PROX_NUCLEAR Nuclear norm.
% OP = PROX_NUCLEAR( q ) implements the nonsmooth function
% OP(X) = q * sum(svd(X)).
% Q is optional; if omitted, Q=1 is assumed. But if Q is supplied,
% it must be a positive real scalar.
%
% OP = PROX_NUCLEAR( q, LARGESCA... |
github | noureldien/RecommenderSystem-master | prox_maxEig.m | .m | RecommenderSystem-master/TFOCS/prox_maxEig.m | 2,116 | utf_8 | 7c0d3f03ba4dd04ed8b83a9828e821eb | function op = prox_maxEig( q )
%PROX_MAXEIG Maximum eigenvalue of a real symmetric matrix
% OP = PROX_MAXEIG( q ) implements the nonsmooth function
% OP(X) = q * max(eig(X)).
% Q is optional; if omitted, Q=1 is assumed. But if Q is supplied,
% it must be a real scalar.
%
% Note: if X is positive sem... |
github | noureldien/RecommenderSystem-master | linop_adjoint.m | .m | RecommenderSystem-master/TFOCS/linop_adjoint.m | 663 | utf_8 | 122e81c2b2d4427b977c30150aff8aa6 | function op = linop_adjoint( A )
%LINOP_ADJOINT Computes the adjoint operator of a TFOCS linear operator
%op = LINOP_ADJOINT( A )
% Returns a function handle to a linear operator that is the adjoint of
% the operator supplied.
op = @(y,mode)linop_adjoint_impl( A, y, mode );
function y = linop_adjoint_impl( A, x... |
github | noureldien/RecommenderSystem-master | prox_l1.m | .m | RecommenderSystem-master/TFOCS/prox_l1.m | 1,671 | utf_8 | b3bb09432df91c0d4dc48669d796af36 | function op = prox_l1( q )
%PROX_L1 L1 norm.
% OP = PROX_L1( q ) implements the nonsmooth function
% OP(X) = norm(q.*X,1).
% Q is optional; if omitted, Q=1 is assumed. But if Q is supplied,
% then it must be a positive real scalar (or must be same size as X).
% Dual: proj_linf.m
% Update Feb 2011, ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.