Compute the maximum absolute value to be used for later scaling. Parameters ---------- X : {array-like, sparse matrix} of shape (n_samples, n_features) The data used to compute the per-feature minimum and maximum used for later scaling along the featu
(self, X, y=None)
| 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. |
| 1297 | |
| 1298 | Parameters |
| 1299 | ---------- |
| 1300 | X : {array-like, sparse matrix} of shape (n_samples, n_features) |
| 1301 | The data used to compute the per-feature minimum and maximum |
| 1302 | used for later scaling along the features axis. |
| 1303 | |
| 1304 | y : None |
| 1305 | Ignored. |
| 1306 | |
| 1307 | Returns |
| 1308 | ------- |
| 1309 | self : object |
| 1310 | Fitted scaler. |
| 1311 | """ |
| 1312 | # Reset internal state before fitting |
| 1313 | self._reset() |
| 1314 | return self.partial_fit(X, y) |
| 1315 | |
| 1316 | @_fit_context(prefer_skip_nested_validation=True) |
| 1317 | def partial_fit(self, X, y=None): |