How to use a trained kNN model from Classification APP NEW DATA.
2 views (last 30 days)
Show older comments
Hi, I have a trained KNN modelf from the classifcation app, and I'm trying to use it on a new data (a table).
The yfit function does not work and neither does this:
kNNMdl= trainedModel1.ClassificationKNN;
[lables]= predict(kNNMdl,ApneaUntrained);
I'm not sure what I'm doing please help.
0 Comments
Answers (1)
Aditya Patil
on 15 Jul 2020
Once you export the model to workspace, you can predict on new data as follows,
y = trainedModel.predictFcn(X); %where X is new data, and y is output
0 Comments
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!