plots.plot_conformal_coverage_vs_confidence

plots.plot_conformal_coverage_vs_confidence(
    calibration_scores,
    probs_test,
    y_test,
    alphas=None,
)

Plot coverage and uncertainty metrics for conformal prediction using a stacked area chart.

Parameters

calibration_scores : array-like of shape (n_samples,)

Nonconformity scores from the calibration set.

probs_test : array-like of shape (n_samples, n_classes)

Predicted probabilities for the test set.

y_test : array-like of shape (n_samples,)

True labels for the test set.

alphas : array - like = None

List of alpha values to evaluate. Defaults to np.arange(0.01, 0.61, 0.01).

Returns

fig : matplotlib.figure.Figure

The figure object.

ax : matplotlib.axes.Axes

The axes object.