Skip to main content

Iterated-sums signature in Rust

Project description

Iterated-sums signature in Rust

This is an implementation of the one-dimensional iterated-sums signature in Rust, with Python 3 bindings.

Installation

From PyPI

Normally, this package can be installed by running

pip3 install o3iss

From source

Curretly we provide wheels for Linux, macOS and 64-bit Windows. If your system is not included in any of these targets, you will have to compile the package yourself. This will require you to have a Rust compiler, which can be obtained from [https://www.rust-lang.org/tools/install].

Start by cloning this repository by running

git clone https://github.com/ntapiam/o3iss.git

Then, enter the directory and run

python3 setup.py install

This should compile and install the package on your system.

Usage

This implementation offers only a single function: iss.compute with signature (np.ndarray, int) -> np.ndarray where both the input and ouput arrays are one-dimensional.

In v0.1.2, we introduced partial support for the sklearn framework. Example (assuming that sktime is present):

from iss import IssClassifier
from sktime.datasets import load_gunpoint
from sktime.utils.data_processing import from_nested_to_2d_array


Xtrain, ytrain = load_gunpoint(split="train", return_X_y=True)
Xtest, ytest = load_gunpoint(split="test", return_X_y=True)
Xtrain, Xtest = (
    from_nested_to_2d_array(Xtrain).to_numpy(),
    from_nested_to_2d_array(Xtest).to_numpy(),
)
ytrain, ytest = ytrain.astype(int), ytest.astype(int)

clf = IssClassifier(level=3, n_jobs=7)
clf.fit(Xtrain, ytrain)
print(clf.score(Xtest, ytest))
>> 0.9133333333333333

TO DO

  • Multidimensional signature
  • Proper sklearn integration
  • Produce a proper Python 3 package

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

o3iss-0.1.3.tar.gz (4.9 kB view hashes)

Uploaded Source

Built Distributions

o3iss-0.1.3-cp39-cp39-win_amd64.whl (86.5 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

o3iss-0.1.3-cp39-cp39-manylinux2010_x86_64.whl (827.9 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.12+ x86-64

o3iss-0.1.3-cp39-cp39-manylinux1_x86_64.whl (827.9 kB view hashes)

Uploaded CPython 3.9

o3iss-0.1.3-cp39-cp39-macosx_10_9_x86_64.whl (182.6 kB view hashes)

Uploaded CPython 3.9 macOS 10.9+ x86-64

o3iss-0.1.3-cp38-cp38-win_amd64.whl (86.5 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

o3iss-0.1.3-cp38-cp38-manylinux2010_x86_64.whl (827.9 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

o3iss-0.1.3-cp38-cp38-manylinux1_x86_64.whl (827.9 kB view hashes)

Uploaded CPython 3.8

o3iss-0.1.3-cp38-cp38-macosx_10_9_x86_64.whl (182.6 kB view hashes)

Uploaded CPython 3.8 macOS 10.9+ x86-64

o3iss-0.1.3-cp37-cp37m-win_amd64.whl (86.6 kB view hashes)

Uploaded CPython 3.7m Windows x86-64

o3iss-0.1.3-cp37-cp37m-manylinux2010_x86_64.whl (827.9 kB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.12+ x86-64

o3iss-0.1.3-cp37-cp37m-manylinux1_x86_64.whl (827.9 kB view hashes)

Uploaded CPython 3.7m

o3iss-0.1.3-cp37-cp37m-macosx_10_9_x86_64.whl (182.6 kB view hashes)

Uploaded CPython 3.7m macOS 10.9+ x86-64

o3iss-0.1.3-cp36-cp36m-win_amd64.whl (86.6 kB view hashes)

Uploaded CPython 3.6m Windows x86-64

o3iss-0.1.3-cp36-cp36m-manylinux2010_x86_64.whl (827.9 kB view hashes)

Uploaded CPython 3.6m manylinux: glibc 2.12+ x86-64

o3iss-0.1.3-cp36-cp36m-manylinux1_x86_64.whl (827.9 kB view hashes)

Uploaded CPython 3.6m

o3iss-0.1.3-cp36-cp36m-macosx_10_9_x86_64.whl (182.6 kB view hashes)

Uploaded CPython 3.6m macOS 10.9+ x86-64

Supported by

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