MMMCVPlotSuite#

class pymc_marketing.mmm.plotting.cv.MMMCVPlotSuite(cv_data)[source]#

PlotCollection-native plots for TimeSliceCrossValidator results.

Parameters:

cv_data (DataTree) – Combined DataTree produced by TimeSliceCrossValidator.run(). Must contain a cv_metadata group with per-fold metadata.

Notes

predictions() and crps() draw posterior_predictive["y_original_scale"], the predictive draws of the target on the original scale, which TimeSliceCrossValidator.run() provides for every fold fitted with the library’s MMM, under both link functions. See MMMCVSummaryFactory for how this differs from the noise-free posterior["mu_original_scale"].

Methods

MMMCVPlotSuite.__init__(cv_data)

MMMCVPlotSuite.crps([cv_data, dims, ...])

Line chart of mean CRPS per fold for train and test splits.

MMMCVPlotSuite.param_stability([cv_data, ...])

Forest plot comparing parameter posteriors across all CV folds.

MMMCVPlotSuite.predictions([cv_data, dims, ...])

Posterior predictive HDI bands per CV fold.

Attributes

MMMCVPlotSuite.summary

Summary factory for CV results (parallel to plot methods).