Looking for usage documentation? Check out Predictive distribution.
plot_regression_distribution
</> View source ↗plot_regression_distribution(
prediction: FullOutputDict,
*,
sample_idx: int = 0,
statistics: Sequence[str] = ("mean", "median", "mode"),
quantile_interval: tuple[float, float] | None = (0.1, 0.9),
zoom_quantile: float | None = 0.99,
smooth: float = 0.005,
ax: plt.Axes | None = None,
color: str = "#1f77b4",
) -> plt.Axes
| Parameter | Type | Default | Description |
|---|---|---|---|
prediction | Full | Required | Output of regressor.predict(X, output_type="full"). It may hold several samples; pick the one to plot with sample_idx. |
sample_ | int | 0 | Index of the sample to plot within prediction. |
statistics | Sequence[str] | ("mean", "median", "mode") | Point statistics to mark with a vertical line. Any of "mean", "median", "mode". |
quantile_ | tuple[float, float] | None | (0.1, 0.9) | Central interval to shade, e.g. (0.1, 0.9) for the 80% interval. Pass None to disable. |
zoom_ | float | None | 0.99 | Fraction of probability mass to keep in view, centred on the median. Pass None to show the full support. |
smooth | float | 0.005 | Width of the display-only moving average over the density, as a fraction of the number of bars. Pass 0 to show the raw bar density. |
ax | plt.Axes | None | None | Existing axes to draw on. A new figure is created if omitted. |
color | str | "#1f77b4" | Base colour of the density curve. |
| Type | Description |
|---|---|
plt.Axes | The matplotlib axes containing the plot. |