Skip to content

Commit eecb39a

Browse files
committed
address comments
1 parent cea6b8b commit eecb39a

2 files changed

Lines changed: 19 additions & 22 deletions

File tree

doc/whats_new/v0.20.rst

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -260,31 +260,28 @@ Preprocessing
260260
classes found which are ignored.
261261
:issue:`10913` by :user:`Rodrigo Agundez <rragundez>`.
262262

263-
- :class:`preprocessing.QuantileTransformer` handles and ignores NaN values.
264-
:issue:`10404` by :user:`Guillaume Lemaitre <glemaitre>`.
265-
266-
- Updated :class:`preprocessing.MinMaxScaler` and
267-
:func:`preprocessing.minmax_scale` to pass through NaN values.
268-
:issue:`10404` and :issue:`11243` by :user:`Lucija Gregov <LucijaGregov>` and
263+
- NaN values are ignored and handled in the following preprocessing methods:
264+
:class:`preprocessing.MaxAbsScaler`,
265+
:class:`preprocessing.MinMaxScaler`,
266+
:class:`preprocessing.RobustScaler`,
267+
:class:`preprocessing.StandardScaler`,
268+
:class:`preprocessing.PowerTransformer`,
269+
:class:`preprocessing.QuantileTransformer` classes and
270+
:func:`preprocessing.maxabs_scale`,
271+
:func:`preprocessing.minmax_scale`,
272+
:func:`preprocessing.robust_scale`,
273+
:func:`preprocessing.scale`,
274+
:func:`preprocessing.power_transform`,
275+
:func:`preprocessing.quantile_transform` functions respectively addressed in
276+
issues :issue:`11011`, :issue:`11005`, :issue:`11308`, :issue:`11206`,
277+
:issue:`11306`, and :issue:`10437`.
278+
By :user:`Lucija Gregov <LucijaGregov>` and
269279
:user:`Guillaume Lemaitre <glemaitre>`.
270280

271-
- :class:`preprocessing.StandardScaler` and :func:`preprocessing.scale`
272-
ignore and pass-through NaN values.
273-
:issue:`11206` by :user:`Guillaume Lemaitre <glemaitre>`.
274-
275-
- :class:`preprocessing.MaxAbsScaler` and :func:`preprocessing.maxabs_scale`
276-
handles and ignores NaN values.
277-
:issue:`11011` by `Lucija Gregov <LucihaGregov>` and
278-
:user:`Guillaume Lemaitre <glemaitre>`
279-
280-
- :class:`preprocessing.PowerTransformer` and
281-
:func:`preprocessing.power_transform` ignore and pass-through NaN values.
282-
:issue:`11306` by :user:`Guillaume Lemaitre <glemaitre>`.
283281
- :class:`preprocessing.RobustScaler` and :func:`preprocessing.robust_scale`
284-
ignore and pass-through NaN values. In addition, the scaler can now be fitted
285-
on sparse matrices.
282+
can be fitted using sparse matrices.
286283
:issue:`11308` by :user:`Guillaume Lemaitre <glemaitre>`.
287-
284+
288285
Model evaluation and meta-estimators
289286

290287
- A scorer based on :func:`metrics.brier_score_loss` is also available.

sklearn/preprocessing/data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1137,7 +1137,7 @@ def fit(self, X, y=None):
11371137

11381138
quantiles = np.transpose(quantiles)
11391139

1140-
self.scale_ = (quantiles[1] - quantiles[0])
1140+
self.scale_ = quantiles[1] - quantiles[0]
11411141
self.scale_ = _handle_zeros_in_scale(self.scale_, copy=False)
11421142
else:
11431143
self.scale_ = None

0 commit comments

Comments
 (0)