geometric_adstock#

pymc_marketing.mmm.transformers.geometric_adstock(x, alpha=0.0, l_max=12, normalize=False, axis=0)[source]#

Geometric adstock transformation.

Adstock with geometric decay assumes advertising effect peaks at the same time period as ad exposure. The cumulative media effect is a weighted average of media spend in the current time-period (e.g. week) and previous l_max - 1 periods (e.g. weeks). l_max is the maximum duration of carryover effect.

(Source code, png, hires.png, pdf)

../../_images/pymc_marketing-mmm-transformers-geometric_adstock-1.png
Parameters:
  • x (tensor) – Input tensor.

  • alpha (float, by default 0.0) – Retention rate of ad effect. Must be between 0 and 1.

  • l_max (int, by default 12) – Maximum duration of carryover effect.

  • normalize (bool, by default False) – Whether to normalize the weights.

Returns:

Transformed tensor.

Return type:

tensor

References