pysiglib.log_sig_length#
Added in version v1.0.0.
- log_sig_length(dimension, degree, *, time_aug=False, lead_lag=False)[source]#
Returns the length of a truncated log signature,
\[\sum_{i=0}^N \frac{1}{i} \sum_{x | i} \mu\left(\frac{i}{x}\right) d^x,\]where \(d\) is the dimension of the underlying path, \(N\) is the truncation level of the log signature and \(\mu\) is the Mobius function.
- Parameters:
dimension (int) – Dimension of the underlying path, \(d\)
degree (int) – Truncation level of the log signature, \(N\)
time_aug (bool) – Whether time augmentation is applied before computing the signature. This flag is provided for convenience, and is equivalent to calling
sig_length(dimension + 1, degree).lead_lag (bool) – Whether the lead lag transformation is applied before computing the signature. This flag is provided for convenience, and is equivalent to calling
sig_length(2 * dimension, degree).
- Returns:
Length of a truncated log signature
- Return type:
int
Example:#
import pysiglib # Length of a truncated log signature for a 3-dimensional path at degree 4 length = pysiglib.log_sig_length(3, 4) print(length) # 32
# Log signature length with time augmentation and lead-lag import pysiglib length = pysiglib.log_sig_length(3, 4, time_aug=True, lead_lag=True) print(length) # 728
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}
}