How Decision Tree Choses The Splitting Criteria If The Attribute Is Numeric In Nature?
Table Of Contents:
- How Decision Tree Choses The Splitting Criteria If The Attribute Is Numeric In Nature?
How Decision Tree Choses The Splitting Criteria If The Attribute Is Numeric In Nature?
- When an attribute in a decision tree is numeric (e.g., age, salary, temperature), the splitting criteria involve finding an optimal threshold value to divide the data into two subsets.
- This is done to maximize the Information Gain (or other metrics like Gini Index). Below is the step-by-step explanation:
Steps to Handle Numeric Attributes in Splitting
Step-1: Sort The Data
- Sort the dataset based on the numeric attribute values in ascending order.
Step-2: Generate Possible Splits
Step-3: Evaluate Each Split
Step-4: Calculate Entropy (or Gini Index) for Each Split
Step-5: Calculate Information Gain
Step-6: Choose The Best Threshold
Example Of Numeric Split
