'Applies fit_predict of last step in pipeline after transforms.
Applies fit_transforms of a pipeline to the data, followed by the
fit_predict method of the final estimator in the pipeline. Valid
only if the final estimator implements fit_predict.
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 ``fit`` method of each step, where
each parameter name is prefixed such that parameter ``p`` for step
``s`` has key ``s__p``.
Returns
y_pred : array-like'

@if_delegate_has_method(delegate='_final_estimator')
def fit_predict(self, X, y=None, **fit_params):

    (Xt, fit_params) = self._fit(X, y, **fit_params)
    return self.steps[(-1)][(-1)].fit_predict(Xt, y, **fit_params)
