Mercurial > hg > smallbox
diff util/classes/dictionaryMatrices/grassmannian.m @ 170:68fb71aa5339 danieleb
Added dictionary decorrelation functions and test script for Letters paper.
author | Daniele Barchiesi <daniele.barchiesi@eecs.qmul.ac.uk> |
---|---|
date | Thu, 06 Oct 2011 14:33:41 +0100 |
parents | 290cca7d3469 |
children |
line wrap: on
line diff
--- a/util/classes/dictionaryMatrices/grassmannian.m Thu Sep 29 09:46:52 2011 +0100 +++ b/util/classes/dictionaryMatrices/grassmannian.m Thu Oct 06 14:33:41 2011 +0100 @@ -12,7 +12,7 @@ if ~exist('verb','var') || isempty(verb), verb = false; end %verbose output if ~exist('initA','var') || isempty(initA), initA = randn(n,m); end %initial matrix -if ~exist('dd2','var') || isempty(dd2), dd2 = 0.99; end %shrinking factor +if ~exist('dd2','var') || isempty(dd2), dd2 = 0.9; end %shrinking factor if ~exist('dd1','var') || isempty(dd1), dd1 = 0.9; end %percentage of coherences to be shrinked if ~exist('nIter','var') || isempty(nIter), nIter = 10; end %number of iterations @@ -42,19 +42,6 @@ end end -% [~, Sigma_gram V_gram] = svd(G); %calculate svd decomposition of gramian - -% A = normc(A); %normalise dictionary - [V_gram Sigma_gram] = svd(G); %calculate svd decomposition of gramian Sigma_new = sqrt(Sigma_gram(1:n,:)).*sign(Sigma); %calculate singular values of dictionary A = Uinit*Sigma_new*V_gram'; %update dictionary - -% param.step = 0.01; -% param.reg = 0.01; -% param.nIter = 20; -% A = rotatematrix(initA,A,'linesearchlie',param); - -% %% Debug visualization function -% function plotcart2d(A) -% compass(A(1,:),A(2,:));