saveCompactModel returning error with Compact Classification Tree

조회 수: 6 (최근 30일)
Tesla.
Tesla. 2017년 5월 1일
댓글: Tesla. 2017년 5월 1일
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
Tesla.
Tesla. 2017년 5월 1일
Thank you, this explains a lot.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Support Vector Machine Classification에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by