Skip to content
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

[Feature proposal] Allow python scikit-learn wrappers to use callbacks #3663

Closed
mxxun opened this issue Sep 3, 2018 · 1 comment
Closed

Comments

@mxxun
Copy link
Contributor

mxxun commented Sep 3, 2018

Pretty much what it says on the tin. Being able to use xgboost in a scikit pipeline is terribly convenient, and so is being able to finely control learning rate, but at the moment it's one or the other.
As I understand, making wrappers' fit() methods pass callbacks to the train() inside would do the job, but maybe there are reasons not to do it like this, or not to do it at all?

@mxxun mxxun changed the title [Feature proposal] Allow scikit-learn wrapper to use callbacks [Feature proposal] Allow python scikit-learn wrappers to use callbacks Sep 3, 2018
@hcho3
Copy link
Collaborator

hcho3 commented Sep 3, 2018

@mrgutkun Yes, LightGBM does a similar thing, passing a callback to fit() method: https://lightgbm.readthedocs.io/en/latest/Python-API.html#lightgbm.LGBMModel.fit . I'll gladly merge a pull request to enable this.

mxxun added a commit to mxxun/xgboost that referenced this issue Sep 7, 2018
mxxun added a commit to mxxun/xgboost that referenced this issue Sep 7, 2018
hcho3 pushed a commit that referenced this issue Sep 7, 2018
* Fix #3663: Allow sklearn API to use callbacks

* Fix lint

* Add Callback API to Python API doc
CodingCat pushed a commit to CodingCat/xgboost that referenced this issue Sep 18, 2018
* Fix dmlc#3663: Allow sklearn API to use callbacks

* Fix lint

* Add Callback API to Python API doc
alois-bissuel pushed a commit to criteo-forks/xgboost that referenced this issue Dec 4, 2018
* Fix dmlc#3663: Allow sklearn API to use callbacks

* Fix lint

* Add Callback API to Python API doc
@lock lock bot locked as resolved and limited conversation to collaborators Dec 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants