根据文档, http: //xgboost.readthedocs.io/en/latest/python/python_api.html 如果我们要定义自定义目标函数,它应该有签名
objective(y_true, y_pred) -> grad, hess
在哪里
hess: array_like of shape [n_samples]
The value of the second derivative for each sample point
但是,如果我们有损失函数,取决于 N 个变量,我们应该有 NxN 的二阶导数矩阵,但我们的 hess 形状只有 Nx1。我们应该排除“交叉变量”衍生品吗?或者还有什么?