Update custom_metric_obj.rst (#6367)

This commit is contained in:
Jean Lescut-Muller 2020-11-10 15:29:22 +01:00 committed by GitHub
parent e65e3cf36e
commit 9564886d9f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -45,6 +45,7 @@ namely prediction and labels. For implementing ``SLE``, we define:
import numpy as np
import xgboost as xgb
from typing import Tuple
def gradient(predt: np.ndarray, dtrain: xgb.DMatrix) -> np.ndarray:
'''Compute the gradient squared log error.'''