MMMPlotSuite#
- class pymc_marketing.mmm.plot.MMMPlotSuite(idata)[source]#
Media Mix Model Plot Suite.
Provides methods for visualizing the posterior predictive distribution, contributions over time, and saturation curves for a Media Mix Model.
Methods
MMMPlotSuite.__init__(idata)MMMPlotSuite.allocated_contribution_by_channel_over_time(samples)Plot the allocated contribution by channel with uncertainty intervals.
MMMPlotSuite.budget_allocation(samples[, ...])Plot the budget allocation and channel contributions.
Plot the share of channel contributions in a forest plot.
MMMPlotSuite.channel_parameter(param_name[, ...])Plot the posterior distribution of a channel parameter using violin plots.
MMMPlotSuite.contributions_over_time(var[, ...])Plot the time-series contributions for each variable in
var.MMMPlotSuite.cv_crps(results[, dims])Plot CRPS scores for train and test sets across CV splits.
MMMPlotSuite.cv_predictions(results[, dims])Plot posterior predictive predictions across CV folds.
MMMPlotSuite.marginal_curve([hdi_prob, ax, ...])Plot precomputed marginal effects stored under
idata.sensitivity_analysis['marginal_effects'].MMMPlotSuite.param_stability(results, parameter)Plot parameter stability across CV iterations.
MMMPlotSuite.posterior_distribution(var[, ...])Plot the posterior distribution of a variable across a specified dimension.
MMMPlotSuite.posterior_predictive([var, ...])Plot time series from the posterior predictive distribution.
MMMPlotSuite.prior_predictive([var, idata, ...])Plot time series from the posterior predictive distribution.
MMMPlotSuite.prior_vs_posterior(var[, ...])Plot the prior vs posterior distribution for a variable across a dimension.
MMMPlotSuite.residuals_over_time([hdi_prob])Plot residuals over time by taking the difference between true values and predicted.
Plot the posterior distribution of residuals.
MMMPlotSuite.saturation_curves(curve[, ...])Overlay saturation‑curve scatter‑plots with posterior‑predictive sample curves and HDI bands.
Plot scatter plots of channel contributions vs. channel data.
Plot the saturation curves for each channel.
Plot sensitivity analysis results.
MMMPlotSuite.uplift_curve([hdi_prob, ax, ...])Plot precomputed uplift curves stored under
idata.sensitivity_analysis['uplift_curve'].Create a waterfall plot showing the decomposition of the target into its components.