Back to models
Transformer

TemporianTransformer

Applies a Temporian function to the input time series.

Quickstart

python
from sktime.transformations.temporian import TemporianTransformer

estimator = TemporianTransformer(function, compile=False)

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)

References

  1. [1 ] https://temporian.readthedocs.io/en/stable/ [2 ] https://temporian.readthedocs.io/en/stable/reference/temporian/EventSet/ [3 ] https://temporian.readthedocs.io/en/stable/reference/temporian/compile/