Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@LucijaGregov
Copy link
Contributor

@LucijaGregov LucijaGregov commented Apr 21, 2018

Reference Issues/PRs

partially adressed #10404

What does this implement/fix? Explain your changes.

Pass-through NaN value in MinMaxScaler

Any other comments?

@LucijaGregov
Copy link
Contributor Author

@glemaitre

@glemaitre glemaitre changed the title (WiP) Nan handling minmax scaler [WIP] Nan handling minmax scaler Apr 21, 2018
@glemaitre glemaitre changed the title [WIP] Nan handling minmax scaler [WIP] NaN handling MinMaxScaler Apr 21, 2018
estimator=self, dtype=FLOAT_DTYPES,
force_all_finite="allow-nan")

data_min = np.min(X, axis=0)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it should be np.nanmin because np.min([1, 2, 3, np.nan]) will return np.nan

force_all_finite="allow-nan")

data_min = np.min(X, axis=0)
data_max = np.max(X, axis=0)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

np.max -> np.nanmax

@glemaitre
Copy link
Member

@glemaitre
Copy link
Member

@glemaitre glemaitre changed the title [WIP] NaN handling MinMaxScaler [MRG] NaN handling MinMaxScaler Apr 21, 2018
Notes
-----
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this empty line


- Updated :class: `MinMaxScaler` to pass through NaN values. :issue: `10404`
by :user: `Lucija Gregov <LucijaGregov>`

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this empty line

'RandomForestRegressor', 'Ridge', 'RidgeCV']

ALLOW_NAN = ['QuantileTransformer', 'Imputer', 'SimpleImputer', 'MICEImputer']
ALLOW_NAN = ['Imputer', 'SimpleImputer', 'MICEImputer', 'MinMaxScaler', 'QuantileTransformer', 'Imputer', 'SimpleImputer', 'MICEImputer']
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There some repetition in this line.

other features in a round-robin fashion. :issue:`8478` by
:user:`Sergey Feldman <sergeyf>`.

- Updated :class: `MinMaxScaler` to pass through NaN values. :issue: `10404`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no space after :issue:

:user:`Sergey Feldman <sergeyf>`.

- Updated :class: `MinMaxScaler` to pass through NaN values. :issue: `10404`
by :user: `Lucija Gregov <LucijaGregov>`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no space after :user:

other features in a round-robin fashion. :issue:`8478` by
:user:`Sergey Feldman <sergeyf>`.

- Updated :class: `MinMaxScaler` to pass through NaN values. :issue: `10404`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:class:`preprocessing.MinMaxScaler`

@glemaitre glemaitre changed the title [MRG] NaN handling MinMaxScaler [MRG+ 1] NaN handling MinMaxScaler Apr 21, 2018
@glemaitre glemaitre changed the title [MRG+ 1] NaN handling MinMaxScaler [MRG+1] NaN handling MinMaxScaler Apr 21, 2018
@glemaitre
Copy link
Member

ping @rth

Copy link
Member

@rth rth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See minor comment below

LGTM otherwise.

:user:`Sergey Feldman <sergeyf>`.

- Updated :class:`preprocessing.MinMaxScaler` to pass through NaN values. :issue:`10404`
by :user:`Lucija Gregov <LucijaGregov>`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dot missing at the end.

@rth rth merged commit f1aedf6 into scikit-learn:master Apr 21, 2018
@jnothman jnothman mentioned this pull request Jun 16, 2018
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants