Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation for custom objective functions (hessian) #5043

Closed
fipelle opened this issue Mar 2, 2022 · 2 comments
Closed

Documentation for custom objective functions (hessian) #5043

fipelle opened this issue Mar 2, 2022 · 2 comments
Labels

Comments

@fipelle
Copy link

fipelle commented Mar 2, 2022

Hi, I am having some troubles understanding the current documentation for custom objective functions. In particular, I am not clear what I should do with the hessian. Is it sufficient to return the second partial derivative with respect to the forecast as a vector, as long as the objective function depends only the predictions, data and some constants? What order should the hessian matrix columns follow in more complicated cases?

@guolinke
Copy link
Collaborator

guolinke commented Mar 7, 2022

The hessian actually means the diagonal (h_{ii}) of the hessian matrix.
And in most cases, setting hessian to all ones is okay.

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity since it was closed. To start a new related discussion, open a new issue at https://github.com/microsoft/LightGBM/issues including a reference to this.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants