limix.qc.boxcox

limix.qc.boxcox(x)[source]

Box-Cox transformation for normality conformance.

It applies the power transformation

\[\begin{split}f(x) = \begin{cases} \frac{x^{\lambda} - 1}{\lambda}, & \text{if } \lambda > 0; \\ \log(x), & \text{if } \lambda = 0. \end{cases}\end{split}\]

to the provided data, hopefully making it more normal distribution-like. The λ parameter is fit by maximum likelihood estimation.

Parameters

X (array_like) – Data to be transformed.

Returns

boxcox – Box-Cox transformed data.

Return type

ndarray

Examples

(Source code, png)

../_images/limix-qc-boxcox-1.png