The Gini index is used in CART. The Gini index measures the impurity of the data set,
where pi - probability that data in the data set, D belong to class, Ci and pi = |Ci,D|/|D|
There are 2v - 2 possible ways to form two partitions of the data set, D based on a binary split on a attribute.
Each of the possible binary splits of the attribute is considered. The subset that gives the minimum Gini index is selected as the splitting subset for discrete valued attribute.
The degree of Gini index varies between 0 and 1. The value 0 denotes that all elements belong to a certain class or if there exists only one class, and the value 1 denotes that the elements are randomly distributed across various classes. A Gini Index of 0.5 denotes equally distributed elements into some classes.
The Gini index is biased toward multivalued attributes and has difficulty when the number of classes is large.