delayed_adstock#

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

Delayed adstock transformation.

This transformation is similar to geometric adstock transformation, but it allows for a delayed peak of the effect. The peak is assumed to occur at theta.

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

../../_images/pymc_marketing-mmm-transformers-delayed_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.

  • theta (float, by default 0) – Delay of the peak effect. Must be between 0 and l_max - 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