gemseo / mlearning / transformers / power

Show inherited members

boxcox module

A Box-Cox power transformation.

Transform a variable \(x\) as:

\[\begin{split}y & = (x^\lambda - 1) / \lambda, \text{for } \lambda \neq 0 \\\\ & = \log(x), \text{for } \lambda = 0\end{split}\]


This transformation algorithm relies on the PowerTransformer class of scikit-learn.

class gemseo.mlearning.transformers.power.boxcox.BoxCox(name=None, standardize=True)[source]

Bases: Power

A Box-Cox power transformation.

  • name (str | None) – A name for this transformer. If None, use the class name.

  • standardize (bool) –

    Whether to apply zero-mean, unit-variance normalization to the transformed output.

    By default it is set to True.

lambdas_: ndarray

The parameters of the power transformation for the selected features.

name: str

The name of the transformer.