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.0.1.tar.gz
(8.6 kB
view details)
Built Distribution
File details
Details for the file sigkerax-0.0.1.tar.gz
.
File metadata
- Download URL: sigkerax-0.0.1.tar.gz
- Upload date:
- Size: 8.6 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 | 4814b4e574cd506afdc1e4a8595c52b75e1ccfd4b24f86c9a2edd69b91de1731 |
|
MD5 | 5e05bbff184b0de2f591d76d8e609ec3 |
|
BLAKE2b-256 | 6233a3fe9ef040d9ddeebfc29d42479adb565363dfabb603e678d5a656380dbc |
File details
Details for the file sigkerax-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: sigkerax-0.0.1-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 | 98f4c9a802c33f16b36bafeb281cdbc96d3bf2526f912abbc67d32e122827e1b |
|
MD5 | 316d6dc9b2c3ec47161be35ac6fc49a2 |
|
BLAKE2b-256 | 07b2127aa4dc466bcd878201c684c50b84ad256596548cadc4dd74911f93076f |