evalml.pipelines.BinaryClassificationPipeline.optimize_threshold

BinaryClassificationPipeline.optimize_threshold(X, y, y_pred_proba, objective)

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.