MMMPlotSuite.posterior_predictive#
- MMMPlotSuite.posterior_predictive(var=None, idata=None)[source]#
Plot time series from the posterior predictive distribution.
By default, if both
var
andidata
are not provided, usesself.idata.posterior_predictive
and defaults the variable to["y"]
.- Parameters:
- var
list
ofstr
, optional A list of variable names to plot. Default is [“y”] if not provided.
- idata
xarray.Dataset
, optional The posterior predictive dataset to plot. If not provided, tries to use
self.idata.posterior_predictive
.
- var
- Returns:
- fig
matplotlib.figure.Figure
The Figure object containing the subplots.
- axes
np.ndarray
ofmatplotlib.axes.Axes
Array of Axes objects corresponding to each subplot row.
- fig
- Raises:
ValueError
If no
idata
is provided andself.idata.posterior_predictive
does not exist, instructing the user to runMMM.sample_posterior_predictive()
.