How are NaN Values handled by Matlab Decision Tree / Ensemble Learner

조회 수: 14 (최근 30일)
Dario Walter
Dario Walter . 2020년 7월 31일
댓글: Dario Walter . 2020년 8월 12일
I could not find a satisfying answer with respect to the topic provided in the title. Does Matlab exclude entire observations when a NaN value is detected for a certain feature or does it refer to NaN values with an own category (the latter would be desirable)?
Thanks for your help

채택된 답변

Raunak Gupta
Raunak Gupta 2020년 8월 7일
I assume you are using fitctree for working on Decision Trees. From here you may see that whenever a NaN value is encountered for any feature in an observation it is discarded while fitting the decision tree. Same goes for that observation's label. As for the second option it is very hard to assume or calculate any missing NaN value because the feature may follow a general rule or may be an outlier for a particular observation, so it’s better to discard rather than assume the value.
Hope this clarifies!
  댓글 수: 3

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

추가 답변 (0개)




Community Treasure Hunt

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

Start Hunting!

Translated by