Skip to content

Commit 10997c9

Browse files
authored
DOC Fix StandardScaler documentation describing when mean_ is set (scikit-learn#26753)
1 parent 483fafe commit 10997c9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

sklearn/preprocessing/_data.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -721,11 +721,12 @@ class StandardScaler(OneToOneFeatureMixin, TransformerMixin, BaseEstimator):
721721
722722
mean_ : ndarray of shape (n_features,) or None
723723
The mean value for each feature in the training set.
724-
Equal to ``None`` when ``with_mean=False``.
724+
Equal to ``None`` when ``with_mean=False`` and ``with_std=False``.
725725
726726
var_ : ndarray of shape (n_features,) or None
727727
The variance for each feature in the training set. Used to compute
728-
`scale_`. Equal to ``None`` when ``with_std=False``.
728+
`scale_`. Equal to ``None`` when ``with_mean=False`` and
729+
``with_std=False``.
729730
730731
n_features_in_ : int
731732
Number of features seen during :term:`fit`.

0 commit comments

Comments
 (0)