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
)- Parameters:
x (tensor) – Input tensor.
b (float, by default 0.5) – Number of users at saturation. Must be non-negative.
c (float, by default 0.5) – Initial cost per user. Must be non-zero.
- Returns:
Transformed tensor.
- Return type:
tensor
References
See https://www.pymc-labs.io/blog-posts/reducing-customer-acquisition-costs-how-we-helped-optimizing-hellofreshs-marketing-budget/ # noqa: E501