annotate DL/Majorization Minimization DL/AudioDicoLearning/DLMM_Audio.m @ 163:855025f4c779 ivand_dev

renaiming small_cgp to small_pcgp
author Ivan Damnjanovic lnx <ivan.damnjanovic@eecs.qmul.ac.uk>
date Wed, 07 Sep 2011 14:16:50 +0100
parents b14209313ba4
children
rev   line source
ivan@155 1 function [] = DLMM_Audio(m,n,l,it,Lambda,admiss)
ivan@155 2 M = str2num(m);
ivan@155 3 N = str2num(n);
ivan@155 4 L = str2num(l);
ivan@155 5 IT = str2num(it);
ivan@155 6 lambda = str2num(Lambda);
ivan@155 7 load(['Param',num2str(M),'X',num2str(N),'X',num2str(L),'kADCT2X01.mat'])
ivan@155 8 method = ['bn';'un'];
ivan@155 9 res = 1;
ivan@155 10 while method(res)~=admiss
ivan@155 11 res = res+1;
ivan@155 12 end
ivan@155 13 [PhiN,PhiM] = size(Phio);
ivan@155 14 Phi = randn(M,N);
ivan@155 15 Phi = Phi*diag(1./sqrt(sum(Phi.^2)));
ivan@155 16 [PhiN,L] = size(x);
ivan@155 17 phim = PhiM;
ivan@155 18 unhat = zeros(PhiM,L);
ivan@155 19 maxIST = 10;
ivan@155 20 maxIDU = 10;
ivan@155 21 it = 1;
ivan@155 22 ert(1) = norm(Phi*unhat-x,'fro')^2 + lambda*(sum(sum(abs(unhat))));
ivan@155 23 while it <= IT
ivan@155 24 it
ivan@155 25 % %%%%%% Iterative Soft-Thresholding for Sparse Approximation %%%%%
ivan@155 26 tau2 = .1+(svds(Phi,1))^2;
ivan@155 27 eps = 3*10^-4;
ivan@155 28 map = 0; % Projecting on the selected space (0=no,1=yes)
ivan@155 29 [unhat,er] = mm1(Phi,x,unhat,tau2,lambda,maxIST,eps,map);
ivan@155 30 er
ivan@155 31 %%%%%% Majorisation Minimisation for Dictionary Update %%%%%%
ivan@155 32 c = .1 + svds(unhat,1)^2;
ivan@155 33 eps = 10^-7;
ivan@155 34 [Phi,unhat] = dict_update_REG_cn(Phi,x,unhat,maxIDU,eps,'un');
ivan@155 35 %%%%%
ivan@155 36 ert(it+1) = norm(Phi*unhat-x,'fro')^2 + lambda*(sum(sum(abs(unhat))));
ivan@155 37 it = it+1;
ivan@155 38 end
ivan@155 39 save(['DLMMl1',num2str(PhiN),'X',num2str(PhiM),'X',num2str(L),'iK',method(res,:),'Lambda',num2str(lambda),'Audio.mat'],'Phi','x','unhat','ert','lambda')