depictr.threshold_plot#

depictr.threshold_plot(y_true, y_score, title=None)#

Sensitivity, specificity, precision and F1 across the decision threshold.

Sweeps the probability cut-off and plots each metric, so the trade-off when choosing an operating point is visible at a glance.

Parameters:
  • y_true (array-like) – Binary outcomes (0/1).

  • y_score (array-like) – Predicted scores or probabilities for the positive class.

  • title (str, optional)

Return type:

plotnine.ggplot