pysiglib.SigWindowStream#
Added in version v3.0.0.
- class SigWindowStream(dimension, degree, window_size, *, stride=1, scalar_term=False, n_jobs=1, _sig=None)[source]#
A fixed-width sliding window over a stream of incoming points that emits windowed signatures. A new window is emitted every
stridepoints once enough points have been accumulated to fill the window.Accepts a single path or a batch of independent paths - the batch shape is inferred from the first
push/push_batchcall. Windows are extracted along the time axis only; each batch element is windowed independently.- Parameters:
dimension (int) – Dimension of the underlying space, \(d\).
degree (int) – Truncation level of the signature, \(N\).
window_size (int) – Number of points per window.
stride (int) – Number of points between successive window starts. Default 1.
scalar_term (bool) – If True, each emitted window signature includes the leading constant 1. If False (default), the leading element is stripped.
n_jobs (int) – Number of threads to run in parallel in the internal per-window
sigcalls.-1uses all available threads.
Example:
import pysiglib import numpy as np ws = pysiglib.SigWindowStream(dimension=3, degree=4, window_size=20, stride=5) # Single path path = np.random.randn(100, 3) ws.push_batch(path) window_sigs = ws.sig() # shape (num_windows, sig_length) # Batch of 8 independent paths ws = pysiglib.SigWindowStream(dimension=3, degree=4, window_size=20, stride=5) paths = np.random.randn(8, 100, 3) ws.push_batch(paths) window_sigs = ws.sig() # shape (num_windows, 8, sig_length)
Citation#
If you found this library useful in your research, please consider citing the paper:
@article{shmelev2025pysiglib,
title={pySigLib-Fast Signature-Based Computations on CPU and GPU},
author={Shmelev, Daniil and Salvi, Cristopher},
journal={arXiv preprint arXiv:2509.10613},
year={2025}
}