-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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] init_score
and data structures in custom functions shape for multiclass classification
#4046
Comments
I think this can be applied not only for |
Yes, that'd be nice. I remember a while ago I was very confused when using custom objectives with multiclass classification because |
We already re-shape prediction result in the opposite way: LightGBM/python-package/lightgbm/basic.py Lines 747 to 752 in e4cf2e4
|
I'd like to broaden this issue and include data structures used in custom objectives and metrics here based on the conversation above and this comment
to not split the discussion. |
init_score
and data structures in custom functions shape for multiclass classification
@StrikerRUS I agree, thanks for re-wording and re-opening this. |
@StrikerRUS Thank you. I do think 2D data structures will be more intuitive for multi-class customized gradients and hessians. |
Closing this due to the lack of active work on this issue. |
Reopening since I'm working on this. |
Description
When using
init_score
in multiclass classification it would be very intuitive to use an(n_samples, n_classes)
collection, as is suggested in #2595 (comment), however this isn't currently supported in the python package, so you have to reshape this to an(n_samples * n_classes, )
collection.This probably isn't that big of a deal with local models, however since dask partitions the collections by rows, this could produce problems with the partitioning.
Reproducible example
Environment info
LightGBM version or commit hash: 37e9878
Command(s) you used to install LightGBM
git clone --recursive https://github.com/microsoft/LightGBM.git cd LightGBM/python-package python setup.py install
The text was updated successfully, but these errors were encountered: