annotate DL/Majorization Minimization DL/ExactDicoRecovery/mod_exactRec.m @ 195:d50f5bdbe14c luisf_dev

- Added SMALL_DL_test: simple DL showcase - Added dico_decorr_symmetric: improved version of INK-SVD decorrelation step - Debugged SMALL_learn, SMALLBoxInit and SMALL_two_step_DL
author Daniele Barchiesi <daniele.barchiesi@eecs.qmul.ac.uk>
date Wed, 14 Mar 2012 14:42:52 +0000
parents b14209313ba4
children
rev   line source
ivan@155 1 %%% MOD (||ki||<=1) %%%%
ivan@155 2 function mod_exactRec(it,k,sn)
ivan@155 3 tic
ivan@155 4 IT = str2num(it);
ivan@155 5 K = str2num(k);
ivan@155 6 SN = str2num(sn);
ivan@155 7 if SN<10,
ivan@155 8 samnum = ['0',num2str(SN)];
ivan@155 9 else
ivan@155 10 samnum = num2str(SN);
ivan@155 11 end
ivan@155 12 load(['Param',num2str(K),'kS',samnum,'.mat'])
ivan@155 13 method = ['bn';'un'];
ivan@155 14 res = 2; % 1 for bounded-norm, 2 for unit-norm
ivan@155 15 lambda = 2*.2; % 2 * Smallest coefficients (Soft Thresholding)
ivan@155 16 % lambda = 2*.2^2; % 2 * Smallest coefficients (Hard Thresholding)
ivan@155 17 %%%%%%%%%%%%%%
ivan@155 18 Phi = Phio;
ivan@155 19 [PhiN,PhiM] = size(Phi);
ivan@155 20 RR1 = PhiM;
ivan@155 21 %%%%%%%%%%%%%%
ivan@155 22 [PhiM,L] = size(ud);
ivan@155 23 unhat = ones(PhiM,L);
ivan@155 24 for it = 1:IT
ivan@155 25 it
ivan@155 26 to = .1+svds(Phi,1);
ivan@155 27 [PhiN,PhiM] = size(Phi);
ivan@155 28 %%%%
ivan@155 29 % eps = 10^-7;
ivan@155 30 eps = 3*10^-4;
ivan@155 31 maxIT = 1000;
ivan@155 32 map = 0;
ivan@155 33 [unhat,l1err] = mm1(Phi,x,unhat,to,lambda,maxIT,eps,map); %% Sparse approximation with Iterative Soft-thresholding
ivan@155 34 ert(it) = l1err;
ivan@155 35 %%%
ivan@155 36 [Phi,unhat] = modcn(x,unhat,res);
ivan@155 37 end
ivan@155 38 save(['MODl120t',num2str(IT),'iki',method(res,:),num2str(K),'v2d',num2str(SN),'.mat'],'Phi','Phid','x','ud','unhat','ert')
ivan@155 39 toc