How to use a trained kNN model from Classification APP NEW DATA.
Mostra commenti meno recenti
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.
Risposte (1)
Aditya Patil
il 15 Lug 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
Categorie
Scopri di più su Nearest Neighbors in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!