This simulation demonstrates how a decision tree evaluates a feature to split data. Move the slider to define a threshold. The goal is to separate the Blue and Orange dots as cleanly as possible.
Entropy ($H$) is a measure of impurity or randomness in a group. A perfectly mixed group (50/50) has an entropy of 1.0. A completely pure group (all one color) has an entropy of 0.0.
Information Gain ($IG$) measures the reduction in entropy after splitting the data. Decision trees algorithmically choose the split that maximizes this gain.
Goal: Find the split with the highest number.
1. Calculate Parent Entropy:
2. Calculate Information Gain: