-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
DOC More details about the attributes in MinMaxScaler #13029
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
@@ -210,6 +210,11 @@ class MinMaxScaler(BaseEstimator, TransformerMixin): | |||
|
|||
where min, max = feature_range. | |||
|
|||
The transformation is calculated as:: |
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 seems to be talking about transformation of the training data? Shouldn't these formulas include the _ attributes?
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.
Yes, the goal is to help users understand the algorithm (users can easily extend it to new data)
I don't use _ attributes to keep consistent with the way we define the transformation:
The transformation is given by::
X_std = (X - X.min(axis=0)) / (X.max(axis=0) - X.min(axis=0))
X_scaled = X_std * (max - min) + min
where min, max = feature_range.``
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.
Yes, I think that is more accessible
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.
Yes, I think that is more accessible
So what's your suggestion here?
I am worried that if we start to define this for the NB: I am not against the changes but I was wondering if you have any thoughts. @qinhanmin2014 did you have experiences where users were lacking this information in the docstring? |
My intention here is to explain the attribute |
OK I see. So I am fine with the changes then. |
…-learn#13029)" This reverts commit 65435bf.
…-learn#13029)" This reverts commit 65435bf.
Help users to understand the attribute without reading the code.