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

Improving compatibility with Scikit-learn #2720

Closed
daviddiazvico opened this issue Jan 31, 2020 · 1 comment
Closed

Improving compatibility with Scikit-learn #2720

daviddiazvico opened this issue Jan 31, 2020 · 1 comment

Comments

@daviddiazvico
Copy link

daviddiazvico commented Jan 31, 2020

Summary

Move parameter validation and "_ parameter" setting from __init__ to fit in the sklearn wrapper.

Motivation

Attain full compatibility with sklearn and skopt automated hyper-parameter search.

Description

According to the Scikit-learn development guide, the __init__ method should not do any parameter validation or set any "trailing _" parameter.

In order to have an estimator compatible with the automated hyper-parameter search objects (GridSearchCV, RandomizedSearchCV, skopt.BayesSearchCV, etc.), that should be handled by the fit method.

In particular, the instantiation of _Booster and other parameters should be moved from __init__ to the beginning of fit in the sklearn wrapper.

This is related to (a sub problem of) #2628

Related PR: #2721

Thanks!

References

@StrikerRUS
Copy link
Collaborator

Refer to #2721 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants