concept Gini index in category machine learning
appears as: Gini index, Gini indices, The Gini index

This is an excerpt from Manning's book Grokking Machine Learning MEAP V09.
Figure 7.22. The Gini impurity of the split is the weighted average of the Gini indices of the two leaves. Since the left leaf has 6 elements and the right leaf has 2 elements, then the weights associated to the Gini indices of the leaves are 6/8 and 2/8.
![]()
Figure 7.31. Using the Gini impurity index to measure this split. The Gini index for the root is 0.611. The Gini indices for the left and right leaves, respectively, are 0.375 and 0.5. The Gini average is the weighted average of the Gini indices of the leaves. Since the left leaf has 4 elements and the right leaf has 2 elements, then we weight the left Gini index by 4/6, and the right one by 2/6. This gives us a weighted average of 0.417. This gives us a Gini gain of 0.194 for this split.
![]()