(self, X, y=None, sample_weight=None)
return self.steps[-1][-1].score(Xt, yr, **score_params)
Apply transformers/samplers, and score with the final estimator

        Parameters
        ----------
        X : iterable
            Data to predict on. Must fulfill input requirements of first step
            of the pipeline.

        y : iterable or None, default: ``None``
            Targets used for scoring. Must fulfill label requirements for all
            steps of the pipeline.

        sample_weight : array-like or None, default: ``None``
            If not None, this argument is passed as ``sample_weight`` keyword
            argument to the ``score`` method of the final estimator.

        Returns
        -------
        score : float
Apply transformers/samplers, and score with the final estimator
Apply transformers / samplers and score with the final estimator
def score(self, X, y=None, sample_weight=None):
        """Apply transformers/samplers, and score with the final estimator

        Parameters
        ----------
        X : iterable
            Data to predict on. Must fulfill input requirements of first step
            of the pipeline.

        y : iterable or None, default: ``None``
            Targets used for scoring. Must fulfill label requirements for all
            steps of the pipeline.

        sample_weight : array-like or None, default: ``None``
            If not None, this argument is passed as ``sample_weight`` keyword
            argument to the ``score`` method of the final estimator.

        Returns
        -------
        score : float
        """
        Xt, yr = X, y
        for _, _, transform in self._iter(with_final=False):
            if (hasattr(transform, "transform_resample")):
                Xt, yr = transform.transform_resample(Xt, yr)
            else:
                Xt = transform.transform(Xt)

        score_params = {}
        if sample_weight is not None:
            score_params['sample_weight'] = sample_weight
        return self.steps[-1][-1].score(Xt, yr, **score_params)
def score ( self , X , y = None , sample_weight = None ) : Xt , yr = X , y for _ , _ , transform in self . _iter ( with_final = False ) : if ( hasattr ( transform , "transform_resample" ) ) : Xt , yr = transform . transform_resample ( Xt , yr ) else : Xt = transform . transform ( Xt ) score_params = { } if sample_weight is not None : score_params [ 'sample_weight' ] = sample_weight return self . steps [ - 1 ] [ - 1 ] . score ( Xt , yr , * * score_params )