Metadata-Version: 2.4
Name: powersig
Version: 1.0.0
Summary: Signature Kernel Power Series Library
Author-email: Matthew Tamayo-Rios <matthew@geekbeast.com>
License-Expression: Apache-2.0
Project-URL: Homepage, https://github.com/geekbeast/powersig
Project-URL: Repository, https://github.com/geekbeast/powersig
Keywords: machine-learning,signature,sequence,time-series,deep-learning
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: Science/Research
Classifier: Natural Language :: English
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: Unix
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Classifier: Topic :: Scientific/Engineering :: Mathematics
Requires-Python: >=3.12
Description-Content-Type: text/markdown
Requires-Dist: numpy>=1.26.4
Requires-Dist: scikit-learn>=1.3.2
Requires-Dist: tqdm>=4.67.1
Provides-Extra: jax-cpu
Requires-Dist: jax[cpu]>=0.4.34; extra == "jax-cpu"
Provides-Extra: jax-gpu
Requires-Dist: jax[cuda13]>=0.10.0; extra == "jax-gpu"
Provides-Extra: torch
Requires-Dist: torch>=2.5.0; extra == "torch"
Provides-Extra: cupy
Requires-Dist: cupy-cuda12x>=13.4.1; extra == "cupy"
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: fbm>=0.3.0; extra == "dev"
Provides-Extra: all
Requires-Dist: jax[cuda13]>=0.10.0; extra == "all"
Requires-Dist: torch>=2.5.0; extra == "all"
Requires-Dist: cupy-cuda12x>=13.4.1; extra == "all"

# Power-series based computation of Signature Kernels

[![CI](https://github.com/geekbeast/powersig/actions/workflows/ci.yml/badge.svg)](https://github.com/geekbeast/powersig/actions/workflows/ci.yml)
[![Version](https://img.shields.io/badge/version-1.0.0-blue)](https://github.com/geekbeast/powersig)

Using ADM-derived Neumann series to compute signature kernels.

## Installation 
```bash
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
```python
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](examples/simple.py).
