rb_decay(x, y, b=0.5)[source]#

Get base of exponential decay function which is assumed to be close to 1.

This assumes following model:

\[y(x) = a \alpha^x + b.\]

To estimate the base of decay function \(\alpha\), we consider

\[y'(x) = y(x) - b = a \alpha^x,\]

and thus,

\[y'(x+dx) = a \alpha^x \alpha^dx.\]

By considering the ratio of y values at \(x+dx\) to \(x\),

\[ry = \frac{a \alpha^x \alpha^dx}{a \alpha^x} = \alpha^dx.\]

From this relationship, we can estimate \(\alpha\) as

\[\alpha = ry^\frac{1}{dx}.\]
  • x (ndarray) – Array of x values.

  • y (ndarray) – Array of y values.

  • b (float) – Asymptote of decay function.


Base of decay function.

Return type: