MMMIdataSchema.from_model_config#

classmethod MMMIdataSchema.from_model_config(custom_dims=(), has_controls=False, has_seasonality=False, time_varying=False)[source]#

Create schema based on model configuration.

Parameters:
custom_dimstuple of str, default ()

Custom dimensions (e.g., (“country”, “region”))

has_controlsbool, default False

Whether model includes control variables

has_seasonalitybool, default False

Whether model includes yearly seasonality

time_varyingbool, default False

Whether model has time-varying effects

Returns:
MMMIdataSchema

Schema configured for this model type

Examples

>>> # Basic MMM with no extras
>>> schema = MMMIdataSchema.from_model_config()
>>>
>>> # MMM with controls and custom dimensions
>>> schema = MMMIdataSchema.from_model_config(
...     custom_dims=("country",),
...     has_controls=True,
... )