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}\]
Dependence¶
This transformation algorithm relies on the PowerTransformer
class
of scikit-learn.
- class gemseo.mlearning.transformers.power.boxcox.BoxCox(name='', standardize=True)[source]¶
Bases:
Power
A Box-Cox power transformation.
- Parameters:
- compute_jacobian(data)¶
Compute the Jacobian of
transform()
.
- compute_jacobian_inverse(data)¶
Compute the Jacobian of the
inverse_transform()
.
- duplicate()¶
Duplicate the current object.
- Returns:
A deepcopy of the current instance.
- Return type:
- fit(data, *args)¶
Fit the transformer to the data.
- fit_transform(data, *args)¶
Fit the transformer to the data and transform the data.
- inverse_transform(data, *args, **kwargs)¶
Force a NumPy array to be 2D and evaluate the function
f
with it.
- transform(data, *args, **kwargs)¶
Force a NumPy array to be 2D and evaluate the function
f
with it.
- lambdas_: ndarray¶
The parameters of the power transformation for the selected features.