DiagnosticsPlots#
- class pymc_marketing.mmm.plotting.diagnostics.DiagnosticsPlots(data)[source]#
Time-series diagnostic plots for fitted MMM models.
Provides six methods to visualize model fit and residuals:
posterior_predictive— Posterior predictive time series with HDI.prior_predictive— Prior predictive time series with HDI.residuals— Residuals (target − predictions) over time.residuals_distribution— Posterior distribution of residuals.posterior— 1-D marginal KDE distributions of posterior variables.prior_vs_posterior— Overlaid prior and posterior KDE distributions.
- Parameters:
- data
MMMIDataWrapper Validated wrapper around the fitted model’s InferenceData.
- data
Methods
DiagnosticsPlots.posterior([var_names, ...])Plot 1-D marginal KDE distributions for one or more posterior variables.
Plot time series from the posterior predictive distribution.
Plot time series from the prior predictive distribution.
Overlay prior and posterior 1-D marginal KDE distributions.
Plot the posterior distribution of residuals using arviz-plots.
Plot residuals (target − posterior predictions) over time.