MediaTransformation#

class pymc_marketing.mmm.media_transformation.MediaTransformation(adstock, saturation, adstock_first, dims=None)[source]#

Wrapper for applying adstock and saturation transformation to media data.

Parameters:
adstockAdstockTransformation

The adstock transformation to apply.

saturationSaturationTransformation

The saturation transformation to apply.

adstock_firstbool

Flag to apply the adstock transformation first.

dimsDims

The dimensions of the parameters.

Attributes:
firstAdstockTransformation | SaturationTransformation

The first transformation to apply.

secondAdstockTransformation | SaturationTransformation

The second transformation to apply.

Methods

MediaTransformation.__init__(adstock, ...[, ...])

MediaTransformation.from_dict(data)

Create a media transformation from a dictionary.

MediaTransformation.to_dict()

Convert the media transformation to a dictionary.

Attributes

dims

adstock

saturation

adstock_first