matrix 1x3 as input for testing data after train the model in classification learner

1 vue (au cours des 30 derniers jours)
I have done with classification learner for training algorithm, i have explor to model to workspace for testing the data, my input data in classification learner are import from excel (table) but for testing i want to use user input, i come out with this code. (one more thing if i import data from excel file, the testing data can classifiy but i dont want this way)
H2_percentage=15.217
CH4_percentage=53.261
C2H6_percentage= 31.522
testing=[H2_percentage CH4_percentage C2H6_percentage];
yfit = FineKNN.predictFcn('testing');
but when i run that code come out with this error....

Réponses (1)

Hiro Yoshino
Hiro Yoshino le 10 Déc 2020
yfit = FineKNN.predictFcn(testing);
You should use this instead.
  7 commentaires
Hiro Yoshino
Hiro Yoshino le 10 Déc 2020
How about convert test data into the right format?
Hussein Hasan Mohsen
Hussein Hasan Mohsen le 10 Déc 2020
H2_percentage=15.217 CH4_percentage=53.261 C2H6_percentage= 31.522 testing=[H2_percentage CH4_percentage C2H6_percentage];
%the format of testing data will be like the above code which asking user to enter data for testing

Connectez-vous pour commenter.

Community Treasure Hunt

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

Start Hunting!

Translated by