evalml.objectives.BinaryClassificationObjective.optimize_threshold

BinaryClassificationObjective.optimize_threshold(ypred_proba, y_true, X=None)[source]

Learn a binary classification threshold which optimizes the current objective.

Parameters
  • ypred_proba (pd.Series) – The classifier’s predicted probabilities

  • y_true (pd.Series) – The ground truth for the predictions.

  • X (pd.DataFrame, optional) – Any extra columns that are needed from training data.

Returns

Optimal threshold for this objective