8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 266a11b commit 1e46db6Copy full SHA for 1e46db6
sklearn/preprocessing/_data.py
@@ -617,8 +617,11 @@ class StandardScaler(TransformerMixin, BaseEstimator):
617
Attributes
618
----------
619
scale_ : ndarray of shape (n_features,) or None
620
- Per feature relative scaling of the data. This is calculated using
621
- `np.sqrt(var_)`. Equal to ``None`` when ``with_std=False``.
+ Per feature relative scaling of the data to achieve zero mean and unit
+ variance. Generally this is calculated using `np.sqrt(var_)`. If a
622
+ variance is zero, we can't achieve unit variance, and the data is left
623
+ as-is, giving a scaling factor of 1. `scale_` is equal to `None`
624
+ when `with_std=False`.
625
626
.. versionadded:: 0.17
627
*scale_*
0 commit comments