What is Gini Impurity?
What is Gini Impurity?
Gini impurity is a measure of how often a randomly chosen element from the set would be incorrectly labeled if it was randomly labeled according to the distribution of labels in the subset. Gini impurity can be computed by summing the probability {\displaystyle f_{i}} f_{i} of each item being chosen times the probability {\displaystyle 1-f_{i}} 1-f_{i} of a mistake in categorizing that item. It reaches its minimum (zero) when all cases in the node fall into a single target category.