perClass Documentation
version 5.4 (7-Dec-2018)
 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: