Skip to main content

Differentiable computations of the signature and logsignature transforms, on both CPU and GPU.

Project description

Signatory

Differentiable computations of the signature and logsignature transforms, on both CPU and GPU.

What is the signature transform?

The signature transform is roughly analogous to the Fourier transform, in that it operates on a stream of data (often a time series). Whilst the Fourier transform extracts information about frequency, the signature transform extracts information about order and area. Furthermore (and unlike the Fourier transform), order and area represent all possible nonlinear effects: the signature transform is a universal nonlinearity, meaning that every continuous function of the input stream may be approximated arbitrary well by a linear function of its signature. If you’re doing machine learning then you probably understand why this is such a desirable property!

Besides this, the signature transform has many other nice properties – robustness to missing or irregularly sampled data; optional translation invariance; optional sampling invariance. Furthermore it can be used to encode certain physical quantities, and may be used for data compression.

Check out this for a primer on the use of the signature transform in machine learning, just as a feature transformation, and this for a more in-depth look at integrating the signature transform into neural networks.

Installation

pip install signatory==<SIGNATORY_VERSION>.<TORCH_VERSION> --no-cache-dir --force-reinstall

where <SIGNATORY_VERSION> is the version of Signatory you would like to download (the most recent version is 1.2.2) and <TORCH_VERSION> is the version of PyTorch you are using.

Available for Python 2.7, 3.5, 3.6, 3.7, 3.8 and Linux, Mac, Windows. Requires PyTorch 1.2.0, 1.3.0, 1.3.1, 1.4.0 or 1.5.0.

After installation, just import signatory inside Python.

Take care not to run pip install signatory, as this will likely download the wrong version.

Example:

For example, if you are using PyTorch 1.3.0 and want Signatory 1.1.4, then you should run:

pip install signatory==1.1.4.1.3.0 --no-cache-dir --force-reinstall

Why you need to specify all of this:

Yes, this looks a bit odd. This is needed to work around limitations of PyTorch and pip.

The --no-cache-dir --force-reinstall flags are because pip doesn’t expect to need to care about versions quite as much as this, so it will sometimes erroneously use inappropriate caches if not told otherwise.

Installation from source is also possible; please consult the documentation. This also includes information on how to run the tests and benchmarks.

If you have any problems with installation then check the FAQ. If that doesn’t help then feel free to open an issue.

Documentation

The documentation is available here.

Example

Usage is straightforward. As a simple example,

import signatory
import torch
batch, stream, channels = 1, 10, 2
depth = 4
path = torch.rand(batch, stream, channels)
signature = signatory.signature(path, depth)
# signature is a PyTorch tensor

For further examples, see the documentation.

Citation

If you found this library useful in your research, please consider citing the paper.

