MuEffect#

pydantic model pymc_marketing.mmm.additive_effect.MuEffect[source]#

Abstract base class for arbitrary additive mu effects.

All mu_effects must inherit from this Pydantic BaseModel to ensure proper serialization and deserialization when saving/loading MMM models.

Methods

MuEffect.__init__(**data)

Create a new model by parsing and validating input data from keyword arguments.

MuEffect.create_data(mmm)

Create the required data in the model.

MuEffect.create_effect(mmm)

Create the additive effect in the model.

MuEffect.from_dict(data)

Reconstruct from a dict via Pydantic model_validate.

MuEffect.set_data(mmm, model, X)

Set the data for new predictions.

MuEffect.to_dict()

Serialize to a dict via Pydantic model_dump.