-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
TPOTClassifier.set_params doesn't follow scikit-learn estimator API #739
Comments
@amueller, any thoughts on how this should be resolved? Is it generally recommended to avoid parameter handling logic in the |
Traveling right now. But yeah, no validation or anything in init.
Sent from phone. Please excuse spelling and brevity.
…On Thu, Aug 9, 2018, 16:14 Randy Olson ***@***.***> wrote:
@amueller <https://github.com/amueller>, any thoughts on how this should
be resolved? Is it generally recommended to avoid parameter handling logic
in the __init__ of an estimator? If so, we could move said logic to
fit/predict.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#739 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAbcFg01NXfaLVTQRzmwY1tLa_KyEKUpks5uPEO9gaJpZM4V1wnf>
.
|
OK, thanks! I think moving those logic to fit/predict is more clear way to fix this issue. I will submit a PR for it. |
This issue should be fixed in TPOT 0.9.4. Please feel free to reopen this issue if you have any questions. |
Typically, calling
old_estimator.set_params(new_param=foo)
will copy all the other parameters from the old estimator, and only updatenew_param
. Currently, TPOT will__init__
with the kwargs passed tonew_param
, and use the default or everything else.Context of the issue
See http://scikit-learn.org/stable/developers/contributing.html#estimators and http://scikit-learn.org/stable/developers/contributing.html#get-params-and-set-params.
Process to reproduce the issue
Expected result
Possible fix
Hopefully just delete the custom
set_params
:) That may not be possible though, as it looks like there's some parameter handling logic in the__init__
. That logic would need to be either moved to fit (and transform) or a helper method.The text was updated successfully, but these errors were encountered: