I was looking at the decision tree algorithm and I wondered that for example if the training set has 20 features but only 5 features are important and classification can be done by using only them then will my end result decision tree has only 5 features? My understanding is that as decision tree is a kind of greedy based algorithm, so I believe it will only consider those features which can be used for the best fit of the training data and ignore the rest of them.

  • $\begingroup$ As far as I know the decission tree will use all features, so if you are using 20 but only 5 are informative, you are bulding a uncessary complex model. You should perform feature selection before you train de decission tree $\endgroup$
    – ignatius
    May 8, 2020 at 14:33
  • $\begingroup$ Also, datascience.stackexchange.com/q/57697/55122 $\endgroup$
    – Ben Reiniger
    May 8, 2020 at 14:49


Browse other questions tagged or ask your own question.