Reset internal data-dependent state of the scaler, if necessary. __init__ parameters are not touched.
(self)
| 888 | self.copy = copy |
| 889 | |
| 890 | def _reset(self): |
| 891 | """Reset internal data-dependent state of the scaler, if necessary. |
| 892 | |
| 893 | __init__ parameters are not touched. |
| 894 | """ |
| 895 | # Checking one attribute is enough, because they are all set together |
| 896 | # in partial_fit |
| 897 | if hasattr(self, "scale_"): |
| 898 | del self.scale_ |
| 899 | del self.n_samples_seen_ |
| 900 | del self.mean_ |
| 901 | del self.var_ |
| 902 | |
| 903 | def fit(self, X, y=None, sample_weight=None): |
| 904 | """Compute the mean and std to be used for later scaling. |