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.
Create the additive effect in the model.
MuEffect.dict
(*[, include, exclude, ...])MuEffect.from_orm
(obj)MuEffect.json
(*[, include, exclude, ...])MuEffect.model_construct
([_fields_set])Creates a new instance of the
Model
class with validated data.MuEffect.model_copy
(*[, update, deep])!!! abstract "Usage Documentation"
MuEffect.model_dump
(*[, mode, include, ...])!!! abstract "Usage Documentation"
MuEffect.model_dump_json
(*[, indent, ...])!!! abstract "Usage Documentation"
MuEffect.model_json_schema
([by_alias, ...])Generates a JSON schema for a model class.
MuEffect.model_parametrized_name
(params)Compute the class name for parametrizations of generic classes.
MuEffect.model_post_init
(context, /)Override this method to perform additional initialization after
__init__
andmodel_construct
.MuEffect.model_rebuild
(*[, force, ...])Try to rebuild the pydantic-core schema for the model.
MuEffect.model_validate
(obj, *[, strict, ...])Validate a pydantic model instance.
MuEffect.model_validate_json
(json_data, *[, ...])!!! abstract "Usage Documentation"
MuEffect.model_validate_strings
(obj, *[, ...])Validate the given object with string data against the Pydantic model.
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.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.