comparison DL/Majorization Minimization DL/AudioDicoLearning/DLMM_Audio.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 [] = DLMM_Audio(m,n,l,it,Lambda,admiss)
2 M = str2num(m);
3 N = str2num(n);
4 L = str2num(l);
5 IT = str2num(it);
6 lambda = str2num(Lambda);
7 load(['Param',num2str(M),'X',num2str(N),'X',num2str(L),'kADCT2X01.mat'])
8 method = ['bn';'un'];
9 res = 1;
10 while method(res)~=admiss
11 res = res+1;
12 end
13 [PhiN,PhiM] = size(Phio);
14 Phi = randn(M,N);
15 Phi = Phi*diag(1./sqrt(sum(Phi.^2)));
16 [PhiN,L] = size(x);
17 phim = PhiM;
18 unhat = zeros(PhiM,L);
19 maxIST = 10;
20 maxIDU = 10;
21 it = 1;
22 ert(1) = norm(Phi*unhat-x,'fro')^2 + lambda*(sum(sum(abs(unhat))));
23 while it <= IT
24 it
25 % %%%%%% Iterative Soft-Thresholding for Sparse Approximation %%%%%
26 tau2 = .1+(svds(Phi,1))^2;
27 eps = 3*10^-4;
28 map = 0; % Projecting on the selected space (0=no,1=yes)
29 [unhat,er] = mm1(Phi,x,unhat,tau2,lambda,maxIST,eps,map);
30 er
31 %%%%%% Majorisation Minimisation for Dictionary Update %%%%%%
32 c = .1 + svds(unhat,1)^2;
33 eps = 10^-7;
34 [Phi,unhat] = dict_update_REG_cn(Phi,x,unhat,maxIDU,eps,'un');
35 %%%%%
36 ert(it+1) = norm(Phi*unhat-x,'fro')^2 + lambda*(sum(sum(abs(unhat))));
37 it = it+1;
38 end
39 save(['DLMMl1',num2str(PhiN),'X',num2str(PhiM),'X',num2str(L),'iK',method(res,:),'Lambda',num2str(lambda),'Audio.mat'],'Phi','x','unhat','ert','lambda')