Change the numeric class label of confusion matrix to string

17 ビュー (過去 30 日間)
Elysi Cochin
Elysi Cochin 2022 年 9 月 15 日
回答済み: RAGHUNATHRAJU DASHARATHA 2022 年 9 月 20 日
How to change the numeric class label (1, 2, 3... on the xlabel and ylabel) of a confusion matrix to string, when using
confusionchart(trueLabels,predictedLabels)
and
plotconfusion(T,Y)

採用された回答

RAGHUNATHRAJU DASHARATHA
RAGHUNATHRAJU DASHARATHA 2022 年 9 月 20 日
As per my understanding you want to change the numeric class label to string class label for confusionchart
I would like to demonstrate it using below example
a= ones(10);
b=confusionchart(a);
%%Change to String classlabel
a= ones(10);
b=confusionchart(a);
c={'a';'b';'c';'d';'e';'f';'g';'h';'i';'j'}
c = 10×1 cell array
{'a'} {'b'} {'c'} {'d'} {'e'} {'f'} {'g'} {'h'} {'i'} {'j'}
b=confusionchart(a,c);
For your further reference kindly go through the link

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangePattern Recognition and Classification についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by