-
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] label attribute of training dataset changes from pandas series to numpy array after model training #5099
Comments
Thanks for an excellent write-up with clear reproducible example! For both this issue and #5098 , I think you may have missed a detail of how A LightGBM Please see these descriptions for more details
I don't recall if it's intentional that Can you provide more specifics on the way you're using the |
Dataset attributes like LightGBM/python-package/lightgbm/basic.py Line 2148 in c991b2b
Refer to #2390 for the answer why originally passed underlying data might be changed after constructing Dataset object. |
This issue has been automatically closed because it has been awaiting a response for too long. When you have time to to work with the maintainers to resolve this issue, please post a new comment and it will be re-opened. If the issue has been locked for editing by the time you return to it, please open a new issue and reference this one. Thank you for taking the time to improve LightGBM! |
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
As per the output and code below the type of label attribute in the dataset changes from pandas series to numpy array after I use the dataset for training a LighGBM model. This creates an issue if I want to use the label attribute in follow-up evaluation/postprocessing steps. I would expect the algorithm to not change input parameters 😄 .
Reproducible example
Environment info
LightGBM version or commit hash:
lightgbm = "3.3.2"
Command(s) you used to install LightGBM
python = "3.9.7"
cloudpickle = "2.0.0"
pandas = "1.4.1"
numpy = "1.22.3"
The text was updated successfully, but these errors were encountered: