gini

gini(y) float

Get gini score for an array of labels.

Parameters:
y1d numpy array

An array of labels

Returns:
scorefloat

gini score for the set of labels (i.e. how pure they are). A larger score means more impurity. 0 means pure.