MaxAbsScalerTransform¶
- class MaxAbsScalerTransform(in_column: Optional[Union[str, List[str]]] = None, inplace: bool = True, out_column: Optional[str] = None, mode: Union[etna.transforms.math.sklearn.TransformMode, str] = 'per-segment')[source]¶
Bases:
etna.transforms.math.sklearn.SklearnTransform
Scale each feature by its maximum absolute value.
Uses
sklearn.preprocessing.MaxAbsScaler
inside.Warning
This transform can suffer from look-ahead bias. For transforming data at some timestamp it uses information from the whole train part.
Init MinMaxScalerPreprocess.
- Parameters
in_column (Optional[Union[str, List[str]]]) – columns to be scaled, if None - all columns will be scaled.
inplace (bool) – features are changed by scaled.
out_column (Optional[str]) – base for the names of generated columns, uses
self.__repr__()
if not given.mode (Union[etna.transforms.math.sklearn.TransformMode, str]) –
“macro” or “per-segment”, way to transform features over segments.
If “macro”, transforms features globally, gluing the corresponding ones for all segments.
If “per-segment”, transforms features for each segment separately.
- Raises
ValueError: – if incorrect mode given
- Inherited-members
Methods
fit
(ts)Fit the transform.
fit_transform
(ts)Fit and transform TSDataset.
get_regressors_info
()Return the list with regressors created by the transform.
inverse_transform
(ts)Inverse transform TSDataset.
load
(path)Load an object.
params_to_tune
()Get default grid for tuning hyperparameters.
save
(path)Save the object.
set_params
(**params)Return new object instance with modified parameters.
to_dict
()Collect all information about etna object in dict.
transform
(ts)Transform TSDataset inplace.