-
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
[docs] [python] custom metric function in lgb.train()
interface should not refer to the the passed dataset a train_data
#4759
Comments
@StrikerRUS @jmoralez would you support a change like this? |
I agree with the changes.
|
Generally, I support this change. But maybe use |
Is this available to work on? |
@akshitadixit sure! We'd welcome the help! Please see @StrikerRUS 's comment above about using the new name |
Sure! |
Hi @jameslamb and @StrikerRUS i noticed something I thought of confirming from you. I have been asked to change LightGBM/python-package/lightgbm/basic.py Lines 3240 to 3256 in da98f24
whereas there is a similar instance with LightGBM/python-package/lightgbm/basic.py Lines 3207 to 3223 in da98f24
Kindly clarify this, |
@akshitadixit sorry for the delayed response. Yes, please also change those places to
|
This issue has been automatically locked since there has not been any recent activity since it was closed. |
Summary
This issue proposes changing the documentation for
feval
inlgb.train()
, in the Python package, replacingtrain_data
withevaluation_dataset
.Motivation
lgb.train()
allows providing custom evaluation metrics defined in Python functions. According to the docs forlgb.train()
(here), such functions should have the following signature.I think it's confusing to refer to this as "The training dataset". In my opinion, that gives the impression that custom evaluation functions will have access to the data being used for training, which is not true. Instead, each custom evaluation function is provided a Dataset that evaluation has been request for, which might be either the training data or a separate validation dataset.
LightGBM/python-package/lightgbm/engine.py
Lines 296 to 299 in da98f24
LightGBM/python-package/lightgbm/basic.py
Lines 3240 to 3255 in da98f24
LightGBM/python-package/lightgbm/basic.py
Lines 3271 to 3272 in da98f24
Description
Specifically, I'm proposing the following changes:
evaluation_data
, notvalid_data
LightGBM/python-package/lightgbm/basic.py
Lines 3254 to 3255 in da98f24
evaluation_data
, nottrain_data
LightGBM/python-package/lightgbm/engine.py
Lines 88 to 89 in da98f24
References
Noticed this while working on #4679 (comment).
The text was updated successfully, but these errors were encountered: