Which decision-tree split has the larger Gini impurity reduction?

Instruction: A parent has 6 positive and 4 negative examples. Split A gives children (4 positive, 0 negative) and (2 positive, 4 negative). Split B gives (3 positive, 2 negative) in each child. Compute parent impurity, weighted child impurity, and gain for each split.

Context: Calculate weighted Gini impurity and explain why node-size weighting matters.

Updated

Official answer available

Read the opening below, then unlock the full answer and practical guidance.

For class proportions p_k, Gini impurity is G=1−Σ p_k². A pure node has G=0. The parent impurity is 1−0.6²−0.4²=0.48.

Split A: the four-example child is pure, with impurity 0. The six-example child has impurity 1−(2/6)²−(4/6)²=4/9...

Related Questions