precision_recall_curve

precision_recall_curve#

class braintools.visualize.precision_recall_curve(y_true, y_scores, ax=None, figsize=(8, 8), color='blue', title='Precision-Recall Curve', **kwargs)#

Plot Precision-Recall 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