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

Custom loss gradient calculation #1

Open
Arminius4 opened this issue Mar 9, 2020 · 0 comments
Open

Custom loss gradient calculation #1

Arminius4 opened this issue Mar 9, 2020 · 0 comments

Comments

@Arminius4
Copy link

Hey,
In the custom loss function notebook for lightgbm ln[16], there is the line grad = np.where(residual<0, -2*10.0*residual, -2*residual).
Why is the gradient negative here? The corresponding question on the medium article has not been answered yet and I stumbled upon the same issue.
Could you please explain why it doesn't work if the "mathematically correct" gradient is returned?

Best regards,
Lukas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant