Skip to main content

Python bindings for RATS, a rust crate for Rapid Augmentations for Time Series.

Reason this release was yanked:

It exactly matches 0.1.0a3

Project description

RATSpy

License

RATSpy provides Python bindings for RATS, a rust crate for Rapid Augmentations for Time Series on univariate time series data.

Installation

Install the package using PyPI

pip install ratspy

Python version 3.8+ is required.

Usage

Example to reconstruct the surface from an input file, apply some post-processing methods and write the data back to a file:

import ratspy as rp
import numpy as np

# Dataset from https://timeseriesclassification.com/dataset.php
data = pd.read_csv("./data/Car/Car.csv").to_numpy()

x = data[:,:-1].astype(np.float64)
y = list(map(lambda a: str(a), data[:,-1]))

dataset = rp.Dataset(x, y)

addnoise = rp.AddNoise(rp.NoiseType.Slope, bounds=(0.01, 0.05))
# Only execute the AddNoise augmenter for half of the series in the dataset
addnoise.probability = 0.5

pipeline = (rp.AugmentationPipeline()
            + rp.Repeat(10)
            + rp.Crop(100)
            + addnoise
            + rp.Jittering(0.1))

pipeline.augment_batch(dataset, parallel=True)

# Access augmented data using dataset.features and dataset.labels

Development notes

Manual Build instructions

  1. Clone the repository
  2. cd to the ratspy directory
  3. Install all required Python packages from requirements.txt in a virtual environment of your choice: pip install -r requirements.txt
  4. Now, to build the project, use maturin: maturin develop -r
    • Maturin automatically installs the resulting binary in your Python environment

Stub file generation

To automatically generate a stub file (ratspy.pyi) for the package, run cargo run --bin stub_gen.

This will expose Rust documentation comments to the Python side as docstrings.

Sphinx Documentation

To generate the Sphinx documentation, make sure that the package is installed through, e.g., maturin, and then run make html in the docs directory. The resulting HTML files will be in docs/_build/html.

You also need to install the documentation dependencies from docs/requirements.txt.

Tests

To test the installation of ratspy in your venv and run some initial tests, we provide unit tests for each of ratspy's classes as well as the entire pipeline in the /tests directory.

Run the following commands to run tests:

cd tests
python -m unittest test_RATSpy

Benchmarking

In benchmarking/ are scripts that automatically benchmark this library against the Python-native library tsaug. Which augmenters should be benchmarked can be configured using the benchmarking/augmenter_configs.yaml file.

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

ratspy-0.1.0a2.tar.gz (52.7 kB view details)

Uploaded Source

Built Distributions

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

ratspy-0.1.0a2-pp310-pypy310_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (735.2 kB view details)

Uploaded PyPymanylinux: glibc 2.17+ ARMv7l

ratspy-0.1.0a2-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (835.5 kB view details)

Uploaded PyPymanylinux: glibc 2.17+ ARM64

ratspy-0.1.0a2-pp310-pypy310_pp73-manylinux2014_armv7l.manylinux_2_17_armv7l.whl (717.2 kB view details)

Uploaded PyPymanylinux: glibc 2.17+ ARMv7l

ratspy-0.1.0a2-pp310-pypy310_pp73-manylinux2014_aarch64.manylinux_2_17_aarch64.whl (809.7 kB view details)

Uploaded PyPymanylinux: glibc 2.17+ ARM64

ratspy-0.1.0a2-pp39-pypy39_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (735.8 kB view details)

Uploaded PyPymanylinux: glibc 2.17+ ARMv7l

ratspy-0.1.0a2-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (835.5 kB view details)

Uploaded PyPymanylinux: glibc 2.17+ ARM64

ratspy-0.1.0a2-pp39-pypy39_pp73-manylinux2014_armv7l.manylinux_2_17_armv7l.whl (717.7 kB view details)

Uploaded PyPymanylinux: glibc 2.17+ ARMv7l

ratspy-0.1.0a2-pp39-pypy39_pp73-manylinux2014_aarch64.manylinux_2_17_aarch64.whl (809.6 kB view details)

Uploaded PyPymanylinux: glibc 2.17+ ARM64

ratspy-0.1.0a2-cp38-abi3-win_amd64.whl (680.8 kB view details)

