gemseo.mlearning.transformers.power.power module#
A power transform, either Yeo-Johnson or Box-Cox.
Dependence#
This transformation algorithm relies on the PowerTransformer class
of scikit-learn.
- class Power(name='', standardize=True)[source]#
Bases:
BaseTransformerA power transformation.
- Parameters:
- inverse_transform(data, *args, **kwargs)#
Force a NumPy array to be at least 2D and evaluate the function
f.fexpects a 2D array shaped as(n_points, input_dimension)and returns a nD arrays shaped as(..., n_points, output_dimension)or(..., n_points, output_dimension, input_dimension).If the original
datais a 1D array shaped as(input_dimension,), then this wrapper returns a (n-1)D array shaped as(..., output_dimension)or(..., output_dimension, intput_dimension).
- transform(data, *args, **kwargs)#
Force a NumPy array to be at least 2D and evaluate the function
f.fexpects a 2D array shaped as(n_points, input_dimension)and returns a nD arrays shaped as(..., n_points, output_dimension)or(..., n_points, output_dimension, input_dimension).If the original
datais a 1D array shaped as(input_dimension,), then this wrapper returns a (n-1)D array shaped as(..., output_dimension)or(..., output_dimension, intput_dimension).
- lambdas_: RealArray#
The parameters of the power transformation for the selected features.