# How does a decision tree split a continuous feature?

Decision trees learn by measuring the quality of a split through some function, apply this to all features and you get the best feature to split on.

However, with a continuous feature it becomes problematic because there are an infinite number of ways you can split the feature. How is the optimal split for a continuous feature chosen?

## 1 Answer

Decision tree can be utilized for both classification(categorical) and regression(continuous) type of problems. The decision criterion of decision tree is different for continuous feature as compared to categorical.

The algorithm used for continuous feature is Reduction of variance. For continuous feature, decision tree calculates total weighted variance of each splits. The minimum variance from these splits is chosen as criteria to split.

look into this decision tree basics article, section 3

• Maybe you should elaborate more on what you mean by "minimum variance from these splits". The variance of which random variable?
– nbro
Jul 31 '21 at 12:38