For one sorted numeric feature, this lesson checks exact midpoint candidates and scores each split with weighted Gini.
highlighted = computed this step
Sort rows and make midpoints
Sort the displayed column: x=1 has label A, x=2 has label A, x=4 has label B, and x=5 has label B. Candidate thresholds sit halfway between adjacent x values.
t∈{3/2,3,9/2}
Score each candidate split
The three weighted Gini scores are 1/3, 0, and 1/3. Each row is recomputed from the labels on each side of the threshold.
Gw(3/2)=1/3,Gw(3)=0,Gw(9/2)=1/3
Choose among these shown candidates
Among these shown candidates, t=3 has the smallest weighted Gini. This is one tiny sorted column and one stated candidate policy, not continuous optimization, not training-to-generalization, and not a claim about every tree package or future data.