lale.lib.autogen.power_transformer module

class lale.lib.autogen.power_transformer.PowerTransformer(*, method='yeo-johnson', standardize=True, copy=True)

Bases: PlannedIndividualOp

Combined schema for expected data and hyperparameters.

This documentation is auto-generated from JSON schemas.

Parameters
  • method (‘yeo-johnson’ or ‘box-cox’, default ‘yeo-johnson’) – The power transform method

  • standardize (boolean, default True) – Set to True to apply zero-mean, unit-variance normalization to the transformed output.

  • copy (boolean, not for optimizer, default True) – Set to False to perform inplace computation during transformation.

Notes

constraint-1 : any type

constraint-2 : negated type of ‘X/isSparse’

FA sparse matrix was passed, but dense data is required. Use X.toarray() to convert to a dense numpy array.

fit(X, y=None, **fit_params)

Train the operator.

Note: The fit method is not available until this operator is trainable.

Once this method is available, it will have the following signature:

Parameters
  • X (array of items : array of items : float) – The data used to estimate the optimal transformation parameters.

  • y (any type) –

transform(X, y=None)

Transform the data.

Note: The transform method is not available until this operator is trained.

Once this method is available, it will have the following signature:

Parameters

X (array of items : array of items : float) – The data to be transformed using a power transformation.

Returns

result – The transformed data.

Return type

array of items : array of items : float