evalml.pipelines.precision_recall_curve

evalml.pipelines.precision_recall_curve(y_true, y_pred_proba)[source]

Given labels and binary classifier predicted probabilities, compute and return the data representing a precision-recall curve.

Parameters
  • y_true (pd.Series or np.array) – true binary labels.

  • y_pred_proba (pd.Series or np.array) – predictions from a binary classifier, before thresholding has been applied. Note this should be the predicted probability for the “true” label.

Returns

Dictionary containing metrics used to generate a precision-recall plot, with the following keys:

  • precision: Precision values.

  • recall: Recall values.

  • thresholds: Threshold values used to produce the precision and recall.

  • auc_score: The area under the ROC curve.

Return type

list