MCPcopy
hub / github.com/scikit-learn/scikit-learn / fit

Method fit

sklearn/preprocessing/_data.py:2376–2396  ·  view source on GitHub ↗

Only validates estimator's parameters. This method allows to: (i) validate the estimator's parameters and (ii) be consistent with the scikit-learn transformer API. Parameters ---------- X : {array-like, sparse matrix} of shape (n_samples, n_features)

(self, X, y=None)

Source from the content-addressed store, hash-verified

2374
2375 @_fit_context(prefer_skip_nested_validation=True)
2376 def fit(self, X, y=None):
2377 """Only validates estimator's parameters.
2378
2379 This method allows to: (i) validate the estimator's parameters and
2380 (ii) be consistent with the scikit-learn transformer API.
2381
2382 Parameters
2383 ----------
2384 X : {array-like, sparse matrix} of shape (n_samples, n_features)
2385 The data.
2386
2387 y : None
2388 Ignored.
2389
2390 Returns
2391 -------
2392 self : object
2393 Fitted transformer.
2394 """
2395 validate_data(self, X, accept_sparse="csr")
2396 return self
2397
2398 def transform(self, X, copy=None):
2399 """Binarize each element of X.

Calls 1

validate_dataFunction · 0.90