hill_function#

pymc_marketing.mmm.transformers.hill_function(x, slope, kappa)[source]#

Hill Function.

\[f(x) = 1 - \frac{\kappa^s}{\kappa^s + x^s}\]
where:
  • \(s\) is the slope of the hill.

  • \(\kappa\) is the half-saturation point as \(f(\kappa) = 0.5\) for any value of \(s\) and \(\kappa\).

  • \(x\) is the independent variable and must be non-negative.

Hill function from Equation (5) in the paper [1].

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

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

(png, hires.png, pdf)

../../_images/pymc_marketing-mmm-transformers-hill_function-1_01_00.png
Parameters:
xfloat or array_like

The independent variable, typically representing the concentration of a substrate or the intensity of a stimulus.

slopefloat

The slope of the hill. Must pe non-positive.

kappafloat

The half-saturation point as \(f(\kappa) = 0.5\) for any value of \(s\) and \(\kappa\).

Returns:
float

The value of the Hill function given the parameters.

References

[1]

Jin, Yuxue, et al. “Bayesian methods for media mix modeling with carryover and shape effects.” (2017).