gini-impurity-index
Gini Index is related to the misclassification probability of a random sample
Gini Index may result in values inside the interval [0, 0.5]
- The minimum value of zero corresponds to a node containing the elements of the same class. In case this occurs, the node is called pure
- The maximum value of 0.5 corresponds to the highest impurity of a node. Called impure
# Example
In this example, we’ll compute the Gini Indices for 3 different cases of a set with 4 balls of two different colors, red and blue
- 4 red, 0 blue
- 2 red, 2 blue
- 3 red, 1 blue