Mercurial > hg > smallbox
changeset 183:0d7a81655ef2 danieleb
removed cumulative coherence calculation
author | Daniele Barchiesi <daniele.barchiesi@eecs.qmul.ac.uk> |
---|---|
date | Fri, 27 Jan 2012 13:15:11 +0000 |
parents | f8bc99a5470c |
children | 8fc38e8df8c6 |
files | examples/SMALL_test_coherence2.m |
diffstat | 1 files changed, 15 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/examples/SMALL_test_coherence2.m Mon Jan 09 12:58:00 2012 +0000 +++ b/examples/SMALL_test_coherence2.m Fri Jan 27 13:15:11 2012 +0000 @@ -1,3 +1,7 @@ +% +% +% + clc, clear, close all %% Parameteres @@ -71,7 +75,8 @@ %% Evaluate coherence and snr of representation for the various methods sr = zeros(size(SMALL.DL)); %signal to noise ratio -mu = zeros(nTrials,nInitDicts,nCorrLevels,nDecorrAlgs,blockSize); %cumulative coherence +mu1 = zeros(nTrials,nInitDicts,nCorrLevels,nDecorrAlgs,blockSize); %cumulative coherence +mu2 = zeros(nTrials,nInitDicts,nCorrLevels,nDecorrAlgs,blockSize); %cumulative coherence dic(size(SMALL.DL)) = dictionary; %initialise dictionary objects for iTrial=1:nTrials for iInitDicts=1:nInitDicts @@ -86,8 +91,10 @@ %calculate mu dic(iTrial,iInitDicts,iCorrLevels,iDecorrAlgs) = ... dictionary(SMALL.DL(iTrial,iInitDicts,iCorrLevels,iDecorrAlgs).D); - mu(iTrial,iInitDicts,iCorrLevels,iDecorrAlgs,:) = ... + mu1(iTrial,iInitDicts,iCorrLevels,iDecorrAlgs,:) = ... dic(iTrial,iInitDicts,iCorrLevels,iDecorrAlgs).cumcoherence; + mu2(iTrial,iInitDicts,iCorrLevels,iDecorrAlgs,:) = ... + dic(iTrial,iInitDicts,iCorrLevels,iDecorrAlgs).cumcoherence(2); end end end @@ -96,13 +103,13 @@ %% Plot results minMu = sqrt((dictSize-blockSize)/(blockSize*(dictSize-1))); %lowe bound on coherence initDictsNames = {'Data','Gabor'}; -dicDecorrNames = {'IPR','INK-SVD','IP'}; +dicDecorrNames = {'IPR','INK-SVD'}; lineStyles = {'k.-','r*-','b+-'}; for iInitDict=1:nInitDicts figure, hold on, grid on title([initDictsNames{iInitDict} ' Initialisation']); plot([1 1],[0 25],'k-'); - for iDecorrAlgs=1:nDecorrAlgs + for iDecorrAlgs=1:nDecorrAlgs-1 coherenceLevels = squeeze(mean(mu(:,iInitDict,:,iDecorrAlgs,1),1)); meanSNRs = squeeze(mean(sr(:,iInitDict,:,iDecorrAlgs),1)); stdSNRs = squeeze(std(sr(:,iInitDict,:,iDecorrAlgs),0,1)); @@ -115,3 +122,7 @@ xlabel('\mu'); ylabel('SNR (dB)'); end + +%% +mu2 = squeeze(mean(mu2,1)); +mu = squeeze(mean(mu,1));