Reset internal data-dependent state of the scaler, if necessary. __init__ parameters are not touched.
(self)
| 1281 | self.clip = clip |
| 1282 | |
| 1283 | def _reset(self): |
| 1284 | """Reset internal data-dependent state of the scaler, if necessary. |
| 1285 | |
| 1286 | __init__ parameters are not touched. |
| 1287 | """ |
| 1288 | # Checking one attribute is enough, because they are all set together |
| 1289 | # in partial_fit |
| 1290 | if hasattr(self, "scale_"): |
| 1291 | del self.scale_ |
| 1292 | del self.n_samples_seen_ |
| 1293 | del self.max_abs_ |
| 1294 | |
| 1295 | def fit(self, X, y=None): |
| 1296 | """Compute the maximum absolute value to be used for later scaling. |