-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
inverse_transform Xt argument consistency #27654
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
@wd60622 JTBC you recommend refactoring all |
Yes. I read # Has Xt arg
pipeline = make_pipeline(StandardScaler())
Xt = pipeline.fit_transform(X)
X_again = pipeline.inverse_transform(Xt=Xt)
# inverse_transform takes X instead of Xt
transformer = StandardScaler()
Xt = transformer.fit_transform(X)
X_again = transformer.inverse_transform(Xt=Xt)
# TypeError: inverse_transform() got an unexpected keyword argument 'Xt' |
I think that we got a similar refactoring to replace |
Nice, thanks for clarifying. If I can help out in anyway, I'll gladly make a PR |
Feel free to make a PR. You can check how this is handled in the other PR to know how to deprecate |
Conclusion in #28756 (comment) and following comments: |
Describe the issue linked to the documentation
Some of the inverse_transform methods take
Xt
as an argument whereas others takeX
. Is there are reason for the differences in the names?Noting the cases here: https://github.com/search?q=repo%3Ascikit-learn%2Fscikit-learn%20%22def%20inverse_transform%22&type=code
Suggest a potential alternative/fix
Stick to
Xt
in all casesThe text was updated successfully, but these errors were encountered: