This code is an alternative to the MATLAB functions plotconfusion
and confusionchart
.
[ConfMat,Accuracy] = CmapConfusionMatrix(Actual_Labels,Predicted_Labels,Cmap);
ConfMat
: Confusion MatrixAccuracy
: Accuracy of ClassificationActual_Labels
: True LabelsPredicted_Labels
: Output LabelsCmap
: Colormap StyleColormap Name
: Select from the table below
If no Cmap
argument is provided, a popup window will appear asking you to select one of the listed colormaps, and if you ignore this step or try to choose default colormap, default option will be selected automatically.(like the below)
Colormap Name | Color Scale |
---|---|
parula |
|
turbo |
|
hsv |
|
hot |
|
cool |
|
spring |
|
summer |
|
autumn |
|
winter |
|
gray |
|
bone |
|
copper |
|
pink |
|
jet |