imblearn.pipeline.Pipeline.fit_transform¶
-
Pipeline.
fit_transform
(X, y=None, **fit_params)[source]¶ Fit the model and transform with the final estimator.
Fits all the transformers/samplers one after the other and transform/sample the data, then uses fit_transform on transformed data with the final estimator.
- Parameters
- Xiterable
Training data. Must fulfill input requirements of first step of the pipeline.
- yiterable, default=None
Training targets. Must fulfill label requirements for all steps of the pipeline.
- **fit_paramsdict of string -> object
Parameters passed to the
fit
method of each step, where each parameter name is prefixed such that parameterp
for steps
has keys__p
.
- Returns
- Xtarray-like of shape (n_samples, n_transformed_features)
Transformed samples.