VariableScaling#
- class pymc_marketing.mmm.scaling.VariableScaling(**data)[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.
- Parameters:
Methods
VariableScaling.__init__(**data)Create a new model by parsing and validating input data from keyword arguments.
VariableScaling.construct([_fields_set])VariableScaling.copy(*[, include, exclude, ...])Returns a copy of the model.
VariableScaling.dict(*[, include, exclude, ...])Reconstruct from a dict via Pydantic model_validate.
VariableScaling.json(*[, include, exclude, ...])Compute the class name for parametrizations of generic classes.
VariableScaling.parse_file(path, *[, ...])VariableScaling.parse_raw(b, *[, ...])Human-readable summary of the scaling strategy (e.g. for logging).
VariableScaling.schema([by_alias, ref_template])VariableScaling.schema_json(*[, by_alias, ...])Serialize to a dict via Pydantic model_dump.
VariableScaling.update_forward_refs(**localns)VariableScaling.validate(value)Attributes
model_computed_fieldsmodel_configConfiguration for the model, should be a dictionary conforming to [
ConfigDict][pydantic.config.ConfigDict].model_extraGet extra fields set during validation.
model_fieldsmodel_fields_setReturns the set of fields that have been explicitly set on this model instance.
dims