tanh_saturation#

pymc_marketing.mmm.transformers.tanh_saturation(x, b=0.5, c=0.5)[source]#

Tanh saturation transformation.

\[f(x) = b \tanh \left( \frac{x}{bc} \right)\]

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

../../_images/pymc_marketing-mmm-transformers-tanh_saturation-1.png
Parameters:
xtensor

Input tensor.

bfloat, by default 0.5

Number of users at saturation. Must be non-negative.

cfloat, by default 0.5

Initial cost per user. Must be non-zero.

Returns:
tensor

Transformed tensor.

References

See https://www.pymc-labs.io/blog-posts/reducing-customer-acquisition-costs-how-we-helped-optimizing-hellofreshs-marketing-budget/ # noqa: E501