gini_gain

gini_gain(y, y_subs) float

Get gini score of a split, i.e. the gain from parent to children.

Parameters:
y1d array

An array of labels

y_subslist of 1d array

List of arrays contain subsets of the labels in y. Total number of labels must sum to len(y).

Returns:
scorefloat

gini score of the split from parent class labels (y) to children (y_sub). Note a higher score means better gain.