binary_classification_pipeline_mixin

Binary classification pipeline mix-in class.

Module Contents

Classes Summary

BinaryClassificationPipelineMixin

Binary classification pipeline mix-in class.

Contents

class evalml.pipelines.binary_classification_pipeline_mixin.BinaryClassificationPipelineMixin[source]

Binary classification pipeline mix-in class.

Methods

optimize_threshold

Optimize the pipeline threshold given the objective to use. Only used for binary problems with objectives whose thresholds can be tuned.

threshold

Threshold used to make a prediction. Defaults to None.

optimize_threshold(self, X, y, y_pred_proba, objective)[source]

Optimize the pipeline threshold given the objective to use. Only used for binary problems with objectives whose thresholds can be tuned.

Parameters
  • X (pd.DataFrame) – Input features.

  • y (pd.Series) – Input target values.

  • y_pred_proba (pd.Series) – The predicted probabilities of the target outputted by the pipeline.

  • objective (ObjectiveBase) – The objective to threshold with. Must have a tunable threshold.

Raises

ValueError – If objective is not optimizable.

property threshold(self)

Threshold used to make a prediction. Defaults to None.