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
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
This ensures that all signature moments are of the same unit as the input data.
Quickstart
from sktime.transformations.signature import SignatureMoments
estimator = SignatureMoments(degree=2, use_index=True, normalize_prod=False)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)