Gini impurity measures how mixed the class counts are. The arithmetic stays rational because it uses only counts, proportions, and squares.

highlighted = computed this step

Gini impurity

Gini impurity is one minus the sum of squared class shares. For the parent counts, the exact value is 1/2.

G=1pi2G=1-\sum p_i^2
Parent GiniGini impurity is recomputed from exact class proportions.Parent nodeparentcounts=[3, 3]G=1/2

Why Gini here

Gini stays rational because it uses counts, ratios, and squares. Entropy would introduce logarithm, so this book deliberately uses Gini.

countspiG\text{counts}\rightarrow p_i\rightarrow G
Parent GiniGini impurity is recomputed from exact class proportions.Parent nodeparentcounts=[3, 3]G=1/2

Summary

The parent impurity is exactly 1/2. No named boundary is needed because no logarithm appears.

Gparent=1/2G_{\text{parent}}=1/2
Parent GiniGini impurity is recomputed from exact class proportions.Parent nodeparentcounts=[3, 3]G=1/2