annotate toolboxes/MIRtoolbox1.3.2/MIRToolbox/@mirclassify/display.m @ 0:e9a9cd732c1e tip

first hg version after svn
author wolffd
date Tue, 10 Feb 2015 15:05:51 +0000
parents
children
rev   line source
wolffd@0 1 function display(c)
wolffd@0 2
wolffd@0 3 % CLASSIFY/DISPLAY display of classification
wolffd@0 4
wolffd@0 5 disp('Classification results:')
wolffd@0 6 c.classes
wolffd@0 7
wolffd@0 8 if isnan(c.correct)
wolffd@0 9 disp('No label has been associated to the test set. Correct classification rate cannot be computed.');
wolffd@0 10 else
wolffd@0 11 disp(['Correct classification rate: ',num2str(c.correct)]);
wolffd@0 12 end
wolffd@0 13
wolffd@0 14 %disp(['Number of observations: ',num2str(c.nbobs)])
wolffd@0 15 %disp(['Number of free parameters: ',num2str(c.nbparam)])
wolffd@0 16
wolffd@0 17 %disp('Posterior probability:')
wolffd@0 18 %c.post{:}
wolffd@0 19
wolffd@0 20 if 0
wolffd@0 21 figure
wolffd@0 22 hold on
wolffd@0 23 vt = c.training;
wolffd@0 24 lt = c.labtraining;
wolffd@0 25 va = c.test;
wolffd@0 26 la = c.labtest;
wolffd@0 27 for i = 1:size(vt,2)
wolffd@0 28 scatter3(vt(1,i),vt(2,i),vt(3,i),'k+','SizeData',2);
wolffd@0 29 text(vt(1,i),vt(2,i),vt(3,i),lt{i},'Color','k');
wolffd@0 30 end
wolffd@0 31 for i = 1:size(va,2)
wolffd@0 32 scatter3(va(1,:),va(2,:),va(3,:),'r+','SizeData',2);
wolffd@0 33 text(va(1,i),va(2,i),va(3,i),la{i},'Color','r');
wolffd@0 34 end
wolffd@0 35 xlabel('1')
wolffd@0 36 ylabel('2')
wolffd@0 37 zlabel('3')
wolffd@0 38 rotate3d
wolffd@0 39 end