sklearn.base.TransformerMixin

class sklearn.base.TransformerMixin[source]

Mixin class for all transformers in scikit-learn.

Methods

fit_transform(self, X[, y])

Fit to data, then transform it.

__init__(self, /, *args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

fit_transform(self, X, y=None, **fit_params)[source]

Fit to data, then transform it.

Fits transformer to X and y with optional parameters fit_params and returns a transformed version of X.

Parameters
Xnumpy array of shape [n_samples, n_features]

Training set.

ynumpy array of shape [n_samples]

Target values.

**fit_paramsdict

Additional fit parameters.

Returns
X_newnumpy array of shape [n_samples, n_features_new]

Transformed array.