roc_curve

Contents

roc_curve#

class braintools.visualize.roc_curve(y_true, y_scores, ax=None, figsize=(8, 8), color='blue', title='ROC Curve', **kwargs)#

Plot ROC (Receiver Operating Characteristic) curve.

Parameters:
  • y_true (ndarray) – True binary labels.

  • y_scores (ndarray) – Prediction scores.

  • ax (Axes | None) – Axes to plot on.

  • figsize (Tuple[float, float]) – Figure size if creating new figure.

  • color (str) – Line color.

  • title (str) – Plot title.

  • **kwargs – Additional arguments passed to plot.

Returns:

ax – The axes object containing the plot.

Return type:

Axes