![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/725174/image.jpeg)
how to confusion matrix convert to heatmap style?
17 次查看(过去 30 天)
显示 更早的评论
how to confusion matrix convert to heatmap style?
I want to process the CNN-based modulation classification example to evaluate the learning performance in a new environment.
The confusionchart(a,b) function currently in use does not use axis and colorbar, and the color of the placed box is also not customizable.
In this regard, I would appreciate if you could solve it.
0 个评论
采纳的回答
dpb
2021-8-30
m=[923 4 21 8 4 1 5 5 23 6
5 972 2 0 0 0 0 1 5 15
26 2 892 30 13 8 17 5 4 3
12 4 32 826 24 48 30 12 5 7
5 1 28 24 898 13 14 14 2 1
7 2 28 111 18 801 13 17 0 3
5 0 16 27 3 4 943 1 1 0
9 1 14 13 22 17 3 915 2 4
37 10 4 4 0 1 2 1 931 10
20 39 3 3 0 0 2 1 9 923];
>> classLabels=categorical(...
{'airplane', 'automobile' , 'bird', 'cat', 'deer' ,
'dog', 'frog' , 'horse' , 'ship', 'truck'});
heatmap(classLabels,classLabels,m)
produces
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/725174/image.jpeg)
You can experiment about what is modfiable and see if joy ensues...
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Distribution Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!