Reverse Box-Cox transformation

SciPy has added an inverse Box-Cox transformation.

https://docs.scipy.org/doc/scipy/reference/generated/scipy.special.inv_boxcox.html

scipy.special.inv_boxcox
scipy.special.inv_boxcox(y, lmbda) =

Compute the inverse of the Box-Cox transformation.

Find x such that:

y = (x**lmbda - 1) / lmbda  if lmbda != 0
    log(x)                  if lmbda == 0

Parameters:
y : array_like

Data to be transformed.

lmbda : array_like

Power parameter of the Box-Cox transform.

Returns:
x : array

Transformed data.

Notes

New in version 0.16.0.

Example:

from scipy.special import boxcox, inv_boxcox
y = boxcox([1, 4, 10], 2.5)
inv_boxcox(y, 2.5)

output: array([1., 4., 10.])

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)