Negative gradient of partial likelihood

        Parameters
        ---------
        y : tuple, len = 2
            First element is boolean event indicator and second element survival/censoring time.
        y_pred : np.ndarray, shape=(n,):
            The predictions.

def negative_gradient(self, y, y_pred, sample_weight=None, **kwargs):
        """Negative gradient of partial likelihood

        Parameters
        ---------
        y : tuple, len = 2
            First element is boolean event indicator and second element survival/censoring time.
        y_pred : np.ndarray, shape=(n,):
            The predictions.
        """
        ret = coxph_negative_gradient(y['event'].astype(numpy.uint8), y['time'], y_pred.ravel())
        if sample_weight is not None:
            ret *= sample_weight
        return ret