MMMBuilder.build_model#

MMMBuilder.build_model(X, y)[source]#

Build and return an MMM instance.

Parameters:
Xpd.DataFrame

Feature matrix containing the date column and predictor variables.

ypd.Series

Target variable.

Returns:
object

An MMM instance with fit, sample_posterior_predictive, and idata attributes. The returned object should be ready for fitting with the provided data.

Notes

The returned MMM instance must support the following interface:

  • fit(X, y, progressbar=True): Fit the model to data.

  • sample_posterior_predictive(X, ...): Generate predictions.

  • idata: ArviZ InferenceData attribute containing posterior samples.

  • sampler_config: Optional attribute for sampler configuration.