Could anyone help me to solve the error in the following code
2 次查看(过去 30 天)
显示 更早的评论
load fisheriris
X = meas;
Y = species;
Mdl = fitcknn(X,Y,'NumNeighbors',5,'Standardize',1)
predictedY = resubPredict(Mdl)
C=confusionmat(Y,predictedY)
plotconfusion(Y,predictedY)
When i run the code i am getting error in line plotconfusion(Y,predictedY).I am using matlab version 2015a.Could anyone please help me on this.
回答(1 个)
Walter Roberson
2020-1-28
plotconfusion(categorical(Y),categorical(predictedY))
This will possibly not work if you are still using that old 2015 version of MATLAB you were using before.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 PHY Components 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!