gemseo /
mlearning /
transformers /
powerShow inherited members
power module
A power transform, either Yeo-Johnson or Box-Cox.
Dependence
This transformation algorithm relies on the PowerTransformer
class
of scikit-learn.
-
class gemseo.mlearning.transformers.power.power.Power(name='', standardize=True)[source]
Bases: Transformer
A power transformation.
- Parameters:
name (str) –
A name for this transformer. If None
, use the class name.
By default it is set to “”.
standardize (bool) –
Whether to apply zero-mean, unit-variance
normalization to the transformed output.
By default it is set to True.
-
inverse_transform(data, *args, **kwargs)
Force a NumPy array to be 2D and evaluate the function f
with it.
- Parameters:
data (ndarray) – A 1D or 2D NumPy array.
*args (Any) – The positional arguments.
**kwargs (Any) – The optional arguments.
- Returns:
Any kind of output;
if a NumPy array,
its dimension is made consistent with the shape of data
.
- Return type:
Any
-
transform(data, *args, **kwargs)
Force a NumPy array to be 2D and evaluate the function f
with it.
- Parameters:
data (ndarray) – A 1D or 2D NumPy array.
*args (Any) – The positional arguments.
**kwargs (Any) – The optional arguments.
- Returns:
Any kind of output;
if a NumPy array,
its dimension is made consistent with the shape of data
.
- Return type:
Any
-
lambdas_: ndarray
The parameters of the power transformation for the selected features.
-
name: str
The name of the transformer.