Plot Colormap Confusion Matrix - Heatmap
A ColorMap(HeatMap)Style Confusion Matrix
This code is an alternative to the MATLAB functions plotconfusion
and confusionchart
.
How to Use?
[ConfMat,Accuracy] = CmapConfusionMatrix(Actual_Labels,Predicted_Labels,Cmap);
-
ConfMat
: Confusion Matrix -
Accuracy
: Accuracy of Classification -
Actual_Labels
: True Labels -
Predicted_Labels
: Output Labels -
Cmap
: Colormap Style-
Colormap 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)
HeatMap Styles
Colormap Name | Color Scale |
---|---|
parula |
|
turbo |
|
hsv |
|
hot |
|
cool |
|
spring |
|
summer |
|
autumn |
|
winter |
|
gray |
|
bone |
|
copper |
|
pink |
|
jet |
Output using summer ColorMap
Cite As
Farhad Abedinzadeh (2023). Plot Colormap Confusion Matrix - Heatmap (https://github.com/farhadabedinzadeh/ColorHeatMap_ConfusionMatrix/releases/tag/v1.0.0), GitHub. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxTags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.0.1 | See release notes for this release on GitHub: https://github.com/farhadabedinzadeh/ColorHeatMap_ConfusionMatrix/releases/tag/v1.0.1 |
||
1.0.0 | See release notes for this release on GitHub: https://github.com/farhadabedinzadeh/ColorHeatMap_ConfusionMatrix/releases/tag/v1.0.0 |