Uploaded CPython 3.8+Windows x86-64

ratspy-0.1.0a2-cp38-abi3-win32.whl (480.5 kB view details)

Uploaded CPython 3.8+Windows x86

ratspy-0.1.0a2-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (941.8 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ x86-64

ratspy-0.1.0a2-cp38-abi3-manylinux_2_17_i686.manylinux2014_i686.whl (786.0 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ i686

ratspy-0.1.0a2-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (736.0 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ARMv7l

ratspy-0.1.0a2-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (838.0 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ARM64

ratspy-0.1.0a2-cp38-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (924.8 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ x86-64

ratspy-0.1.0a2-cp38-abi3-manylinux2014_i686.manylinux_2_17_i686.whl (768.9 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ i686

ratspy-0.1.0a2-cp38-abi3-manylinux2014_armv7l.manylinux_2_17_armv7l.whl (717.6 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ARMv7l

ratspy-0.1.0a2-cp38-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl (812.1 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ARM64

ratspy-0.1.0a2-cp38-abi3-macosx_11_0_arm64.whl (749.9 kB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

ratspy-0.1.0a2-cp38-abi3-macosx_10_12_x86_64.whl (846.3 kB view details)

Uploaded CPython 3.8+macOS 10.12+ x86-64

File details

Details for the file ratspy-0.1.0a2.tar.gz.

File metadata

  • Download URL: ratspy-0.1.0a2.tar.gz
  • Upload date:
  • Size: 52.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for ratspy-0.1.0a2.tar.gz
Algorithm Hash digest
SHA256 d5ea1385daa9e72aee4ab28592c5f956de71b473e42df6e6bfacf9d761bb7717
MD5 aad8e59e481623e3a9748509b9ec008d
BLAKE2b-256 4cbc5ee912e29bd8bdbd6bbd0d5e585bd030f7b7c0bc0810761f7321d9834f67

See more details on using hashes here.

File details

Details for the file ratspy-0.1.0a2-pp310-pypy310_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.

File metadata

File hashes

Hashes for ratspy-0.1.0a2-pp310-pypy310_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 7e75f7c16fe6a805286da6cc7d5df375b24bc4ef38ca7d76535647dc30a52e98
MD5 cf49946e8bc34011ca4eeb715099700e
BLAKE2b-256 26f5e19ee1b9bdace1cd1e94d71acdf8f6ac111ab9a0550211d25061bc94aba9

See more details on using hashes here.

File details

Details for the file ratspy-0.1.0a2-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for ratspy-0.1.0a2-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 072b9eb5793c917c95aea535e057d2ee739a17af59bdb712ecbc0d4bff9e0337
MD5 8fffdba00e021dcd6b1e2b89ac076aa7
BLAKE2b-256 b89391464c4974c4f8b6a26e3b3550a5228f0e6ffdaaa74bbf7946c9cde08bbf

See more details on using hashes here.

File details

Details for the file ratspy-0.1.0a2-pp310-pypy310_pp73-manylinux2014_armv7l.manylinux_2_17_armv7l.whl.

File metadata

File hashes

Hashes for ratspy-0.1.0a2-pp310-pypy310_pp73-manylinux2014_armv7l.manylinux_2_17_armv7l.whl
Algorithm Hash digest
SHA256 57c797e7e9f763269c5542d137b39a32d5fc13f04a5bd50a7ed8a68e91acbbf5
MD5 eb9909400a128724d01ee1e2052f440e
BLAKE2b-256 16d4930c7f662bdf853c6a000d6f09218f114269a365a207a9065f928c1a2949

See more details on using hashes here.

File details

Details for the file ratspy-0.1.0a2-pp310-pypy310_pp73-manylinux2014_aarch64.manylinux_2_17_aarch64.whl.

File metadata

File hashes

Hashes for ratspy-0.1.0a2-pp310-pypy310_pp73-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 5b600afcf07966cc55f0b534309b4a24cf43516bf30c9fe48322871b8707a64b
MD5 2a2fbaafdc96c35ee860a1918517bf26
BLAKE2b-256 87ec301dc274248b54749f07dff39065717ab4384ffe1435670dcfdd4c7125f8

See more details on using hashes here.

File details

Details for the file ratspy-0.1.0a2-pp39-pypy39_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.

File metadata

File hashes

Hashes for ratspy-0.1.0a2-pp39-pypy39_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 66570e3e8ac6232f0c68aaaa33b742a7e8dc2b8fe154a3d34a03f008f7129524
MD5 a946c21a54619c5b94a0e1fef4ef59b4
BLAKE2b-256 6642defaa6c9f0c4ca8473b4dd2c6b81fa0f94fc62ea95e36528c0c915c91b8e

See more details on using hashes here.

File details

Details for the file ratspy-0.1.0a2-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for ratspy-0.1.0a2-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 3484945f3cf2a057980e5e3a5fc552a471b4318820f56462897a76d6803b6575
MD5 f4ab086de171f575e4d33010eeda7866
BLAKE2b-256 db43d7c18345ca00f430228d7cb6720dc4d13b3ece6b3b07a8ee7289bec26571

See more details on using hashes here.

File details

Details for the file ratspy-0.1.0a2-pp39-pypy39_pp73-manylinux2014_armv7l.manylinux_2_17_armv7l.whl.

File metadata

File hashes

Hashes for ratspy-0.1.0a2-pp39-pypy39_pp73-manylinux2014_armv7l.manylinux_2_17_armv7l.whl
Algorithm Hash digest
SHA256 f6b31ee8cc39b3ffd1cff99b497f72254aa68fd8ddd5f028d79935e2fb8a9843
MD5 13770c44378e74638430e33119225f85
BLAKE2b-256 57ae3f8043326dcfb1e8449c62558559b4d1efe4b3ff1aea853e70331070ee90

See more details on using hashes here.

File details

Details for the file ratspy-0.1.0a2-pp39-pypy39_pp73-manylinux2014_aarch64.manylinux_2_17_aarch64.whl.

File metadata

File hashes

Hashes for ratspy-0.1.0a2-pp39-pypy39_pp73-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 643725a7ce4ca1412e3ebf92d3c896f9d676a1d92dc42a14803683f086bf070a
MD5 93031af27876682ec6819b837de221bf
BLAKE2b-256 36ce09291ebfbc6778a671ca09c9bf5543c79e368e2530a2774160e43b8fa03f

See more details on using hashes here.

File details

Details for the file ratspy-0.1.0a2-cp38-abi3-win_amd64.whl.

File metadata

  • Download URL: ratspy-0.1.0a2-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 680.8 kB
  • Tags: CPython 3.8+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for ratspy-0.1.0a2-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 f4ea723fadbd02e4936820e7f61ee32162fa29045126c127f89ec77dc61d62ce
MD5 b0f56c294eadfeb022ff91a75d12588b
BLAKE2b-256 4360bae334dc711b4b4f6c48e9497e9a1fe688b07f3b63920c1bc8d4e53328d4

See more details on using hashes here.

File details

Details for the file ratspy-0.1.0a2-cp38-abi3-win32.whl.

File metadata

  • Download URL: ratspy-0.1.0a2-cp38-abi3-win32.whl
  • Upload date:
  • Size: 480.5 kB
  • Tags: CPython 3.8+, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for ratspy-0.1.0a2-cp38-abi3-win32.whl
Algorithm Hash digest
SHA256 dffe6b7b8c9a6b7f0652a1f9d8b0db45e59db3fcb0c8769e5b363c31380dce95
MD5 e9c09b47cc6dd263defde3790085bf79
BLAKE2b-256 e260a69ccc6dd2650494d84cd12b78d4fe974abc6df966a4646d36abc241a3e3

See more details on using hashes here.

File details

Details for the file ratspy-0.1.0a2-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ratspy-0.1.0a2-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ace7077f74322ffcfa6baab78c91523f5e6d54e5ea5a1554909a13f8587bb23a
MD5 fcb1dac24be49dce25a0f18bf1f8497d
BLAKE2b-256 863c8ae7866047a0375032f2a0d34ab469dc80867d96680d00d6917cbb2d1607

See more details on using hashes here.

File details

Details for the file ratspy-0.1.0a2-cp38-abi3-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for ratspy-0.1.0a2-cp38-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 66352eeda1c43036ccdec14bbf4bfb3cf10b623f4d1d74f06071a02416d834b4
MD5 3ad92bb9ed43c3c2fd43c0cfd3a71c56
BLAKE2b-256 20e5a042ed4d1c20b94c73735f414a534b991b694e9ce079ebb3fd1f8bec796b

See more details on using hashes here.

File details

Details for the file ratspy-0.1.0a2-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.

File metadata

File hashes

Hashes for ratspy-0.1.0a2-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 97fb9a726cd193880366da46959cc0877b13ba502008605d603680a572ba310a
MD5 b8cd4cf173bac021c6a834ace909b09f
BLAKE2b-256 741911a5258fbd7b24fe2b9c5f8b5986bd099e041a288d5a7ce1b5dfbe4a0d03

See more details on using hashes here.

File details

Details for the file ratspy-0.1.0a2-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for ratspy-0.1.0a2-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 e7d9d40a91ca706b517926f72fc0e42e1eaf63e883557a8a8659e5ac424593e3
MD5 7865642a96e9ddedaa069ae70da660f0
BLAKE2b-256 3a36ea307b39462adc5dc5f6930b2ef94fca1e8d59095d9ba58ac653bc42da0f

See more details on using hashes here.

File details

Details for the file ratspy-0.1.0a2-cp38-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for ratspy-0.1.0a2-cp38-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 cf4401701b2f893849f512823972cffdc5c4c765ab54844b2da0c6cf668d6f04
MD5 9d6a758340a488e1cd14aa66a8f95d8f
BLAKE2b-256 e74fe28e15f2dcb03783c4bfa11642200541e9be6d5785b8054f732b36368bcb

See more details on using hashes here.

File details

Details for the file ratspy-0.1.0a2-cp38-abi3-manylinux2014_i686.manylinux_2_17_i686.whl.

File metadata

File hashes

Hashes for ratspy-0.1.0a2-cp38-abi3-manylinux2014_i686.manylinux_2_17_i686.whl
Algorithm Hash digest
SHA256 98ef2abb9230c95139a62cc96033656160a1ac8c0aec25e8994f53458127fd88
MD5 951cf50068b7eec781d9fe5a7e25291a
BLAKE2b-256 cae44b2a303fabec604ffc60ebf7b42aaac62f384eddd004e4c63b933e8708e2

See more details on using hashes here.

File details

Details for the file ratspy-0.1.0a2-cp38-abi3-manylinux2014_armv7l.manylinux_2_17_armv7l.whl.

File metadata

File hashes

Hashes for ratspy-0.1.0a2-cp38-abi3-manylinux2014_armv7l.manylinux_2_17_armv7l.whl
Algorithm Hash digest
SHA256 014038dc608c3e4ce79816bdc45c3aaccdfdc6c3c591e0d0ef8436a65d12b184
MD5 f0d22e01703e1b2ae57f52bd028817ee
BLAKE2b-256 8e746d48ecc27d770002a5c3a2aa5e0e0b150e118b1b5139a0a16832a75aef74

See more details on using hashes here.

File details

Details for the file ratspy-0.1.0a2-cp38-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl.

File metadata

File hashes

Hashes for ratspy-0.1.0a2-cp38-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 b7e41235e8895c915bf99e8c009edc73016b4c011cb3fa5932cf6f0efcbf1c66
MD5 9f27b62d00781e0e3e3242d1d45476b7
BLAKE2b-256 0f5919edae7df34097f58c109b763b5db4aaab7a615854afb837ec7bcb06287a

See more details on using hashes here.

File details

Details for the file ratspy-0.1.0a2-cp38-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for ratspy-0.1.0a2-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 631dba7759bf191c48c23b1955fae6a93d4697d22c8282ffb56754fb6b7769e9
MD5 5897791c41dee0f73b6e8bd05482d745
BLAKE2b-256 f9d91fbebcd01f85ab3500dba7cef43579ef8c5573dd93e4395033c4e8d51f6e

See more details on using hashes here.

File details

Details for the file ratspy-0.1.0a2-cp38-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for ratspy-0.1.0a2-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 aed69e23c3275e813ade06ea73a616c2bf417c7a92bef3285ce17ed63145a77e
MD5 0868db1fde75ff84ce6758b6a3e3338c
BLAKE2b-256 ac8650d40d45955ebbe373f8b554ac6ecdcd39bd3547612915176831f6d547ab

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