comparison DL/Majorization Minimization DL/ExactDicoRecovery/dict_update_MOD_cn.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 [Phiout,unhatnz] = dict_update_MOD_cn(x,unhat,cvset)
2 %% Method of Optimized Direction (MOD) Dictionary Update followed by the
3 %% constraint on the column norms %%
4
5 %%
6 eps = .01;
7 K = x*unhat'*inv(unhat*unhat'+eps*eye(size(unhat,1)));
8 if cvset == 1,
9 K = K*diag(min(sum(K.^2).^(-.5),1)); % Projecting on the convex constraint set
10 else
11 K = K*diag(sum(K.^2).^(-.5)); % Projecting on the Unit-Norm constraint set
12 end
13
14 %% depleted atoms cancellation %%%
15 [Y,I] = sort(sum(K.^2),'descend');
16 RR = sum(Y>=.01);
17 Phiout = K(:,I(1:RR));
18 unhatnz = unhat(I(1:RR),:);
19
20 end