Weighted Impurity of a Split

A node holds 80 rows, 40 positive and 40 negative. A candidate split sends 60 rows left (36 positive, 24 negative) and 20 rows right (4 positive, 16 negative). scikit-learn scores a split with

G(Qm,θ)=nmleftnmH(Qmleft)+nmrightnmH(Qmright),H(Qm)=∑kpmk(1−pmk)G(Q_m, \theta) = \frac{n^{left}_m}{n_m} H(Q^{left}_m) + \frac{n^{right}m}{n_m} H(Q^{right}m), \qquad H(Q_m) = \sum_k p{mk}(1 - p{mk})

What is the parent's Gini impurity and the weighted Gini of the split?

A

Parent 1.00, split 0.91.

B

Parent 0.50, split 0.44, an impurity decrease of 0.06.

C

Parent 0.50, split 0.40, the average of the two children's impurities.

D

Parent 0.50, split 0.35, using the fraction misclassified in each child.