why am i getting error with this code?

1 回表示 (過去 30 日間)
Kregozt
Kregozt 2023 年 2 月 8 日
コメント済み: Walter Roberson 2023 年 2 月 9 日
testdata = readtable("testdata.xlsx");
predictions = char(trainedModel.predictFcn(testdata));
iscorrect=predictions==cell2mat(string((testdata.Character)));
iscorrect=iscorrect(:,2);
accuracy = sum(iscorrect)*100/30;
  9 件のコメント
Kregozt
Kregozt 2023 年 2 月 9 日
but i have done the same but only converting the same to character
Walter Roberson
Walter Roberson 2023 年 2 月 9 日
It would make it easier for us to advise you if you were to call
predictions = trainedModel.predictFcn(testdata);
whos predictions
and show us the output of the whos call.

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

回答 (1 件)

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2023 年 2 月 8 日
Without looking at your data, it is diffiuclt to address your question properly. Thus, pl., post your sample data.
  1 件のコメント
Kregozt
Kregozt 2023 年 2 月 8 日
I am using IRIS dataset downloaded from kraggle

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

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by