[MRG+1] NaN handling MinMaxScaler#11005
Merged
rth merged 13 commits intoscikit-learn:masterfrom Apr 21, 2018
Merged
Conversation
Contributor
Author
glemaitre
reviewed
Apr 21, 2018
sklearn/preprocessing/data.py
Outdated
| estimator=self, dtype=FLOAT_DTYPES, | ||
| force_all_finite="allow-nan") | ||
|
|
||
| data_min = np.min(X, axis=0) |
Member
There was a problem hiding this comment.
it should be np.nanmin because np.min([1, 2, 3, np.nan]) will return np.nan
sklearn/preprocessing/data.py
Outdated
| force_all_finite="allow-nan") | ||
|
|
||
| data_min = np.min(X, axis=0) | ||
| data_max = np.max(X, axis=0) |
Member
|
Add a what's new entry similarly to: https://github.com/scikit-learn/scikit-learn/pull/10437/files#diff-e1d2c7e554aa3e481389d1faa2eb5136 |
Member
|
It would also be nice to have a note: |
glemaitre
reviewed
Apr 21, 2018
sklearn/preprocessing/data.py
Outdated
|
|
||
| Notes | ||
| ----- | ||
|
|
doc/whats_new/v0.20.rst
Outdated
|
|
||
| - Updated :class: `MinMaxScaler` to pass through NaN values. :issue: `10404` | ||
| by :user: `Lucija Gregov <LucijaGregov>` | ||
|
|
sklearn/utils/estimator_checks.py
Outdated
| 'RandomForestRegressor', 'Ridge', 'RidgeCV'] | ||
|
|
||
| ALLOW_NAN = ['QuantileTransformer', 'Imputer', 'SimpleImputer', 'MICEImputer'] | ||
| ALLOW_NAN = ['Imputer', 'SimpleImputer', 'MICEImputer', 'MinMaxScaler', 'QuantileTransformer', 'Imputer', 'SimpleImputer', 'MICEImputer'] |
Member
There was a problem hiding this comment.
There some repetition in this line.
doc/whats_new/v0.20.rst
Outdated
| other features in a round-robin fashion. :issue:`8478` by | ||
| :user:`Sergey Feldman <sergeyf>`. | ||
|
|
||
| - Updated :class: `MinMaxScaler` to pass through NaN values. :issue: `10404` |
doc/whats_new/v0.20.rst
Outdated
| :user:`Sergey Feldman <sergeyf>`. | ||
|
|
||
| - Updated :class: `MinMaxScaler` to pass through NaN values. :issue: `10404` | ||
| by :user: `Lucija Gregov <LucijaGregov>` |
doc/whats_new/v0.20.rst
Outdated
| other features in a round-robin fashion. :issue:`8478` by | ||
| :user:`Sergey Feldman <sergeyf>`. | ||
|
|
||
| - Updated :class: `MinMaxScaler` to pass through NaN values. :issue: `10404` |
Member
There was a problem hiding this comment.
:class:`preprocessing.MinMaxScaler`
glemaitre
approved these changes
Apr 21, 2018
Member
|
ping @rth |
rth
reviewed
Apr 21, 2018
Member
rth
left a comment
There was a problem hiding this comment.
See minor comment below
LGTM otherwise.
doc/whats_new/v0.20.rst
Outdated
| :user:`Sergey Feldman <sergeyf>`. | ||
|
|
||
| - Updated :class:`preprocessing.MinMaxScaler` to pass through NaN values. :issue:`10404` | ||
| by :user:`Lucija Gregov <LucijaGregov>` |
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reference Issues/PRs
partially adressed #10404
What does this implement/fix? Explain your changes.
Pass-through NaN value in
MinMaxScalerAny other comments?