(dist)
return np.sum((1 - np.sum(p ** 2, axis=0)) *
                  np.sum(dist, axis=0) / np.sum(dist))
Gini index of class-distribution matrix
Gini index of class-distribution matrix
Gini index of class - distribution matrix
def _gini(dist):
    """Gini index of class-distribution matrix"""
    p = np.asarray(dist / np.sum(dist, axis=0))
    return np.sum((1 - np.sum(p ** 2, axis=0)) *
                  np.sum(dist, axis=0) / np.sum(dist))
def _gini ( dist ) : p = np . asarray ( dist / np . sum ( dist , axis = 0 ) ) return np . sum ( ( 1 - np . sum ( p ** 2 , axis = 0 ) ) * np . sum ( dist , axis = 0 ) / np . sum ( dist ) )