When two candidate splits have the same exact gain, a stated tie policy decides which one is displayed as chosen.
highlighted = computed this step
Two candidates can tie
Start with parent counts [2,2]. Feature L and Feature R both split into [1,1] and [1,1].
Gw(L)=Gw(R)=1/2
The gains are equal too
The parent Gini is 1/2, and each candidate weighted Gini is also 1/2. So each gain is 0.
gain=Gparent−Gw=1/2−1/2=0
State the tie policy
The displayed policy chooses the first listed candidate, so Feature L is selected. The policy chooses among equal exact scores; it does not make an accuracy, optimality, or generalization claim.