def negative_gradient(self, y, pred, k=0, **kwargs):
        return y - np.nan_to_num(np.exp(pred[:, k] -
                                        logsumexp(pred, axis=1)))
Compute negative gradient for the ``k``-th class.
dataset/ETHPy150Open scikit-learn/scikit-learn/sklearn/ensemble/gradient_boosting.py/MultinomialDeviance.negative_gradient