what command to predict class of test data using created KNNclassification model?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (1)
reem aldaihani
el 17 de Feb. de 2018
I got the same error and I don't know the answer. Hope someone can help us.
0 comentarios
Ver también
Categorías
Más información sobre Testing Frameworks en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!