evalml.pipelines.roc_curve

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

Given labels and binary classifier predicted probabilities, compute and return the data representing a Receiver Operating Characteristic (ROC) 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 an ROC plot, with the following keys:
  • fpr_rates: False positive rates.

  • tpr_rates: True positive rates.

  • thresholds: Threshold values used to produce each pair of true/false positive rates.

  • auc_score: The area under the ROC curve.

Return type

dict