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