Two measures of classification “impurity”
Treat the frequencies of classes in each partition as
probabilities and compute the entropy.
This is a natural measure if we want to maximize the
log probability of the correct answer.
Treat the frequencies as probabilities and use an
unprincipled measure called the Gini index.
It was invented by frequentist statisticians and it just
happens to work pretty well.