plots.plot_residuals_vs_intervals
plots.plot_residuals_vs_intervals(
y_true,
y_pred,
intervals,
*,
ax=None,
highlight_uncovered=True,
title=None,
figsize=(8, 6),
)Plot residuals compared to interval bounds.
Shows how residuals compare to the interval half-widths, highlighting points that fall outside their intervals.
Parameters
y_true : array-like of shape (n_samples,)-
True target values.
y_pred : array-like of shape (n_samples,)-
Point predictions.
intervals : array-like of shape (n_samples, 2)-
Prediction intervals [lower, upper].
ax : matplotlib.axes.Axes = None-
Axes to plot on. If None, creates new figure.
highlight_uncovered : bool = True-
Whether to highlight points outside intervals.
title : str = None-
Plot title.
figsize : tuple = (8, 6)-
Figure size if creating new figure.
Returns
fig : matplotlib.figure.Figure-
The figure object.
ax : matplotlib.axes.Axes-
The axes object.