MCPcopy Index your code
hub / github.com/scikit-learn/scikit-learn / fit

Method fit

sklearn/preprocessing/_data.py:1295–1314  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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):

Callers 2

test_maxabs_scaler_1dFunction · 0.95

Calls 2

_resetMethod · 0.95
partial_fitMethod · 0.95

Tested by 2

test_maxabs_scaler_1dFunction · 0.76