(self, X, y=None, **fit_params)
Fit the model and sample with the final estimator.

        Fits all the transformers/samplers one after the other and
        transform/sample the data, then uses fit_resample on transformed
        data with the final estimator.

        Parameters
        ----------
        X : iterable
            Training data. Must fulfill input requirements of first step of the
            pipeline.

        y : iterable, default: ``None``
            Training targets. Must fulfill label requirements for all steps of
            the pipeline.

        **fit_params : dict of string -> object
            Parameters passed to the :meth:`fit` method of each step, where
            each parameter name is prefixed such that parameter ``p`` for step
            ``s`` has key ``s__p``.

        Returns
        -------
        Xt : array-like, shape (n_samples, n_transformed_features)
            Transformed samples.

        yr : array-like, shape (n_samples, n_transformed_features)
            Transformed target.
Fit the model and sample with the final estimator.
Fit the model and sample with the final estimator .
def fit_transform_resample(self, X, y=None, **fit_params):
        """Fit the model and sample with the final estimator.

        Fits all the transformers/samplers one after the other and
        transform/sample the data, then uses fit_resample on transformed
        data with the final estimator.

        Parameters
        ----------
        X : iterable
            Training data. Must fulfill input requirements of first step of the
            pipeline.

        y : iterable, default: ``None``
            Training targets. Must fulfill label requirements for all steps of
            the pipeline.

        **fit_params : dict of string -> object
            Parameters passed to the :meth:`fit` method of each step, where
            each parameter name is prefixed such that parameter ``p`` for step
            ``s`` has key ``s__p``.

        Returns
        -------
        Xt : array-like, shape (n_samples, n_transformed_features)
            Transformed samples.

        yr : array-like, shape (n_samples, n_transformed_features)
            Transformed target.
        """
        last_step = self._final_estimator
        Xt, yr, fit_params = self._fit(X, y, **fit_params)
        if last_step == 'passthrough':
            return Xt, yr
        elif hasattr(last_step, 'fit_transform_resample'):
            return last_step.fit_transform_resample(Xt, yr, **fit_params)
        elif hasattr(last_step, 'fit_transform'):
            return last_step.fit_transform(Xt, yr, **fit_params), yr
def fit_transform_resample ( self , X , y = None , * * fit_params ) : last_step = self . _final_estimator Xt , yr , fit_params = self . _fit ( X , y , * * fit_params ) if last_step == 'passthrough' : return Xt , yr elif hasattr ( last_step , 'fit_transform_resample' ) : return last_step . fit_transform_resample ( Xt , yr , * * fit_params ) elif hasattr ( last_step , 'fit_transform' ) : return last_step . fit_transform ( Xt , yr , * * fit_params ) , yr