Error using ~= Invalid types for comparison.
显示 更早的评论
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 个评论
KSSV
2021-6-29
Check the class of Predicted and testdata.N....they should be of same to compare.
Saraswathi S
2021-7-2
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Categorical Arrays 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!