diff util/SMALL_learn.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 485747bf39e0
children 7426503fc4d1 75b5dedcfd45 759313488e7b
line wrap: on
line diff
--- a/util/SMALL_learn.m	Fri Aug 12 11:17:47 2011 +0100
+++ b/util/SMALL_learn.m	Mon Aug 22 11:46:35 2011 +0100
@@ -69,7 +69,20 @@
     for i = 1: size(DL.D,2)
         DL.D(:,i)=DL.D(:,i)/norm(DL.D(:,i));
     end
+    D = DL.D;
+    
+elseif strcmpi(DL.toolbox,'MMbox')
+        
+    DL = wrapper_mm_DL(Problem, DL);
+    
+    %   we need to make sure that columns are normalised to
+    %   unit lenght.
+    
+    for i = 1: size(DL.D,2)
+        DL.D(:,i)=DL.D(:,i)/norm(DL.D(:,i));
+    end
     D = DL.D; 
+    
 %   To introduce new dictionary learning technique put the files in
 %   your Matlab path. Next, unique name <TolboxID> for your toolbox needs 
 %   to be defined and also prefferd API for toolbox functions <Preffered_API>