@article{signatory,
    title={{Signatory: differentiable computations of the signature and logsignature transforms, on both CPU and GPU}},
    author={Kidger, Patrick and Lyons, Terry},
    journal={arXiv:2001.00706},
    url={https://github.com/patrick-kidger/signatory},
    year={2020}
}

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

signatory-1.2.2.1.4.0.tar.gz (61.1 kB view details)

Uploaded Source

Built Distributions

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

signatory-1.2.2.1.4.0-cp38-cp38-win_amd64.whl (251.6 kB view details)

Uploaded CPython 3.8Windows x86-64

signatory-1.2.2.1.4.0-cp38-cp38-macosx_10_9_x86_64.whl (326.5 kB view details)

Uploaded CPython 3.8macOS 10.9+ x86-64

signatory-1.2.2.1.4.0-cp37-cp37m-win_amd64.whl (253.4 kB view details)

Uploaded CPython 3.7mWindows x86-64

signatory-1.2.2.1.4.0-cp37-cp37m-macosx_10_9_x86_64.whl (322.0 kB view details)

Uploaded CPython 3.7mmacOS 10.9+ x86-64

signatory-1.2.2.1.4.0-cp36-cp36m-win_amd64.whl (253.4 kB view details)

Uploaded CPython 3.6mWindows x86-64

signatory-1.2.2.1.4.0-cp36-cp36m-macosx_10_9_x86_64.whl (322.0 kB view details)

Uploaded CPython 3.6mmacOS 10.9+ x86-64

signatory-1.2.2.1.4.0-cp35-cp35m-macosx_10_6_x86_64.whl (317.8 kB view details)

Uploaded CPython 3.5mmacOS 10.6+ x86-64

signatory-1.2.2.1.4.0-cp27-cp27m-macosx_10_6_x86_64.whl (305.8 kB view details)

Uploaded CPython 2.7mmacOS 10.6+ x86-64

File details

Details for the file signatory-1.2.2.1.4.0.tar.gz.

File metadata

  • Download URL: signatory-1.2.2.1.4.0.tar.gz
  • Upload date:
  • Size: 61.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0.post20200714 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.7.0

File hashes

Hashes for signatory-1.2.2.1.4.0.tar.gz
Algorithm Hash digest
SHA256 a7ee0c71f2fe630d80a4dc31fc253f5f0127ce1488c91ae28818c6a611327073
MD5 7430146b7e2c7deaaa2a0a433b660022
BLAKE2b-256 c1440b5fdef0240f36a5f7bbc3c6250d3a523ffa5fa47d38114419fa980579b7

See more details on using hashes here.

File details

Details for the file signatory-1.2.2.1.4.0-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: signatory-1.2.2.1.4.0-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 251.6 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0.post20200714 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.2

File hashes

Hashes for signatory-1.2.2.1.4.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 f960a1698bfb704944c5682a876fdd1ad6dc8e7349b30c26e224487d7b0d06fc
MD5 cd7607bef6366e169785ba55631510e5
BLAKE2b-256 e2b5ab4d0b8a00eb3c1da2f839b3eb2409906651543e75b59fc01538b2416019

See more details on using hashes here.

File details

Details for the file signatory-1.2.2.1.4.0-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: signatory-1.2.2.1.4.0-cp38-cp38-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 326.5 kB
  • Tags: CPython 3.8, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0.post20200714 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.2

File hashes

Hashes for signatory-1.2.2.1.4.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 9a822bbcec18c369101248e80d74c41ed7093f883338453bf4f18b2df2ae2d1b
MD5 ea26af27ac673c0b5f89bd93f4b5cc6d
BLAKE2b-256 b4b8e10d31436edf7c1da46fc93b2aea9198dce3fe10023d2cf2ed447bcdddc7

See more details on using hashes here.

File details

Details for the file signatory-1.2.2.1.4.0-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: signatory-1.2.2.1.4.0-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 253.4 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0.post20200714 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.7.0

File hashes

Hashes for signatory-1.2.2.1.4.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 a9ef3a0aa8e957df978908316bc212d73b9928a681e54220a11c49de0c088cfa
MD5 d6c18bb95f82c1e2333b5d1a25865fa5
BLAKE2b-256 024b7438d891171ba25e20d348fd7be00faa8872bd6352956115face1ddd5ff4

See more details on using hashes here.

File details

Details for the file signatory-1.2.2.1.4.0-cp37-cp37m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: signatory-1.2.2.1.4.0-cp37-cp37m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 322.0 kB
  • Tags: CPython 3.7m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0.post20200714 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.7.0

File hashes

Hashes for signatory-1.2.2.1.4.0-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 463b93d09b5a9741f5681bb4112f5ef341ba061326ae8c8322869f3e2ef4ea62
MD5 2c7770f8116849fe689d9f8a3b65e781
BLAKE2b-256 e4414c12d4b0c466e0401abce225389c9865f21f810bfdf6cf636a27f90a334b

See more details on using hashes here.

File details

Details for the file signatory-1.2.2.1.4.0-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: signatory-1.2.2.1.4.0-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 253.4 kB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0.post20200714 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.6.9

File hashes

Hashes for signatory-1.2.2.1.4.0-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 842a38101fddb47d712b0bc11ffb28c53fd20fef4741e490b9255aea184de4d2
MD5 72ff3fa40598a81611c34f6e5e9b2425
BLAKE2b-256 04f53c78054c7cc4a2b8fd58b8ec00a04f0390ccf3cefedd552ee5d9a87959d0

See more details on using hashes here.

File details

Details for the file signatory-1.2.2.1.4.0-cp36-cp36m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: signatory-1.2.2.1.4.0-cp36-cp36m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 322.0 kB
  • Tags: CPython 3.6m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0.post20200714 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.6.9

File hashes

Hashes for signatory-1.2.2.1.4.0-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 9a19593dc864931974ce0220cfeb4d16680d05f7e812e4faa3132af5022f4ce6
MD5 15bca35e7965638a1990de3ae26dbfef
BLAKE2b-256 afd87aa732848503c791dfe14e03c5ee4ae5479f31a78a11dc2455b101036f6b

See more details on using hashes here.

File details

Details for the file signatory-1.2.2.1.4.0-cp35-cp35m-macosx_10_6_x86_64.whl.

File metadata

  • Download URL: signatory-1.2.2.1.4.0-cp35-cp35m-macosx_10_6_x86_64.whl
  • Upload date:
  • Size: 317.8 kB
  • Tags: CPython 3.5m, macOS 10.6+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/40.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.5.4

File hashes

Hashes for signatory-1.2.2.1.4.0-cp35-cp35m-macosx_10_6_x86_64.whl
Algorithm Hash digest
SHA256 c5d835bea497ccc27e847a79c0cc7af0f78f94cf89fa654be6aee41c4825716b
MD5 e351febbee7a0853e60e6fdc572eb72b
BLAKE2b-256 915992137d675065b93ed9ca2e4a6b62ba9888f34ec60aa756c7437c025fb84e

See more details on using hashes here.

File details

Details for the file signatory-1.2.2.1.4.0-cp27-cp27m-macosx_10_6_x86_64.whl.

File metadata

  • Download URL: signatory-1.2.2.1.4.0-cp27-cp27m-macosx_10_6_x86_64.whl
  • Upload date:
  • Size: 305.8 kB
  • Tags: CPython 2.7m, macOS 10.6+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/44.0.0.post20200106 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/2.7.13

File hashes

Hashes for signatory-1.2.2.1.4.0-cp27-cp27m-macosx_10_6_x86_64.whl
Algorithm Hash digest
SHA256 153082dc1eb7722d2244abcf87d1b7816a675011787cbb3068c76c8ccdca32a5
MD5 b2c5f83aafe9336253ce5eb7239126be
BLAKE2b-256 d7f5616c62ab452816d1aee5d8b54488ba95a89a291bfde504161959a4bd35dd

See more details on using hashes here.

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