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
)- Parameters:
- x
float
or array_like The independent variable, typically representing the concentration of a substrate or the intensity of a stimulus.
- sigma
float
The upper asymptote of the curve, representing the approximate maximum value the function will approach as x grows large. The true maximum value is at
sigma * (1 - 1 / (1 + exp(beta * lam)))
- beta
float
The slope parameter, determining the steepness of the curve.
- lam
float
The x-value of the midpoint where the curve transitions from exponential growth to saturation.
- x
- Returns:
float
or array_likeThe value of the Hill saturation sigmoid function for each input value of x.