@@ -885,9 +885,9 @@ class RobustScaler(BaseEstimator, TransformerMixin):
885
885
and the 3rd quartile (75th quantile).
886
886
887
887
Centering and scaling happen independently on each feature (or each
888
- sample, depending on the `axis` argument) by computing the relevant
888
+ sample, depending on the `` axis` ` argument) by computing the relevant
889
889
statistics on the samples in the training set. Median and interquartile
890
- range are then stored to be used on later data using the `transform`
890
+ range are then stored to be used on later data using the `` transform` `
891
891
method.
892
892
893
893
Standardization of a dataset is a common requirement for many
@@ -904,7 +904,7 @@ class RobustScaler(BaseEstimator, TransformerMixin):
904
904
----------
905
905
with_centering : boolean, True by default
906
906
If True, center the data before scaling.
907
- This does not work (and will raise an exception) when attempted on
907
+ This will cause ``transform`` to raise an exception when attempted on
908
908
sparse matrices, because centering them entails building a dense
909
909
matrix which in common use cases is likely to be too large to fit in
910
910
memory.
@@ -999,7 +999,10 @@ def fit(self, X, y=None):
999
999
return self
1000
1000
1001
1001
def transform (self , X , y = None ):
1002
- """Center and scale the data
1002
+ """Center and scale the data.
1003
+
1004
+ Can be called on sparse input, provided that ``RobustScaler`` has been
1005
+ fitted to dense input and ``with_centering=False``.
1003
1006
1004
1007
Parameters
1005
1008
----------
0 commit comments