Skip to main content

Signature Kernel Power Series Library

Project description

Power-series based computation of Signature Kernels

CI Version

Using ADM-derived Neumann series to compute signature kernels.

Installation

pip install git+https://github.com/geekbeast/powersig.git

Requires Python 3.12+

Requires PyTorch 2.5+, JAX 0.6.0+, or cupy 13.4.1+ depending on which implementation you prefer.

Getting Started

import jax.numpy as jnp
from powersig.jax.utils import fractional_brownian_motion
from powersig.jax.algorithm import PowerSigJax

def main():
    # Generate fBM paths
    n_steps = 1000
    n_paths = 2
    hurst = 0.7
    
    # Generate fBM using the jax wrapper
    fbm_paths, dt = fractional_brownian_motion(
        n_steps=n_steps,
        n_paths=n_paths,
        hurst=hurst,
        dim=1
    )
    
    # Initialize PowerSigJax with polynomial order 8
    powersig = PowerSigJax(order=8)
    
    # Compute the signature kernel
    kernel_matrix = powersig(fbm_paths)
    
    print("Shape of fBM paths:", fbm_paths.shape)
    print("Shape of kernel matrix:", kernel_matrix.shape)
    print("\nKernel matrix:")
    print(kernel_matrix)

if __name__ == "__main__":
    main()

This example is also available in the repo under examples.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

powersig-1.0.0.tar.gz (48.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

powersig-1.0.0-py3-none-any.whl (37.0 kB view details)

Uploaded Python 3

File details

Details for the file powersig-1.0.0.tar.gz.

File metadata

  • Download URL: powersig-1.0.0.tar.gz
  • Upload date:
  • Size: 48.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for powersig-1.0.0.tar.gz
Algorithm Hash digest
SHA256 7d5afdf02299a8f94527bdf6e13beb5eeb1aa22fdca32b91ed4dc3f433f8bd0e
MD5 8a455981f4a7620b6fa4cc5dadd98b81
BLAKE2b-256 a6865e641afe26cbf51c3cc9a063e849e103db53797c0dc441ff30a480e5450a

See more details on using hashes here.

Provenance

The following attestation bundles were made for powersig-1.0.0.tar.gz:

Publisher: publish.yml on geekbeast/powersig

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file powersig-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: powersig-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 37.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for powersig-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5a69eb14eea43ee8e6d89dcfdff5a2c795cc1a3ba19348a5675ef6e272b2cfa9
MD5 bdd3ac99585f1cf52a646bd91ea3cc6e
BLAKE2b-256 6287c6caab98100218068b79aba76ba32d04e43b8b8a828c4c667d4d8b9e89e9

See more details on using hashes here.

Provenance

The following attestation bundles were made for powersig-1.0.0-py3-none-any.whl:

Publisher: publish.yml on geekbeast/powersig

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page