Answers.Body: <p>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.</p>
  <p>The algorithm used for continuous feature is <code>Reduction of variance</code>. For continuous feature, decision tree calculates total weighted variance of each splits. The minimum variance from these splits is chosen as criteria to split.</p>
  <p>look into this <a href="https://www.analyticsvidhya.com/blog/2016/04/tree-based-algorithms-complete-tutorial-scratch-in-python/#three" rel="nofollow noreferrer">decision tree basics article, section 3</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-07-31T12:38:48.873Z
Answers.Text: Maybe you should elaborate more on what you mean by "minimum variance from these splits". The variance of which random variable?
Answers.UserDisplayName: nbro
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-07-31T07:15:50.820Z
Answers.LastActivityDate: 2021-07-31T07:15:50.820Z
Answers.UserDisplayName: Archana David
Body: <p>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.</p>
  <p>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?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-07-31T13:50:08.383Z
Comments.Text: Good existing threads: [Mathematical calculation behind decision tree classifier with continuous variables](https://ai.stackexchange.com/q/23261/11539) (AI SE), [How is a splitting point chosen for continuous variables in decision trees?](https://datascience.stackexchange.com/q/24339/43000) (Data Science SE), [Decision tree using continuous variable](https://stackoverflow.com/questions/40889344/decision-tree-using-continuous-variable) (Stack Overflow).
Comments.UserDisplayName: desertnaut
Tags: <decision-trees><feature-engineering>
Title: How does a decision tree split a continuous feature?
UserDisplayName: Recessive
ThreadText: # How does a decision tree split a continuous feature?
  
  (Asked by: username_0 on 2021-07-09)
  
  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?
  
  **Tags:** decision-trees, feature-engineering
  > **Comments:**
  > **username_1**: Good existing threads: [Mathematical calculation behind decision tree classifier with continuous variables](https://ai.stackexchange.com/q/23261/11539) (AI SE), [How is a splitting point chosen for continuous variables in decision trees?](https://datascience.stackexchange.com/q/24339/43000) (Data Science SE), [Decision tree using continuous variable](https://stackoverflow.com/questions/40889344/decision-tree-using-continuous-variable) (Stack Overflow).  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2021-07-31. Score: -2
  
  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](https://www.analyticsvidhya.com/blog/2016/04/tree-based-algorithms-complete-tutorial-scratch-in-python/#three)
  
  > **Comments:**
  > **username_3**: Maybe you should elaborate more on what you mean by "minimum variance from these splits". The variance of which random variable?  
  
  ---
  
  