plot_calibration
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_calibration(y_true: ndarray | None = None, y_prob: ndarray | None = None, *, curves: Mapping[str, Tuple[ndarray, ndarray]] | None = None, model_name: str = 'model', title: str = 'Calibration', n_bins: int = 10)[source]
Reliability diagram (calibration curve) against the identity line.
- 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_bins – Number of probability bins.
- Returns:
The matplotlib
Figure.