RegressionTree cannot use "predict" method?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hello there,
I'm using Matlab R2013a and was able to train a regression tree using RegressionTree.fit(). However, when I used "predict(rtree, test_data)," I got the following error message:
Error using predict (line 85) Systems of classreg.learning.partition.RegressionPartitionedModel class cannot be used with the "predict" command. Convert the system to an identified model first, such as by using the "idss" command.
I believe using "predict" method confused a dynamic model estimation. Can you please tell me what was wrong?
Young
0 commentaires
Réponses (2)
Young
le 9 Juin 2014
Modifié(e) : Walter Roberson
le 12 Avr 2016
1 commentaire
reem aldaihani
le 17 Fév 2018
What if we will use cross-validation? This is part of my code: cvmodel=fitcknn(training_Best,class1, 'Distance',@mindistnew, 'NumNeighbors',1, 'KFold',10); cvclass=predict(cvmodel, testing_Best);
and I received this 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.
Could you please help me to fix this ASAP.
Sincloe Brans
le 9 Juin 2014
Modifié(e) : Walter Roberson
le 11 Avr 2016
Just do
Yfit = tree([Xnew]);
where tree is your regression or classreg tree and Xnew the new X's to be predicted.
0 commentaires
Voir également
Catégories
En savoir plus sur Gaussian Process Regression dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!