Information gain measures how much a question reduces uncertainty in a dataset. Decision trees compare candidate feature questions and prefer the split producing the greatest reduction. section 8.17
Calculate it by comparing uncertainty before and after a split:
- Split the examples using a question, such as whether Price is at least 3,914. section 8.17
- Measure the Gini index for the left and right groups, weighting each group's uncertainty by its size. section 8.17
- Select the question with the highest gain as the next decision node. section 8.17
A useful split
For the question “Is Price >= 3,914?”, calculate the gain for its two resulting groups. A split that leaves one side containing only Perfect diamonds has reduced uncertainty substantially, making the question a strong candidate. section 8.17



