Back to models
Transformer

SignatureMoments

Signature Moments Transformer for multivariate time series.

Computes time ordered signature moments for uni- and multivariate time series.

Pipelining Differencer() * SignatureMoments() can be used to obtain the discrete path signature.

For a degree d, the columns of the transform output are strings corresponding to strings of length d over the alphabet {[0], ..., [str(n_channels - 1)]}, where n_channels is the number of variables in the time series, and the character i represents the i-th variable.

If use_index=True, the time index is included as an additional dimension, and is represented by the character [n_channels].

For a time series \(X\) with n_channels variables, the signature moment for a string \(s = i_1 i_2... i_d\) is the arithmetic mean of the products

\[X_{i_1}(t_1) X_{i_2}(t_2)... X_{i_d}(t_d)\]

where \(t_1 < t_2 <... < t_d\) are the time indices.

If normalize_prod=True, the signature moment is computed as the arithmetic mean of the geometric means instead, i.e., of

\[(X_{i_1}(t_1) X_{i_2}(t_2)... X_{i_d}(t_d))^{1/d}\]

This ensures that all signature moments are of the same unit as the input data.

Quickstart

python
from sktime.transformations.signature import SignatureMoments

estimator = SignatureMoments(degree=2, use_index=True, normalize_prod=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
Primitives
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(3)

degree: int, default=2
The maximum length of the string-based signature elements to include. Degree can be upto 3.
use_index: bool, default=True
Whether to include the time index as an additional dimension.
normalize_prod: bool, default=False
If True, uses geometric mean instead of product for the signature moment, see above for formula. If False, uses product.

Examples

>>> from sktime.transformations.signature import SignatureMoments
>>> from sktime.datasets import load_airline
>>> y = load_airline ()
>>> transformer = SignatureMoments (degree = 2, use_index = True)
>>> Xt = transformer. fit_transform (y)