To use cross-entropy loss inside boosting, XGBoost needs the first and second derivatives of the loss with respect to each sample's raw score. For logistic loss those derivatives have a short closed form.
Implement xgb_logistic_grad_hess(y, p), returning the gradient p - y and the hessian p (1 - p).
p is a probability between 0 and 1.The gradient is the prediction error, and the hessian is the variance of a Bernoulli with probability p.
No results yet
Run your code to check it against the examples, or submit to run every test.