wolffd@0: function display(c) wolffd@0: wolffd@0: % CLASSIFY/DISPLAY display of classification wolffd@0: wolffd@0: disp('Classification results:') wolffd@0: c.classes wolffd@0: wolffd@0: if isnan(c.correct) wolffd@0: disp('No label has been associated to the test set. Correct classification rate cannot be computed.'); wolffd@0: else wolffd@0: disp(['Correct classification rate: ',num2str(c.correct)]); wolffd@0: end wolffd@0: wolffd@0: %disp(['Number of observations: ',num2str(c.nbobs)]) wolffd@0: %disp(['Number of free parameters: ',num2str(c.nbparam)]) wolffd@0: wolffd@0: %disp('Posterior probability:') wolffd@0: %c.post{:} wolffd@0: wolffd@0: if 0 wolffd@0: figure wolffd@0: hold on wolffd@0: vt = c.training; wolffd@0: lt = c.labtraining; wolffd@0: va = c.test; wolffd@0: la = c.labtest; wolffd@0: for i = 1:size(vt,2) wolffd@0: scatter3(vt(1,i),vt(2,i),vt(3,i),'k+','SizeData',2); wolffd@0: text(vt(1,i),vt(2,i),vt(3,i),lt{i},'Color','k'); wolffd@0: end wolffd@0: for i = 1:size(va,2) wolffd@0: scatter3(va(1,:),va(2,:),va(3,:),'r+','SizeData',2); wolffd@0: text(va(1,i),va(2,i),va(3,i),la{i},'Color','r'); wolffd@0: end wolffd@0: xlabel('1') wolffd@0: ylabel('2') wolffd@0: zlabel('3') wolffd@0: rotate3d wolffd@0: end