def __call__(self, y, y_pred, sample_weight=None):
        """Compute the partial likelihood of prediction ``y_pred`` and ``y``."""
        pred_time = y['time'] - y_pred.ravel()
        mask = (pred_time > 0) | y['event']
        return 0.5 * squared_norm(pred_time.compress(mask, axis=0))
def __call__ ( self , y , y_pred , sample_weight = None ) : pred_time = y [ 'time' ] - y_pred . ravel ( ) mask = ( pred_time > 0 ) | y [ 'event' ] return 0.5 * squared_norm ( pred_time . compress ( mask , axis = 0 ) )
Compute the partial likelihood of prediction ``y_pred`` and ``y``.