diff DL/Majorization Minimization DL/ExactDicoRecovery/mapcn_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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/DL/Majorization Minimization DL/ExactDicoRecovery/mapcn_exactRec_demo.m	Mon Aug 22 11:46:35 2011 +0100
@@ -0,0 +1,29 @@
+function mapcn_exactRec_demo(it,k,sn,cs)
+tic
+IT = it;
+K = k;
+SN = sn;
+if SN<10,
+    samnum = ['0',num2str(SN)];
+else
+    samnum = num2str(SN);
+end
+load(['Param',num2str(K),'kS',samnum,'.mat'])
+lambda = 2*.2; % 2 * Smallest coefficients (Soft Thresholding)
+if cs == 'bn'
+    res = 1;
+elseif cs == 'un'
+    res = 2;
+else
+    disp('Undefined dictionary admissible set.')
+end
+method = ['bn';'un'];
+res = 2; % 1 for bounded-norm, 2 for unit-norm
+%%%%%%%%%%%%%%
+Phi = Phio;
+M = size(Phi,1);
+[Phi,unhat,ert] = mapdl_cn(x,Phi,lambda,IT,res);
+
+save(['MAPl1',num2str(M),'t',num2str(IT),'iki',method(res,:),num2str(K),'v1d',num2str(SN),'.mat'],'Phi','Phid','x','ud','unhat','ert')
+
+toc