comparison 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
comparison
equal deleted inserted replaced
-1:000000000000 0:e9a9cd732c1e
1 function display(c)
2
3 % CLASSIFY/DISPLAY display of classification
4
5 disp('Classification results:')
6 c.classes
7
8 if isnan(c.correct)
9 disp('No label has been associated to the test set. Correct classification rate cannot be computed.');
10 else
11 disp(['Correct classification rate: ',num2str(c.correct)]);
12 end
13
14 %disp(['Number of observations: ',num2str(c.nbobs)])
15 %disp(['Number of free parameters: ',num2str(c.nbparam)])
16
17 %disp('Posterior probability:')
18 %c.post{:}
19
20 if 0
21 figure
22 hold on
23 vt = c.training;
24 lt = c.labtraining;
25 va = c.test;
26 la = c.labtest;
27 for i = 1:size(vt,2)
28 scatter3(vt(1,i),vt(2,i),vt(3,i),'k+','SizeData',2);
29 text(vt(1,i),vt(2,i),vt(3,i),lt{i},'Color','k');
30 end
31 for i = 1:size(va,2)
32 scatter3(va(1,:),va(2,:),va(3,:),'r+','SizeData',2);
33 text(va(1,i),va(2,i),va(3,i),la{i},'Color','r');
34 end
35 xlabel('1')
36 ylabel('2')
37 zlabel('3')
38 rotate3d
39 end