-
-
Notifications
You must be signed in to change notification settings - Fork 25.9k
Pipeline should use fit_transform in fit_predict #7558
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
Comments
wow this is a pretty bad bug. Is |
Do you want to fix this, and the test? Hm @jnothman I am somewhat confused. I thought we'd be cloning estimators on pipeline construction. Was it a deliberate choice not to clone when we set the steps? |
Sure, I'll fix both. |
I don't think you should fix the lack of cloning. @amueller, I consider this to be among Pipeline's "legacy" behaviour. It's been around for a long time and we'll break lots of code by changing its behaviour. Pipeline also modifies a constructor param in Yes, fix |
Ugh I should remember that. Should we add that to the docs somewhere? |
Perhaps we should document it; perhaps we should ensure it's tested; and it should at least be commented. |
I can add it to |
Perhaps as a separate PR. I'd rather merge the fix first. |
Thanks for catching and fixing this, @gszpak |
@gszpak if you like you can open an issue and/or PR for the tests and doc. That would be much appreciated. |
Sure, will do:) |
…t_predict (scikit-learn#7585) * BUGFIX Calling fit_transform instead of transform in Pipeline's fit_predict (scikit-learn#7558) * PEP8 fixes in test_fit_predict_on_pipeline * Added comment explaining separate estimators for pipeline in test_fit_predict_on_pipeline
…t_predict (scikit-learn#7585) * BUGFIX Calling fit_transform instead of transform in Pipeline's fit_predict (scikit-learn#7558) * PEP8 fixes in test_fit_predict_on_pipeline * Added comment explaining separate estimators for pipeline in test_fit_predict_on_pipeline
…t_predict (scikit-learn#7585) * BUGFIX Calling fit_transform instead of transform in Pipeline's fit_predict (scikit-learn#7558) * PEP8 fixes in test_fit_predict_on_pipeline * Added comment explaining separate estimators for pipeline in test_fit_predict_on_pipeline
Description
Pipeline's fit_predict implementation is inconsistent with docstring. According to docstring, each
step should call fit_transform, but it calls only transform instead.
The text was updated successfully, but these errors were encountered: