-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
[MRG] Fixes #8174: deprecation warning #8177
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
Conversation
|
Thanks @jnothman. ** Modifications: **
This goes down to this part:
If we are intending to deprecate y from FunctionTransformer.transform(), it seems that we need to change
|
Don't modify FunctionTransformer, thanks. I'd like to hear further on @GaelVaroquaux's concerns about this task. |
assert_warns_message(DeprecationWarning, warning_msg, X_r.transform, | ||
X, y=1.0) | ||
|
||
warning_msg = "The parameter y on transform() is deprecated" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this variable is already set
X, y=1.0) | ||
|
||
warning_msg = "The parameter y on transform() is deprecated" | ||
X_r = pca.fit(X) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this need not be repeated
@@ -78,6 +81,11 @@ def fit(self, X, y=None): | |||
return self | |||
|
|||
def transform(self, X, y=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'deprecated'
@@ -78,6 +81,11 @@ def fit(self, X, y=None): | |||
return self | |||
|
|||
def transform(self, X, y=None): | |||
if y is not None: | |||
warnings.warn('y is deprecated and will be' | |||
' removed in a future version', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
which?
@jnothman I've made the changes. Let me know if we need to add/remove the deprecation warning message from |
Do not deprecate y in FunctionTransformer.
…On 11 January 2017 at 19:49, Tahar ***@***.***> wrote:
@jnothman <https://github.com/jnothman> I've made the changes. Let me
know if we need to add/remove the deprecation warning message from
sklearn/preprocessing/_function_transformer.py: def transform(self, X,
y=None). I hope also that @GaelVaroquaux
<https://github.com/GaelVaroquaux> has a moment to chime in.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#8177 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAEz6w7yImOo24TquutAla_rVNgq-mQiks5rRJezgaJpZM4LdxcZ>
.
|
Thanks @jnothman. I have pushed the changes. |
This fixes #8174.
As the parameter
y
should be deprecated from methodtransform
and eventually removed in a future version. I have added the following warning message.Transform() is used in the following files: