plots.plot_prediction_intervals
plots.plot_prediction_intervals(
y_true,
intervals,
*,
y_pred=None,
ax=None,
sort_by='y_true',
max_samples=100,
title=None,
figsize=(12, 6),
)Plot prediction intervals with true values.
Parameters
y_true : array-like of shape (n_samples,)-
True target values.
intervals : array-like of shape (n_samples, 2)-
Prediction intervals [lower, upper].
y_pred : array-like of shape (n_samples,) = None-
Point predictions. If None, uses interval midpoints.
ax : matplotlib.axes.Axes = None-
Axes to plot on. If None, creates new figure.
sort_by : (y_true, y_pred, width, none) = 'y_true'-
How to sort samples for display.
max_samples : int = 100-
Maximum samples to display. If None, shows all.
title : str = None-
Plot title. If None, auto-generates with coverage.
figsize : tuple = (12, 6)-
Figure size if creating new figure.
Returns
fig : matplotlib.figure.Figure-
The figure object.
ax : matplotlib.axes.Axes-
The axes object.