Why are we not removing features from the features list as we are moving down the decision tree

Suppose the root node is sex. Now we go to the left node and again information gain comes maximum for sex then again we will split on sex which is wrong.

Hey @raunaqsingh10, if the split is made on feature like sex, than one branch will contain all males and other branch will contain females. So it doesn’t make any difference if you keep it in list or not. But if there is any other feature like age, than more splits can be performed, and it should be kept in result. So in both ways we need to keep all features in list.

Hope this cleared your doubt. :blush:

1 Like