フィルターのクリア

Giving error in confusion plot

2 ビュー (過去 30 日間)
Ali Asghar
Ali Asghar 2019 年 12 月 6 日
コメント済み: Ali Asghar 2019 年 12 月 6 日
Dear
I am using the naive model for classification of emg signal. The below prgram run smoothly except the last line of confusion plot, show error.
Find the attached snapshot
load('FeatureAngle000Musscle1.mat')
X = FeaturesAngle000Muscle1(:,1:4); % feature numerical values
Y = FeaturesAngle000Muscle1(:,5); % response like handopen, handclose etc
rng(1); % For reproducibility
Mdl2 = fitcnb(X,Y,...
'DistributionNames',{'normal','normal','kernel','kernel'},...
'ClassNames',{'HandGrip','HandOpen','HandRest','WristExtension','WristFlexion'});
Mdl2.DistributionParameters{1,2}
isLabels2 = resubPredict(Mdl2); % it generate the output/response of model
ConfusionMat2 = confusionchart(Y,isLabels2);
Error using confusionchart (line 64)
First argument must be a numeric square matrix, cell array of character vectors, categorical, logical, string or numeric
vector, character array, or parent container.
Untitled.png

採用された回答

Ridwan Alam
Ridwan Alam 2019 年 12 月 6 日
ConfusionMat2 = confusionchart(table2array(Y),isLabels2);
  1 件のコメント
Ali Asghar
Ali Asghar 2019 年 12 月 6 日
Thank you dear

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with Statistics and Machine Learning Toolbox についてさらに検索

タグ

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by