File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -81,6 +81,18 @@ class Pipeline(pipeline.Pipeline):
8181 -----
8282 See :ref:`sphx_glr_auto_examples_pipeline_plot_pipeline_classification.py`
8383
84+ .. warning::
85+ A surprising behaviour of the `imbalanced-learn` pipeline is that it
86+ breaks the `scikit-learn` contract where one expects
87+ `estimmator.fit_transform(X, y)` to be equivalent to
88+ `estimator.fit(X, y).transform(X)`.
89+
90+ The semantic of `fit_resample` is to be applied only during the fit
91+ stage. Therefore, resampling will happen when calling `fit_transform`
92+ while it will only happen on the `fit` stage when calling `fit` and
93+ `transform` separately. Practically, `fit_transform` will lead to a
94+ resampled dataset while `fit` and `transform` will not.
95+
8496 Examples
8597 --------
8698 >>> from collections import Counter
You can’t perform that action at this time.
0 commit comments