Mercurial > hg > smallbox
view DL/Majorization Minimization DL/ExactDicoRecovery/dict_update_KSVD_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 |
line wrap: on
line source
function[Phiout,unhatnz] = dict_update_KSVD_cn(Phi,x,unhat) %% K-SVD Dictionary Learning with the constraint on the column norms %%%%% %% unhatn = unhat; rPerm = randperm(size(Phi,2)); %% for l = 1:size(Phi,2), for l = rPerm unhatns = unhat; unhatns(l,:) = zeros(1,size(unhat,2)); E = x-Phi*unhatns; ER = E(:,(abs(unhat(l,:))>0)); [U,S,V] = svd(ER,0); Phi(:,l) = U(:,1) unhatn(l,:) = zeros(1,size(unhat,2)); unhatn(l,(abs(unhat(l,:))>0)) = S(1,1)*V(:,1); unhat = unhatn; end %% unhatnz = unhat; Phiout = Phi; end