Signature kernel computations via PDE solvers in JAX
Project description
Sigkerax
Sigkerax is a JAX library for signature kernels.
...
Features include:
- Custom static kernels (at time of writing only linear and RBF kernels are implemented);
- All the benefits of working with JAX: autodiff, autoparallelism, GPU/TPU support etc.
Installation
pip install sigkerax
Requires Python 3.8+, JAX 0.4.11+.
Documentation
Coming soon...
Quick example
Lineax can solve a least squares problem with an explicit matrix operator:
import jax
import jax.numpy as jnp
from sigkerax.static_kernels import linear_kernel
from sigkerax.solver import FiniteDifferenceSolver
from sigkerax.sigkernel import SigKernel
static_kernel = lambda x, y: linear_kernel(x, y, scale=1.0)
pde_solver = FiniteDifferenceSolver(static_kernel=static_kernel)
signature_kernel = SigKernel(pde_solver=pde_solver, ds=1e-3, dt=1e-3, add_time=False)
batch_dim1, batch_dim2, length1, length2, channels = 20, 50, 100, 200, 10
key1, key2 = jax.random.split(jax.random.PRNGKey(0))
first_batch_paths = jax.random.normal(key1, shape=(batch_dim1, length1, channels)).cumsum(axis=1)
second_batch_paths = jax.random.normal(key2, shape=(batch_dim2, length2, channels)).cumsum(axis=1)
sigker_matrix = signature_kernel.kernel_matrix(first_batch_paths, second_batch_paths)
Other signature libraries in JAX
Signax: signatures.
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
sigkerax-0.1.2.tar.gz
(8.5 kB
view details)
Built Distribution
File details
Details for the file sigkerax-0.1.2.tar.gz
.
File metadata
- Download URL: sigkerax-0.1.2.tar.gz
- Upload date:
- Size: 8.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.9.18 Linux/6.2.0-1011-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 20d044762db91ff528a3f21682823ee514b498ac3bea3cb8178cd7e032dc4504 |
|
MD5 | dcb19eb730ae55d397ede66756d90b56 |
|
BLAKE2b-256 | 7c75da63ef96654fe159b84251324a91c398783fb27a8ed1bedae43ad42ed201 |
File details
Details for the file sigkerax-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: sigkerax-0.1.2-py3-none-any.whl
- Upload date:
- Size: 9.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.9.18 Linux/6.2.0-1011-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd44526efd1f75a42761097322f42236f050e588dfa419700a7fe70d5d9921c1 |
|
MD5 | fba3a86c38566965d82f5311bf8e46e0 |
|
BLAKE2b-256 | 8104a792b86f2a02758975dbad647e1ae7d82f9ee5aaa3c687430196a47c671a |