Confusion Matrix class-label
12 ビュー (過去 30 日間)
古いコメントを表示
Ayush Chatterjee
2020 年 7 月 21 日
コメント済み: Ayush Chatterjee
2020 年 8 月 3 日
I want to write the class labels of my confusion matrix as 'f subscript 1', 'f subscript 2' etc. However when I am defining as
cm = confusionchart([20 0 0; 0 20 0; 0 0 20],{'f_1','f_2','f_3'}),,,But the class labels are coming as 'f_1', 'f_2' etc. The subscripts are not coming.
I have also tried this...cm = confusionchart([20 0 0; 0 20 0; 0 0 20],{'$f_1$','$f_2$','$f_3$'}, 'Interpreter','latex' )....This is showing an error message.
Can anybody please help me out?
採用された回答
Madhav Thakker
2020 年 7 月 24 日
To put latex in XTickLabel and YTickLabel, you can use the plotconfusion() function. plotconfusion() has a Children Graphics field whose second element is Axes and it can be modified to change the XTickLabel property which supports latex as well.
But, confusionchart() does not return the axes. It returns a ConfusionMatrixChart variable which does have a ClassLabels field but it is read only. There is an option to specify ClassLabels while declaring the confusion matrix, but it does not take latex formatted values.
Example of plotconfusion() function - https://in.mathworks.com/matlabcentral/answers/418387-can-i-change-the-properties-of-the-confusion-matrix-plot-like-axes-labels-and-tick-labels?s_tid=srchtitle.
Hope this helps.
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Deep Learning Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!