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

[MRG] Remove special-case in Pipeline.inverse_transform for 1D arrays. #5065

Closed
wants to merge 1 commit into from

Conversation

joewreschnig
Copy link

This special-case resulted in pipelines that do not produce the same
results as calling their component transforms manually, and
prevented pipelines from containing transforms that processed
non-array inputs or outputs. (closes #5029)

@amueller
Copy link
Member

Thanks. LGTM.

@amueller amueller changed the title Remove special-case in Pipeline.inverse_transform for 1D arrays. [MRG + 1] Remove special-case in Pipeline.inverse_transform for 1D arrays. Jul 31, 2015
@jnothman
Copy link
Member

jnothman commented Aug 6, 2015

Hmm... This case is pretty ancient, and it's hard to tell what motivated @agramfort to include it in https://github.com/joewreschnig/scikit-learn/commit/06ac5f98, but changing it may break people's code. Do we think we should really fix it so quickly?

@amueller
Copy link
Member

amueller commented Aug 6, 2015

Well, pipeline doesn't have a coef_ any more....
I guess we could go through a deprecation cycle... though the behavior is really really odd.
Ideally a deprecation cycle would allow people to benefit from the fix immediately, so we would have to add an option, which we would need to deprecate in turn...

@amueller
Copy link
Member

amueller commented Aug 6, 2015

can you rebase so that the tests are not failing any more?

@amueller
Copy link
Member

amueller commented Sep 8, 2015

@ogrisel @GaelVaroquaux any opinions on this?
Maybe we should go through a deprecation cycle.
@jnothman would you be fine with that?
The benefit would be more sensible behavior and two lines less in the pipeline ;)

@jnothman
Copy link
Member

jnothman commented Sep 8, 2015

Sure I'm fine with that.

On 9 September 2015 at 01:39, Andreas Mueller notifications@github.com
wrote:

@ogrisel https://github.com/ogrisel @GaelVaroquaux
https://github.com/GaelVaroquaux any opinions on this?
Maybe we should go through a deprecation cycle.
@jnothman https://github.com/jnothman would you be fine with that?
The benefit would be more sensible behavior and two lines less in the
pipeline ;)


Reply to this email directly or view it on GitHub
#5065 (comment)
.

@amueller
Copy link
Member

amueller commented Sep 8, 2015

@joewreschnig are you still interested?

@GaelVaroquaux
Copy link
Member

GaelVaroquaux commented Sep 8, 2015 via email

@amueller
Copy link
Member

amueller commented Sep 9, 2015

Hm or a FutureWarning? Behavior will change in the future....

@amueller amueller added this to the 0.17 milestone Sep 9, 2015
@amueller
Copy link
Member

amueller commented Sep 9, 2015

Can you please rebase so that the tests pass?

@amueller amueller changed the title [MRG + 1] Remove special-case in Pipeline.inverse_transform for 1D arrays. [MRG] Remove special-case in Pipeline.inverse_transform for 1D arrays. Sep 10, 2015
 #5029)

This special-case resulted in pipelines that do not produce the same
results as calling their component transforms manually, and
prevented pipelines from containing transforms that processed
non-array inputs or outputs.
@joewreschnig
Copy link
Author

I was under the impression that rebasing a public history is generally a faux pas, especially when it still applies cleanly to HEAD, but OK.

@amueller
Copy link
Member

@joewreschnig opinions diverge. We favor readability and maintainability of the history of master. That means we aggressively squash and rebase.

@amueller
Copy link
Member

It would be great if you could change the pull request as following (as discussed above):
If someone uses inverse_transform and X.ndim == 1 raise a FutureWarning that will say that this behavior will change in 0.19, and leave the reshape in for now.
I know that is not great as it doesn't fix the problem now, but it doesn't break people's code either.

@ogrisel
Copy link
Member

ogrisel commented Sep 23, 2015

Closing as this is replaced by #5293

@ogrisel ogrisel closed this Sep 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pipeline inverse_transform works oddly for 1D arrays
5 participants