VariableScaling#

pydantic model pymc_marketing.mmm.scaling.VariableScaling[source]#

Abstract base for scaling a variable.

The scaling through the dimension of 'date' is assumed and doesn’t need to be specified.

Concrete subclasses:

  • DataDerivedScaling – scale by a statistic of the data ("max" or "mean"), computed at fit time.

  • FixedScaling – use a user-supplied constant that stays the same across model refreshes.

Methods

VariableScaling.__init__(**data)

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

VariableScaling.from_dict(data)

Reconstruct from a dict via Pydantic model_validate.

VariableScaling.scaling_description()

Human-readable summary of the scaling strategy (e.g. for logging).

VariableScaling.to_dict()

Serialize to a dict via Pydantic model_dump.

field dims: str | tuple[str, ...] [Required][source]#

The dimensions to perform the operation through ("date" is always included implicitly).