evalml.model_understanding.precision_recall_curve(y_true, y_pred_proba, pos_label_idx=- 1)[source]

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

  • y_true (ww.DataColumn, pd.Series or np.ndarray) – True binary labels.

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

  • pos_label_idx (int) – the column index corresponding to the positive class. If predicted probabilities are two-dimensional, this will be used to access the probabilities for the positive class.


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