(x)
return np.fromiter((ss.entropy(pk) for pk in p), dtype=np.float64)
Compute the entropy of a dense/sparse matrix, column-wise. Assuming
    categorical values.
Compute the entropy of a dense/sparse matrix, column-wise. Assuming
    categorical values.
Compute the entropy of a dense / sparse matrix column - wise . Assuming categorical values .
def _categorical_entropy(x):
    """Compute the entropy of a dense/sparse matrix, column-wise. Assuming
    categorical values."""
    p = [ut.bincount(row)[0] for row in x.T]
    p = [pk / np.sum(pk) for pk in p]
    return np.fromiter((ss.entropy(pk) for pk in p), dtype=np.float64)
def _categorical_entropy ( x ) : p = [ ut . bincount ( row ) [ 0 ] for row in x . T ] p = [ pk / np . sum ( pk ) for pk in p ] return np . fromiter ( ( ss . entropy ( pk ) for pk in p ) , dtype = np . float64 )