-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
[python-package] Where is the code for the 'quantile' objective, and how do I pass a custom objective to LGBMRegressor? #5524
Comments
Thanks for using LightGBM! I'm confused a bit by your question. Which of these are you asking?
Can you please tell me which of those you're asking? |
Thank you for your patient reply! I would like to ask for advice on this three points you mentioned. "how do I provide a custom objective function for quantile regression with LGBMRegressor in the Python package?" |
This is my code. When I move the mouse to 'quantite' and press Ctrl+B, I will be prompted to Can't find declaration to go to. But I really want to find out how the quantile method works in |
"how do I provide a custom objective function for quantile regression with LGBMRegressor in the Python package?" See the Custom objective functions can be passed to the "where can I find the code for the quantile objective function, so that I understand how it works?" the built-in
"what parameters can I use to change the behavior of LightGBM's quantile regression?" The only quantile-specific parameter is See https://lightgbm.readthedocs.io/en/latest/Parameters.html for descriptions of the other parameters that control LightGBM's behavior. |
Thank you very much!Now I know why I can't find it. |
Why is hessian directly assigned to 1.0? Is there any theoretical basis? Can you provide a PDF materials for reference? |
If you use pinball loss for quantile,gradient(First derivative)should be 1-alpha or alpha. And hessian should be 0. Did you consider the combination of hessian and lamda and assign hessian as 1? Sincerely look forward to your answer! |
3 similar comments
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
I believe it's an implementation detail where the sum of the hessians is used as a proxy to the number of samples in a node, but hopefully @shiyu1994 or @guolinke can confirm. |
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. |
Description
I want to change quantiles' loss function. Although I can make objective='quantile' , but I can't see a quantile in LGBMRegressor's code. Can you give me some advice? Thank you!
The text was updated successfully, but these errors were encountered: