-
-
Notifications
You must be signed in to change notification settings - Fork 26k
[MRG+2] Added examples to docstrings of MinMaxScaler and StandardScaler #9380
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+2] Added examples to docstrings of MinMaxScaler and StandardScaler #9380
Conversation
LGTM, thanks for the contribution! |
I would emphasize that doing this transformation on test data might lead to data that is out of bounds / not zero mean. |
@amueller Good idea, I will remove .scale_ example and add transform example on test data. |
You've added the elastic net changes to this PR. Can you remove them? |
@jmschrei Done. |
sklearn/preprocessing/data.py
Outdated
-------- | ||
>>> from sklearn.preprocessing import MinMaxScaler | ||
>>> | ||
>>> data = [[-1, -1], [-1, -1], [1, 1], [1, 1]] |
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.
I think the example would be more informative with some intermediate values and different ranges:
>>> data = [[-1, -1], [0, 2], [1, 5]]
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.
Done.
lgtm |
…er (scikit-learn#9380) [MRG+2] Added examples to docstrings of MinMaxScaler and StandardScaler
…er (scikit-learn#9380) [MRG+2] Added examples to docstrings of MinMaxScaler and StandardScaler
…er (scikit-learn#9380) [MRG+2] Added examples to docstrings of MinMaxScaler and StandardScaler
…er (scikit-learn#9380) [MRG+2] Added examples to docstrings of MinMaxScaler and StandardScaler
…er (scikit-learn#9380) [MRG+2] Added examples to docstrings of MinMaxScaler and StandardScaler
…er (scikit-learn#9380) [MRG+2] Added examples to docstrings of MinMaxScaler and StandardScaler
…er (scikit-learn#9380) [MRG+2] Added examples to docstrings of MinMaxScaler and StandardScaler
Reference Issue
Addresses #3846
What does this implement/fix? Explain your changes.
Adds examples to docstrings of MinMaxScaler and StandardScaler
Any other comments?