You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Summary
Move parameter validation and "_ parameter" setting from
__init__
tofit
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 offit
in the sklearn wrapper.This is related to (a sub problem of) #2628
Related PR: #2721
Thanks!
References
The text was updated successfully, but these errors were encountered: