Sparse signature coefficient computations via kernels
Project description
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}
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sigcoeff-1.0.1.tar.gz.
File metadata
- Download URL: sigcoeff-1.0.1.tar.gz
- Upload date:
- Size: 157.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6aa13cb5f4a2608faecd5020da2a00d272355a27d4d1b388e8fcf8732b335a04
|
|
| MD5 |
f8655b19a145e2fbc8faabaef589bae0
|
|
| BLAKE2b-256 |
03f871395c2e917fa5da32a0654dce26582a66c04b2a6e826dcf5e7487fa1c4e
|
File details
Details for the file sigcoeff-1.0.1-cp313-cp313-win_amd64.whl.
File metadata
- Download URL: sigcoeff-1.0.1-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 235.7 kB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4fa133754e1f8c193685d29e14bcb522f7ad3943d4400e26e1825adcbd724256
|
|
| MD5 |
21d06ace580036f893e3929bced13e9d
|
|
| BLAKE2b-256 |
f6ec590bdbaec5ce7a83971420215d895fd143808f11b4488e94fca4bdb5a9fb
|