SDCONFMAT Confusion matrix estimation and visualization SDCONFMAT(LAB,DEC) CM=SDCONFMAT(LAB,DEC,options) SDCONFMAT(R) % Interactive confmat from ROC object INPUT LAB SDLAB object with true labels DEC SDLAB object with classifier decisions R SDROC object OUTPUT CM Confusion matrix (double) OPTIONS 'norm' - normalize the confusion matrix 'full' - create a square confusion matrix using all possible classifier decisions (performances on diagonal). 'classes',CLASSLL - use only classes in CLASSLL (SDLIST,string array or cellstr) 'decisions',DECLL - use only decisions in DECLL (SDLIST,string array or cellstr) 'string' - return string with confusion matrix (for report generation) 'no header' - return string without header lines 'replace',MAP - replace string content of confusion matrix. MAP is a cell array with input and output rules (inputs can be regular expressions) 'figure',F - display confusion matrix in a figure (if F is given, use figure F) 'row label',S - set string S as row label in figure (def:'True labels') 'collumn label',S - set string S as a column label in figure (def:'Decisions') 'fontsize',N - set fontsize in the figure (def:12); EXAMPLES Specify rows and columns that appear even if one of the classes is missing: >> sdconfmat(a.lab,dec,'classes',{'apple','banana'},'decisions',{'apple','banana'}) Show confusion matrix in a figure: >> sdconfmat(a.lab,dec,'figure') Replacing enpty fields in normalized matrix with dashes: >> sdconfmat(a.lab,a*pd,'norm','replace',{'0.000',' - '}) READ MORE http://perclass.com/doc/guide/evaluation.html#confmat
sdconfmat
is referenced in examples:
- kb33: Tagging unsure decisions
- kb32: Speeding up classifier execution by joining pipeline steps
- kb28: Example on building a classifier on database records
- kb26: Useful tips for confusion matrices
- kb24: Example on building an image detector
- kb23: Example on image classification
- kb18: How to protect a trained discriminant against outliers?
- kb17: How to optimize three-class classifier in imbalanced problems
- kb13: How to find samples with a specific type of error in a confusion matrix?
- kb12: Detector classifier cascade with ROC analysis
- kb8: How to build a detector in a single line of code?