BoxCoxTransform¶
- class BoxCoxTransform(in_column: Optional[Union[str, List[str]]] = None, inplace: bool = True, out_column: Optional[str] = None, standardize: bool = True, mode: Union[etna.transforms.math.sklearn.TransformMode, str] = 'per-segment')[source]¶
Bases:
etna.transforms.math.sklearn.SklearnTransform
BoxCoxTransform applies Box-Cox transformation to DataFrame.
Warning
This transform can suffer from look-ahead bias. For transforming data at some timestamp it uses information from the whole train part.
Create instance of BoxCoxTransform.
- Parameters
in_column (Optional[Union[str, List[str]]]) – columns to be transformed, if None - all columns will be transformed.
inplace (bool) –
if True, apply transformation inplace to in_column,
if False, add column to dataset.
out_column (Optional[str]) – base for the names of generated columns, uses
self.__repr__()
if not given.standardize (bool) – Set to True to apply zero-mean, unit-variance normalization to the transformed output.
mode (Union[etna.transforms.math.sklearn.TransformMode, str]) –
- Raises
ValueError: – if incorrect mode given
- Inherited-members
Methods
fit
(df)Fit transformer with data from df.
fit_transform
(df)May be reimplemented.
inverse_transform
(df)Apply inverse transformation to DataFrame.
transform
(df)Transform given data with fitted transformer.