Transformer
SqrtTransformer
Apply elementwise square root transformation to a time series.
- Transformation performs the following operations element-wise:
adds the constant
offset(shift)applies the square root
Offset=”auto” computes offset as the smallest offset that ensure all elements are non-negative before taking the square root.
Quickstart
python
from sktime.transformations.exponent import SqrtTransformer
estimator = SqrtTransformer(offset='auto')Tags
Capabilities
- Multivariate
- Inverse transform: Supported
- Unequal-length series
- Missing values: Not supported
- Removes missing values: Not supported
- Equalizes series length: Not supported
Properties
- Input typescitype:transform-input
- Series
- Output typescitype:transform-output
- Series
- Label typescitype:transform-labels
- None
- Fit is emptyfit_is_empty
- Yes
- Keeps the time indextransform-returns-same-time-index
- Yes
- Requires Xrequires_X
- Yes
- Requires yrequires_y
- No
- X and y need the same indexX-y-must-have-same-index
- No
Parameters(1)
- offset“auto”, int or float, default=”auto”
Offset to be added to the input timeseries prior to raising the timeseries to the given
power. If “auto” the series is checked to determine if it contains negative values. If negative values are found then the offset will be equal to the absolute value of the most negative value. If not negative values are present the offset is set to zero. If an integer or float value is supplied it will be used as the offset.
Examples
>>> from sktime.transformations.exponent import SqrtTransformer
>>> from sktime.datasets import load_airline
>>> y = load_airline ()
>>> transformer = SqrtTransformer ()
>>> y_transform = transformer. fit_transform (y)