Zurück zu den Modellen
Transformer

TemporianTransformer

Applies a Temporian function to the input time series.

This transformer applies a Temporian [1] function to the input time series.

The conversion from sktime’s internal representation to Temporian’s EventSet [2] and back is handled automatically by the transformer.

Schnellstart

python
from sktime.transformations.temporian import TemporianTransformer

estimator = TemporianTransformer(function, compile=False)

Parameter(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.

Beispiele

>>> 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)

Referenzen