Main Content

Compute confusion matrix for classification problem

uses `C`

= confusionmat(`group`

,`grouphat`

,`'Order'`

,`grouporder`

)`grouporder`

to order the rows and columns of `C`

.

Use

`confusionchart`

to calculate and plot a confusion matrix. Additionally,`confusionchart`

displays summary statistics about your data and sorts the classes of the confusion matrix according to the class-wise precision (positive predictive value), class-wise recall (true positive rate), or total number of correctly classified observations.