diff examples/SMALL_test_coherence.m @ 167:8324c7ea6602 danieleb

Added symmetric de-correlation function, modified target de-correlation in test function.
author Daniele Barchiesi <daniele.barchiesi@eecs.qmul.ac.uk>
date Tue, 20 Sep 2011 14:27:14 +0100
parents a4d0977d4595
children 290cca7d3469
line wrap: on
line diff
--- a/examples/SMALL_test_coherence.m	Mon Sep 19 14:53:23 2011 +0100
+++ b/examples/SMALL_test_coherence.m	Tue Sep 20 14:27:14 2011 +0100
@@ -18,7 +18,8 @@
 % Dependent parameters
 nActiveAtoms = fix(blockSize/100*percActiveAtoms); %number of active atoms
 epsilon      = 1/sigma; %error constraint for sparse representation step (corresponds to noise applied to signals)
-minCoherence = sqrt((dictSize-blockSize)/(blockSize*(dictSize-1))); %target coherence (based on coherence lower bound)
+%minCoherence = sqrt((dictSize-blockSize)/(blockSize*(dictSize-1))); %target coherence (based on coherence lower bound)
+minCoherence = 0.4;		%target coherence
 
 % Initial dictionaries
 dctDict = dictionary('dct',blockSize,dictSize);
@@ -167,28 +168,28 @@
 minMu = sqrt((dictSize-blockSize)/(blockSize*(dictSize-1)));
 maxSNR = max(sigNoiseRatio);
 
-figure, subplot(2,2,1)
+figure, subplot(1,2,1)
 snrMat = buffer(sigNoiseRatio(1:9),3);
 bar(snrMat');
-title('SNR - KSVD Update')
+title('Signal to noise ratio')
 xlabel('Initial dictionary')
 ylabel('SNR (dB)')
-set(gca,'XTickLabel',{'data','dct','gabor'},'YLim',[0 maxSNR+1]);
+set(gca,'XTickLabel',{'data','dct','gabor'});
 legend('none','Mailhe','Tropp')
 grid on
 
-subplot(2,2,2), grid on
-snrMat = buffer(sigNoiseRatio(10:18),3);
-bar(snrMat');
-title('SNR - Mailhe Update')
-xlabel('Initial dictionary')
-ylabel('SNR (dB)')
-set(gca,'XTickLabel',{'data','dct','gabor'},'YLim',[0 maxSNR+1]);
-legend('none','Mailhe','Tropp')
-grid on
+% subplot(2,2,2), grid on
+% snrMat = buffer(sigNoiseRatio(10:18),3);
+% bar(snrMat');
+% title('SNR - Mailhe Update')
+% xlabel('Initial dictionary')
+% ylabel('SNR (dB)')
+% set(gca,'XTickLabel',{'data','dct','gabor'},'YLim',[0 maxSNR+1]);
+% legend('none','Mailhe','Tropp')
+% grid on
 
-subplot(2,2,3), hold on, grid on
-title('Coherence - KSVD Update')
+subplot(1,2,2), hold on, grid on
+title('Coherence')
 muMat = buffer(mu(1:9),3);
 line([0.5 3.5],[1 1],'Color','r');
 bar(muMat');
@@ -198,13 +199,13 @@
 ylabel('\mu')
 xlabel('Initial dictionary')
 
-subplot(2,2,4), hold on, grid on
-title('Coherence - Mailhe Update')
-muMat = buffer(mu(10:18),3);
-line([0.5 3.5],[1 1],'Color','r');
-bar(muMat');
-line([0.5 3.5],[minMu minMu],'Color','k');
-set(gca,'XTick',1:3,'XTickLabel',{'data','dct','gabor'},'YLim',[0 1.05])
-legend('\mu_{max}','none','Mailhe','Tropp','\mu_{min}')
-ylabel('\mu')
-xlabel('Initial dictionary')
+% subplot(2,2,4), hold on, grid on
+% title('Coherence - Mailhe Update')
+% muMat = buffer(mu(10:18),3);
+% line([0.5 3.5],[1 1],'Color','r');
+% bar(muMat');
+% line([0.5 3.5],[minMu minMu],'Color','k');
+% set(gca,'XTick',1:3,'XTickLabel',{'data','dct','gabor'},'YLim',[0 1.05])
+% legend('\mu_{max}','none','Mailhe','Tropp','\mu_{min}')
+% ylabel('\mu')
+% xlabel('Initial dictionary')