pysiglib.branched_sig

pysiglib.branched_sig#

branched_sig(path, degree, *, time_aug=False, lead_lag=False, end_time=1.0, tree_order='recursive', planar=False, scalar_term=False, n_jobs=1)[source]#

Computes the truncated branched signature of a path or batch of paths.

The branched signature extends the standard path signature to iterated integrals indexed by decorated rooted trees, following Gubinelli (2010).

Must call prepare_branched_sig(dimension, degree, planar=planar) before first use, where dimension is the augmented dimension (accounting for time_aug and lead_lag).

Parameters:
  • path – Path of shape (length, dimension) or (..., length, dimension).

  • degree – Maximum tree order (number of nodes).

  • time_aug – If True, prepend a time channel to the path.

  • lead_lag – If True, apply the lead-lag transformation.

  • end_time – End time for the time augmentation channel.

  • tree_order – Tree ordering convention for the output coefficients. "recursive" (default) uses the recursive construction order. "canonical" uses the shape-first order matching tree_to_idx().

  • planar – If True, compute the planar (ordered) branched signature.

  • scalar_term (bool) – If True, the output includes the leading constant 1 at index 0 (the empty-word term). If False (default), this leading element is stripped from the output.

  • n_jobs – Number of parallel threads for batch processing.

Returns:

Branched signature array of shape (bsig_len,) or (..., bsig_len).


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}
}