evalml.model_understanding.roc_curve¶
-
evalml.model_understanding.
roc_curve
(y_true, y_pred_proba)[source]¶ Given labels and classifier predicted probabilities, compute and return the data representing a Receiver Operating Characteristic (ROC) curve. Works with binary or multiclass problems.
- Parameters
y_true (pd.Series or np.ndarray) – True labels.
y_pred_proba (pd.Series or np.ndarray) – Predictions from a classifier, before thresholding has been applied.
- Returns
- A list of dictionaries (with one for each class) is returned. Binary classification problems return a list with one dictionary.
- Each dictionary contains metrics used to generate an ROC plot with the following keys:
fpr_rate: False positive rate.
tpr_rate: True positive rate.
threshold: Threshold values used to produce each pair of true/false positive rates.
auc_score: The area under the ROC curve.
- Return type
list(dict)