Skip to main content

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)

Source distribution for sigcoeff 1.0.1
File Size Uploaded
sigcoeff-1.0.1.tar.gz 157.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sigcoeff 1.0.1
File Interpreter ABI Platform
sigcoeff-1.0.1-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details

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

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page