pysiglib.LogSigWindowStream#
Added in version v3.0.0.
- class LogSigWindowStream(dimension, degree, window_size, *, stride=1, method=2, n_jobs=1, _log_sig=None)[source]#
A fixed-width sliding window over a stream of incoming points that emits windowed log-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.Note
You must call
pysiglib.prepare_log_sig(dimension, degree, method=2)before creating aLogSigWindowStream.- Parameters:
dimension (int) – Dimension of the underlying space, \(d\).
degree (int) – Truncation level of the log-signature, \(N\).
window_size (int) – Number of points per window.
stride (int) – Number of points between successive window starts. Default 1.
method (int) – Method used for per-window log-signature computation (
2or3).n_jobs (int) – Number of threads to run in parallel in the internal per-window
log_sigcalls.-1uses all available threads.
Example:
import pysiglib import numpy as np pysiglib.prepare_log_sig(3, 4, method=2) ws = pysiglib.LogSigWindowStream(dimension=3, degree=4, window_size=20, stride=5) path = np.random.randn(100, 3) ws.push_batch(path) window_logsigs = ws.sig() # shape (num_windows, log_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}
}