what command to predict class of test data using created KNNclassification model?
1 次查看(过去 30 天)
显示 更早的评论
i have a [1x1000] training vector and a categorical response variable resp;
ihave created KNNclassification model using the following code:
mdl = fitcknn(p,resp,'NumNeighbors',k,'distance','euclidean','kfold',5,'standardize',1);
i want to predict the class for the for each element of [1x1000] test vector t
i used the command:
y=predict(mdl,t)
its giving error:
Systems of classreg.learning.partition.ClassificationPartitionedModel class cannot be used with the "predict" command. Convert the
system to an identified model first, such as by using the "idss" command.
plz tell me how to solve this? which is the matlab command to achieve this?
0 个评论
回答(1 个)
reem aldaihani
2018-2-17
I got the same error and I don't know the answer. Hope someone can help us.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!