How does decision tree decides split value for continuous vaiable?

decision_trees

#1

I want to predict if the student will play cricket or not{Target Variable}.

Suppose I have 3 columns : Gender ,Class, Age.

We can see we have 2 categorical attributes and one continuous attribute. While deciding the split at root node I know that both categorical attributes can be compared traditionally using gini criterion. How should I split the continuous attribute and which criterion should I take into account for it to be considered as a competitor for being the root node against 2 categorical variables?


#2

Hi @sahil1995chaturvedi,

While splitting using a continuous variable, the decision tree checks for multiple values rather than just one value. The value of Age at which it has minimum impurity in the subnodes is chosen for splitting the parent node.


#3

Thanks @AishwaryaSingh. I also found out that it splits on =x where x are only the data points values in that feature which are initially arranged in a sorted manner and then checked one by one.
Thanks Again. :slight_smile: