def multiclass_logloss(P, Y):
    npreds = [P[i][Y[i]-1] for i in range(len(Y))]
    score = -(1. / len(Y)) * np.sum(np.log(npreds))
    return score
dataset/ETHPy150Open fchollet/keras/keras/utils/np_utils.py/multiclass_logloss/original