scipy.special.boxcox#

scipy.special.boxcox(x, lmbda, out=None) = <ufunc 'boxcox'>#

Berechnet die Box-Cox-Transformation.

Die Box-Cox-Transformation ist

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

Gibt nan zurück, wenn x < 0. Gibt -inf zurück, wenn x == 0 und lmbda < 0.

Parameter:
xarray_like

Zu transformierende Daten.

lmbdaarray_like

Potenzparameter der Box-Cox-Transformation.

outndarray, optional

Optionales Ausgabe-Array für die Funktionswerte

Rückgabe:
yskalar oder ndarray

Transformierte Daten.

Hinweise

Hinzugefügt in Version 0.14.0.

Beispiele

>>> from scipy.special import boxcox
>>> boxcox([1, 4, 10], 2.5)
array([   0.        ,   12.4       ,  126.09110641])
>>> boxcox(2, [0, 1, 2])
array([ 0.69314718,  1.        ,  1.5       ])