You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am working on a project where I need to implement a custom loss function for the LGBMRegressor model.
Specifically, I am interested in reconstructing (as a first step) the Tweedie or Regression_l1 loss that is being used in the model as an objective. This would allow me to have more flexibility in customizing the loss function while retaining the model's compatibility with existing LightGBM functionalities.
I tried looking at the C++ implementation of LightGBM#RegressionTweedieLoss() and implement the function in python.
I expected my custom loss function to produce results equivalent to using Tweedie or Regression L1 loss in the objective hyperparameter but the results were very different (+- 100% difference).
Also...I see that you double-posted this here and on Stack Overflow (link).
Please do not do that. Maintainers here also monitor the [lightgbm] tag on Stack Overflow. I could have been spending time preparing an answer here while another maintainer was spending time answering your Stack Overflow post, which would have been a waste of maintainers' limited attention that could otherwise have been spent improving this project. Double-posting also makes it less likely that others with a similar question will find the relevant discussion and answer.
Since you're already getting answers on Stack Overflow, I'm going to close this and encourage anyone who can help to please go answer there.
Description
I am working on a project where I need to implement a custom loss function for the LGBMRegressor model.
Specifically, I am interested in reconstructing (as a first step) the Tweedie or Regression_l1 loss that is being used in the model as an objective. This would allow me to have more flexibility in customizing the loss function while retaining the model's compatibility with existing LightGBM functionalities.
I tried looking at the C++ implementation of LightGBM#RegressionTweedieLoss() and implement the function in python.
I expected my custom loss function to produce results equivalent to using Tweedie or Regression L1 loss in the objective hyperparameter but the results were very different (+- 100% difference).
Reproducible example
Additional Information
LightGBM Version: 3.3.5
Programming Language: Python
Operating System: macOS
Any guidance or examples on how to achieve this customization would be greatly appreciated.
Thank you for your assistance!
The text was updated successfully, but these errors were encountered: