plot_decision_curve
Note
This page is a reference documentation. It only explains the function signature, and not how to use it. Please refer to the Habitat Guide and Python API guide (v2.0) for usage.
- plot_decision_curve(y_true: ndarray | None = None, y_prob: ndarray | None = None, *, curves: Mapping[str, Tuple[ndarray, ndarray]] | None = None, model_name: str = 'model', title: str = 'Decision Curve', n_thresholds: int = 100)[source]
Decision-curve analysis with Treat-All / Treat-None references.
- Parameters:
y_true – Binary labels for a single series.
y_prob – Positive-class probabilities for a single series.
curves – Optional multi-model overlay panel.
model_name – Legend name when using the single-series form.
title – Figure title (sanitised).
n_thresholds – Number of threshold points on
[0, 1].
- Returns:
The matplotlib
Figure.