EventAdditiveEffect#

class pymc_marketing.mmm.additive_effect.EventAdditiveEffect(**data)[source]#

Event effect class for the MMM.

Parameters:
df_eventspd.DataFrame
The DataFrame containing the event data.
  • name: name of the event. Used as the model coordinates.

  • start_date: start date of the event

  • end_date: end date of the event

prefixstr

The prefix to use for the event effect and associated variables.

effectEventEffect

The event effect to apply.

reference_datestr

The arbitrary reference date to calculate distance from events in days. Default is “2025-01-01”.

Methods

EventAdditiveEffect.__init__(**data)

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

EventAdditiveEffect.construct([_fields_set])

EventAdditiveEffect.copy(*[, include, ...])

Returns a copy of the model.

EventAdditiveEffect.create_data(mmm)

Create the required data in the model.

EventAdditiveEffect.create_effect(mmm)

Create the event effect in the model.

EventAdditiveEffect.dict(*[, include, ...])

EventAdditiveEffect.from_orm(obj)

EventAdditiveEffect.json(*[, include, ...])

EventAdditiveEffect.model_construct([...])

Creates a new instance of the Model class with validated data.

EventAdditiveEffect.model_copy(*[, update, deep])

!!! abstract "Usage Documentation"

EventAdditiveEffect.model_dump(*[, mode, ...])

!!! abstract "Usage Documentation"

EventAdditiveEffect.model_dump_json(*[, ...])

!!! abstract "Usage Documentation"

EventAdditiveEffect.model_json_schema([...])

Generates a JSON schema for a model class.

EventAdditiveEffect.model_parametrized_name(params)

Compute the class name for parametrizations of generic classes.

EventAdditiveEffect.model_post_init(context, /)

Post initialization of the model.

EventAdditiveEffect.model_rebuild(*[, ...])

Try to rebuild the pydantic-core schema for the model.

EventAdditiveEffect.model_validate(obj, *[, ...])

Validate a pydantic model instance.

EventAdditiveEffect.model_validate_json(...)

!!! abstract "Usage Documentation"

EventAdditiveEffect.model_validate_strings(obj, *)

Validate the given object with string data against the Pydantic model.

EventAdditiveEffect.parse_file(path, *[, ...])

EventAdditiveEffect.parse_obj(obj)

EventAdditiveEffect.parse_raw(b, *[, ...])

EventAdditiveEffect.schema([by_alias, ...])

EventAdditiveEffect.schema_json(*[, ...])

EventAdditiveEffect.set_data(mmm, model, X)

Set the data for new predictions.

EventAdditiveEffect.update_forward_refs(...)

EventAdditiveEffect.validate(value)

Attributes

end_dates

The end dates of the events.

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.

start_dates

The start dates of the events.

df_events

prefix

effect

reference_date