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