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)

Parameters:
xXTensorLike

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

slopeXTensorLike

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

kappaXTensorLike

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

Returns:
XTensorVariable

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).