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 件のコメント
参考
カテゴリ
Help Center および File Exchange で Testing Frameworks についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!