-
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
[RFC] provide Python/R implementations of all the built-in objectives? #6440
Comments
I agree with this proposal. But we should also note that there can be minor (numerical) differences between Python (or R) and c++ implementations that can cause slight different results. |
Linking another relevant discussion with lots of helpful information from @jmoralez : #6649 (comment) |
I support this proposal. I've looked at the source code related to ObjectiveFunction. But do we need to expose the |
No, this issue is not about exposing the ability to invoke the builtin objective function (implemented in C++) independently on a dataset. That's being proposed in #6586 if you want to follow along. This is about providing pure-Python and pure-R implementations of those objective functions that can be passed into |
However, for the L1 objective function, if the |
Summary
Should we provide example Python (and maybe R) implementations of LightGBM's objective functions which exactly match the behavior of the builtin objectives from the C++ side?
Motivation
Over the years of maintaining LightGBM, I've seen significant interest in implementing LightGBM's built-in objective functions in Python, for purposes like:
See "References" for evidence.
Description
I am NOT proposing adding such implementations to any library that we publish.
Instead, I'm thinking of something like the following:
examples/
containing these implementationsinit_score
ifDataset
doesn't have oneboost_from_average
Things that do not necessarily need to be in scope for the first versions of implementations:
deterministic
parameter1e-6
, would probably good enough to start)References
GitHub posts that could be summarized as "how do I replicate a built-in LightGBM objective in Python"?
colsample_bytree != 1
#5543And Stack Overflow:
The text was updated successfully, but these errors were encountered: