pysiglib.branched_sig_kernel_gram#
pysiglib.branched_sig_kernel_gram computes all pairwise branched signature
kernels between two batches of paths. It accepts the same kernel parameters as
pysiglib.branched_sig_kernel and supports max_batch chunking for large
Gram matrices.
- branched_sig_kernel_gram(path1, path2, depth, dyadic_order, *, static_kernel=None, time_aug=False, lead_lag=False, end_time=1.0, n_jobs=1, max_batch=-1, return_grid=False, normalize=False)[source]#
Computes a Gram matrix of branched signature kernels.
- Parameters:
path1 (numpy.ndarray | torch.Tensor) – First path batch, shape
(*batch_shape_1, length_1, dimension).path2 (numpy.ndarray | torch.Tensor) – Second path batch, shape
(*batch_shape_2, length_2, dimension).depth (int) – Forest depth truncation for the branched kernel.
dyadic_order (int | tuple) – Dyadic refinement order, or a pair of orders.
max_batch (int) – Maximum side length of pair chunks.
-1uses all pairs.return_grid (bool) – If
True, returns final-depth grids per pair.normalize (bool) – If
True, normalizes the Gram matrix.
- Returns:
Gram matrix of branched signature kernels.
- Return type:
numpy.ndarray | torch.Tensor
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}
}