hill_saturation_sigmoid#

pymc_marketing.mmm.transformers.hill_saturation_sigmoid(x, sigma, beta, lam)[source]#

Hill Saturation Sigmoid Function.

\[f(x) = \frac{\sigma}{1 + e^{-\beta(x - \lambda)}} - \frac{\sigma}{1 + e^{\beta\lambda}}\]
where:
  • \(\sigma\) is the upper asymptote

  • \(\beta\) is the slope parameter

  • \(\lambda\) is the transition point on the X-axis

  • \(x\) is the independent variable

This function computes the Hill sigmoidal response curve, which is commonly used to describe the saturation effect in biological systems. The curve is characterized by its sigmoidal shape, representing a gradual transition from a low, nearly zero level to a high plateau, the maximum value the function will approach as the independent variable grows large. In this implementation, we add an offset to the sigmoid function to ensure that the function always passes through the origin as we expect zero spend to result in zero contribution.

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

../../_images/pymc_marketing-mmm-transformers-hill_saturation_sigmoid-1_00_00.png

(png, hires.png, pdf)

../../_images/pymc_marketing-mmm-transformers-hill_saturation_sigmoid-1_01_00.png

(png, hires.png, pdf)

../../_images/pymc_marketing-mmm-transformers-hill_saturation_sigmoid-1_02_00.png
Parameters:
Return type:

float or array_like

Returns:

The value of the Hill saturation sigmoid function for each input value of x.