saveCompactModel returning error with Compact Classification Tree

1 次查看(过去 30 天)
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 个评论
Gokhan Atinc
Gokhan Atinc 2017-5-1
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

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Classification Ensembles 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by