comparison DL/Majorization Minimization DL/ExactDicoRecovery/dict_update_MAP_cn.m @ 164:4205744092e6 release_1.9

Merge from branch "ivand_dev"
author Ivan Damnjanovic lnx <ivan.damnjanovic@eecs.qmul.ac.uk>
date Wed, 07 Sep 2011 14:17:30 +0100
parents b14209313ba4
children
comparison
equal deleted inserted replaced
151:af5abc34a5e1 164:4205744092e6
1 function [Phiout,unhatnz] = dict_update_MAP_cn(Phi,x,unhat,mu,maxIT,eps,cvset)
2 %% Maximum A Posteriori Dictionary Update with the constraint on the column norms %%%%%
3
4
5
6 %%
7
8 K = Phi;
9 B = zeros(size(Phi,1),size(Phi,2));
10 i = 1;
11 %%
12 while (sum(sum((B-K).^2))>eps)&&(i<=maxIT)
13 B = K;
14 for j = 1:size(K,2),
15 K(:,j) = K(:,j) - mu*(eye(size(K,1))-K(:,j)*K(:,j)')*(K*unhat-x)*unhat(j,:)';
16 end
17 i = i+1;
18 end
19
20 %% depleted atoms cancellation %%%
21
22 [Y,I] = sort(sum(K.^2),'descend');
23 RR = sum(Y>=.01);
24 Phiout = K(:,I(1:RR));
25 unhatnz = unhat(I(1:RR),:);
26
27 end