Error using ~= Invalid types for comparison.
Ältere Kommentare anzeigen
misclassrate = sum(Predicted ~= testdata.N)/numel(Predicted)
Here, my predicted variables are categorical while testdata.N is from a table.
Can anyone say what is the issue here?
2 Kommentare
KSSV
am 29 Jun. 2021
Check the class of Predicted and testdata.N....they should be of same to compare.
Saraswathi S
am 2 Jul. 2021
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Categorical Arrays finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!