How to use a trained kNN model from Classification APP NEW DATA.

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)

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

Prodotti

Richiesto:

il 4 Mag 2020

Risposto:

il 15 Lug 2020

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by