CustomModelWrapper#
- class pymc_marketing.mmm.budget_optimizer.CustomModelWrapper(base_model, idata, channels)[source]#
Wrapper for the BudgetOptimizer to handle custom PyMC models.
Methods
CustomModelWrapper.__init__
(base_model, ...)Create a new model by parsing and validating input data from keyword arguments.
CustomModelWrapper.construct
([_fields_set])CustomModelWrapper.copy
(*[, include, ...])Returns a copy of the model.
CustomModelWrapper.dict
(*[, include, ...])CustomModelWrapper.json
(*[, include, ...])CustomModelWrapper.model_construct
([_fields_set])Creates a new instance of the
Model
class with validated data.CustomModelWrapper.model_copy
(*[, update, deep])!!! abstract "Usage Documentation"
CustomModelWrapper.model_dump
(*[, mode, ...])!!! abstract "Usage Documentation"
CustomModelWrapper.model_dump_json
(*[, ...])!!! abstract "Usage Documentation"
Generates a JSON schema for a model class.
Compute the class name for parametrizations of generic classes.
CustomModelWrapper.model_post_init
(context, /)This function is meant to behave like a BaseModel method to initialise private attributes.
CustomModelWrapper.model_rebuild
(*[, force, ...])Try to rebuild the pydantic-core schema for the model.
CustomModelWrapper.model_validate
(obj, *[, ...])Validate a pydantic model instance.
!!! abstract "Usage Documentation"
Validate the given object with string data against the Pydantic model.
CustomModelWrapper.parse_file
(path, *[, ...])CustomModelWrapper.parse_raw
(b, *[, ...])CustomModelWrapper.schema
([by_alias, ...])CustomModelWrapper.schema_json
(*[, ...])CustomModelWrapper.update_forward_refs
(**localns)CustomModelWrapper.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.
base_model
idata
channel_columns
adstock