MuEffect#

class pymc_marketing.mmm.additive_effect.MuEffect(**data)[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.construct([_fields_set])

MuEffect.copy(*[, include, exclude, update, ...])

Returns a copy of the model.

MuEffect.create_data(mmm)

Create the required data in the model.

MuEffect.create_effect(mmm)

Create the additive effect in the model.

MuEffect.dict(*[, include, exclude, ...])

MuEffect.from_dict(data)

Reconstruct from a dict via Pydantic model_validate.

MuEffect.from_orm(obj)

MuEffect.json(*[, include, exclude, ...])

MuEffect.model_parametrized_name(params)

Compute the class name for parametrizations of generic classes.

MuEffect.parse_file(path, *[, content_type, ...])

MuEffect.parse_obj(obj)

MuEffect.parse_raw(b, *[, content_type, ...])

MuEffect.schema([by_alias, ref_template])

MuEffect.schema_json(*[, by_alias, ref_template])

MuEffect.set_data(mmm, model, X)

Set the data for new predictions.

MuEffect.to_dict()

Serialize to a dict via Pydantic model_dump.

MuEffect.update_forward_refs(**localns)

MuEffect.validate(value)

Attributes

model_computed_fields

model_config

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_extra

Get extra fields set during validation.

model_fields

model_fields_set

Returns the set of fields that have been explicitly set on this model instance.