saveCompactModel returning error with Compact Classification Tree

5 vues (au cours des 30 derniers jours)
Tesla.
Tesla. le 1 Mai 2017
Commenté : Tesla. le 1 Mai 2017
Hi, I am trying to save a classification tree model with saveCompactModel in order to generate C Code to predict new data as shown here: https://de.mathworks.com/help/stats/c-generate-code-and-classification-learner.html
My model is a Complex Decision Tree using the split criterion "deviance". Surrogate splits are set to "off" und advanced options. However, I still keep getting the error:
Surrogate splits are not supported for codegen. I am using R2016b.
Any ideas how to solve this problem?
Thanks!
  2 commentaires
Gokhan Atinc
Gokhan Atinc le 1 Mai 2017
Hi,
Decision Trees are actually not supported for code generation in R2016b. In R2016b, predict functions for only support vector machines (models trained via fitcsvm), linear models (models trained via fitclinear) and ECOC models using SVM's or linear models (models trained via fitcecoc) are supported for code generation. Decision trees are supported for code generation in R2017a, but trees with Surrogate Splits are still not supported for code generation in R2017a.
Gokhan
Tesla.
Tesla. le 1 Mai 2017
Thank you, this explains a lot.

Connectez-vous pour commenter.

Réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by