Mercurial > hg > smallbox
comparison DL/Majorization Minimization DL/ExactDicoRecovery/mmdlcn_exactRec_demo.m @ 155:b14209313ba4 ivand_dev
Integration of Majorization Minimisation Dictionary Learning
author | Ivan Damnjanovic lnx <ivan.damnjanovic@eecs.qmul.ac.uk> |
---|---|
date | Mon, 22 Aug 2011 11:46:35 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
154:0de08f68256b | 155:b14209313ba4 |
---|---|
1 function mmdlcn_exactRec_demo(it,k,sn,cs) | |
2 tic | |
3 IT = it; | |
4 K = k; | |
5 SN = sn; | |
6 if SN<10, | |
7 samnum = ['0',num2str(SN)]; | |
8 else | |
9 samnum = num2str(SN); | |
10 end | |
11 load(['Param',num2str(K),'kS',samnum,'.mat']) | |
12 lambda = 2*.2; % 2 * Smallest coefficients (Soft Thresholding) | |
13 if cs == 'bn' | |
14 res = 1; | |
15 elseif cs == 'un' | |
16 res = 2; | |
17 else | |
18 disp('Undefined dictionary admissible set.') | |
19 end | |
20 method = ['bn';'un']; | |
21 res = 2; % 1 for bounded-norm, 2 for unit-norm | |
22 %%%%%%%%%%%%%% | |
23 Phi = Phio; | |
24 M = size(Phi,1); | |
25 [Phi,unhat,ert] = mmdl_cn(x,Phi,lambda,IT,res); | |
26 | |
27 save(['RDLl1',num2str(M),'t',num2str(IT),'iki',method(res,:),num2str(K),'v1d',num2str(SN),'.mat'],'Phi','Phid','x','ud','unhat','ert') | |
28 | |
29 toc |