sigcoeff
Sparse Signature Coefficient Recovery via Kernels
This package provides an example implementation for computing deep coefficients of the path signature transform using signature kernels on both CPU and GPU, to accompany the paper Sparse Signature Coefficient Recovery via Kernels. This method allows for parallelised computation of coefficients, with a time complexity independent of their depth.
Installation
pip install git+https://github.com/daniil-shmelev/sigcoeff.git
How to use the package
To run the below, see ./examples/example_usage.py
import torch
import sigcoeff
torch.manual_seed(42)
# Underlying path
len_x = 1000
dim = 10
X = torch.rand((len_x, dim), device="cpu")
# Target multi-index
multi_index = [1, 5, 2, 6, 3]
# Algorithm parameters
M = 2
dyadic_order = 3
#############################################
# Serial CPU computation
#############################################
coeff = sigcoeff.coeff(X, multi_index, scaling_depth=M, dyadic_order=dyadic_order, parallel=False)
#############################################
# Parallel CPU computation
#############################################
coeff = sigcoeff.coeff(X, multi_index, scaling_depth=M, dyadic_order=dyadic_order, parallel=True)
#############################################
# Parallel GPU computation
#############################################
coeff = sigcoeff.coeff(X.cuda(), multi_index, scaling_depth=M, dyadic_order=dyadic_order)
#############################################
# Varying dyadic orders for the two dimensions of the PDE grid
#############################################
coeff = sigcoeff.coeff(X.cuda(), multi_index, scaling_depth=M, dyadic_order=(3, 2))
#############################################
# Extraction of the entire grid of coefficients. I.e. all coefficients given by multi_index[:i],
# evaluated at all time points up to len_x. (CUDA only)
#############################################
coeff_grid = sigcoeff.coeff(X.cuda(), multi_index, scaling_depth=M, dyadic_order=dyadic_order, full=True)
Citation
@article{shmelev2024sparsesig,
title={Sparse Signature Coefficient Recovery via Kernels},
author={Shmelev, Daniil and Cristopher, Salvi},
journal={arXiv preprint arXiv:2412.08579},
year={2024}
}
Metadata
Release files for sigcoeff 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sigcoeff-1.0.1.tar.gz | 157.7 kB | Without provenance | Details for sigcoeff-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sigcoeff-1.0.1-cp313-cp313-win_amd64.whl | CPython 3.13 | CPython 3.13 | Windows x86-64 | Details for sigcoeff-1.0.1-cp313-cp313-win_amd64.whl |
Total release size: 393.4 kB
Release files / sigcoeff-1.0.1.tar.gz
| Download URL | sigcoeff-1.0.1.tar.gz |
|---|---|
| Size | 157.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6aa13cb5f4a2608faecd5020da2a00d272355a27d4d1b388e8fcf8732b335a04
|
|
BLAKE2b-256 checksum How to use checksums |
03f871395c2e917fa5da32a0654dce26582a66c04b2a6e826dcf5e7487fa1c4e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|
Release files / sigcoeff-1.0.1-cp313-cp313-win_amd64.whl
| Download URL | sigcoeff-1.0.1-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 235.7 kB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
4fa133754e1f8c193685d29e14bcb522f7ad3943d4400e26e1825adcbd724256
|
|
BLAKE2b-256 checksum How to use checksums |
f6ec590bdbaec5ce7a83971420215d895fd143808f11b4488e94fca4bdb5a9fb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|
Security for sigcoeff 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.