[MRG + 1] FIX Calling fit_transform instead of transform in Pipeline's fit_predict#7585
Merged
jnothman merged 3 commits intoscikit-learn:masterfrom Oct 6, 2016
Merged
Conversation
Member
|
thanks, lgtm :) |
amueller
requested changes
Oct 5, 2016
sklearn/tests/test_pipeline.py
Outdated
|
|
||
| # use a pipeline to do the transform and clustering in one step | ||
| pipe = Pipeline([('scaler', scaler), ('Kmeans', km)]) | ||
| pipe = Pipeline([('scaler', scaler_for_pipeline), ('Kmeans', km_for_pipeline)]) |
amueller
approved these changes
Oct 5, 2016
Member
|
thanks! |
Member
|
This is actually fixing a regression, and an error on my part :( Tagging with 0.18.1 for backport. Almost LGTM. |
jnothman
requested changes
Oct 5, 2016
sklearn/tests/test_pipeline.py
Outdated
| # transform and clustering steps separately | ||
| iris = load_iris() | ||
| scaler = StandardScaler() | ||
| scaler_for_pipeline = StandardScaler() |
Member
There was a problem hiding this comment.
Please add a comment that this is necessary since Pipeline does not clone the estimators.
…_predict_on_pipeline
jnothman
approved these changes
Oct 6, 2016
Member
|
LGTM, thanks |
amueller
pushed a commit
to amueller/scikit-learn
that referenced
this pull request
Oct 14, 2016
…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
Sundrique
pushed a commit
to Sundrique/scikit-learn
that referenced
this pull request
Jun 14, 2017
…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
paulha
pushed a commit
to paulha/scikit-learn
that referenced
this pull request
Aug 19, 2017
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reference Issue
This PR fixes issue #7558.
What does this implement/fix? Explain your changes.
As discussed in #7558, each transformer in pipeline should call
fit_transforminstead oftransforminfit_predict.test_fix_predict_on_pipelineis also fixed.