dilimap.pl.roc_curve
- dilimap.pl.roc_curve(y_true, y_pred, threshold_points=None, threshold_name=None, color='brown', label=None, axvline=None, inverse=False, show=True)
Plots a ROC curve with optional threshold annotations.
- Parameters:
y_true (array) – Ground truth binary labels.
y_pred (array) – Predicted probabilities or scores.
threshold_points (list) – A list of threshold values to annotate on the ROC curve.
threshold_name (str) – The label to use for the threshold in annotations (default is ‘cutoff’).
color (str) – Color of the ROC curve line (default is ‘brown’).
label (str) – Custom label for the ROC curve (default is ‘ROC curve’).
inverse (bool) – If True, inverts the y_pred scores (useful if higher values indicate negative class).
show (bool) – If True, displays the plot. If False, suppresses the plot display.
- Returns:
Displays the ROC curve.