dtoolkit.pipeline.Pipeline.score#

Pipeline.score(X, y=None, sample_weight=None, **params)#

Transform the data, and apply score with the final estimator.

Call transform of each transformer in the pipeline. The transformed data are finally passed to the final estimator that calls score method. Only valid if the final estimator implements score.

Parameters:
Xiterable

Data to predict on. Must fulfill input requirements of first step of the pipeline.

yiterable, default=None

Targets used for scoring. Must fulfill label requirements for all steps of the pipeline.

sample_weightarray-like, default=None

If not None, this argument is passed as sample_weight keyword argument to the score method of the final estimator.

**paramsdict of str -> object

Parameters requested and accepted by steps. Each step must have requested certain metadata for these parameters to be forwarded to them.

New in version 1.4: Only available if enable_metadata_routing=True. See Metadata Routing User Guide for more details.

Returns:
scorefloat

Result of calling score on the final estimator.