Transformer
TemporianTransformer
Quickstart
python
from sktime.transformations.temporian import TemporianTransformer
estimator = TemporianTransformer(function, compile=False)Tags
Capabilities
- Multivariate
- Unequal-length series
- Inverse transform: Not supported
- 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
- No
- Requires Xrequires_X
- Yes
- Requires yrequires_y
- No
- X and y need the same indexX-y-must-have-same-index
- No
Parameters(2)
- functionCallable[[temporian.EventSet], temporian.EventSet]
- Temporian function to apply to the input time series. The function must receive and return a single Temporian EventSet, and can apply an arbitrary number of Temporian operators to its input.
- compilebool, default=False
If True, the function will be compiled using Temporian’s @tp.compile [3] decorator, which can lead to significant speedups by optimizing the graph of operations.
Examples
>>> from sktime.datasets import load_airline
>>> from sktime.transformations.temporian import TemporianTransformer
>>> import temporian as tp
>>>
>>> def function (evset):
... return evset. simple_moving_average (tp. duration. days (3 * 365))
>>> transformer = TemporianTransformer (function = function)
>>> X = load_airline ()
>>> X_averaged = transformer. fit_transform (X)