This release is a pre-release and may not be stable for production use.
RATSpy
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
- Clone the repository
- cd to the
ratspydirectory - Install all required Python packages from
requirements.txtin a virtual environment of your choice:pip install -r requirements.txt - 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.
Metadata
Release files for ratspy 0.1.0a3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ratspy-0.1.0a3.tar.gz | 53.1 kB | Details |
Built distributions (wheels)
Total release size: 15.5 MB
Release files / ratspy-0.1.0a3.tar.gz
| Download URL | ratspy-0.1.0a3.tar.gz |
|---|---|
| Size | 53.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5a30aa5db7260da6c022e9c17a36ba3f57f49092033484150da06c56f0e98328
|
|
BLAKE2b-256 checksum How to use checksums |
af3fb3f22117a57ab4fa05d8c636b4d656cee2ac0e40df9b825d635a8f2c9699
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Release files / ratspy-0.1.0a3-pp310-pypy310_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
| Download URL | ratspy-0.1.0a3-pp310-pypy310_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl |
|---|---|
| Size | 735.3 kB |
| Tags | Linux glibc 2.17+ ARMv7l PyPy 3.10 PyPy 3.10 7.3 |
|
SHA-256 checksum How to use checksums |
c42e4459899bea85ba244be5a96868dd1033ec4c38ee8bdb832fddb08cee1221
|
|
BLAKE2b-256 checksum How to use checksums |
98ee2f81150c5b74d8eb0e097f2cb6037f22ea698428d34853cedb8617acbbb8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Release files / ratspy-0.1.0a3-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | ratspy-0.1.0a3-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 835.6 kB |
| Tags | Linux glibc 2.17+ ARM64 PyPy 3.10 PyPy 3.10 7.3 |
|
SHA-256 checksum How to use checksums |
f02da0b27d9155452f21c5909700f0290119fdd44eb6ce5a5878394bd1eb20f6
|
|
BLAKE2b-256 checksum How to use checksums |
bea9d0ae8f4fe82c16d155f17f9f7a06af21eba3c2fa85ee5c7a9f56a8448d74
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Release files / ratspy-0.1.0a3-pp310-pypy310_pp73-manylinux2014_armv7l.manylinux_2_17_armv7l.whl
| Download URL | ratspy-0.1.0a3-pp310-pypy310_pp73-manylinux2014_armv7l.manylinux_2_17_armv7l.whl |
|---|---|
| Size | 717.3 kB |
| Tags | Linux glibc 2.17+ ARMv7l PyPy 3.10 PyPy 3.10 7.3 |
|
SHA-256 checksum How to use checksums |
875468f6cbc9b83b8fbc995dcaffaaea09cae345317f284742aaba4b45d244a5
|
|
BLAKE2b-256 checksum How to use checksums |
f1c54b94df0a5927e7b8bbeaefe9b16a2f7d5b26aead5ce9f37055fec1ecbb44
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Release files / ratspy-0.1.0a3-pp310-pypy310_pp73-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
| Download URL | ratspy-0.1.0a3-pp310-pypy310_pp73-manylinux2014_aarch64.manylinux_2_17_aarch64.whl |
|---|---|
| Size | 809.8 kB |
| Tags | Linux glibc 2.17+ ARM64 PyPy 3.10 PyPy 3.10 7.3 |
|
SHA-256 checksum How to use checksums |
82c706b0d6ae309e65dee87f32500d669bbe14afeb1c87effbeb9ea931f65f1d
|
|
BLAKE2b-256 checksum How to use checksums |
c2452eb9d9969f829a51a18fed5866f6b2851a519e330edd51cf50db31cb7ebf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Release files / ratspy-0.1.0a3-pp39-pypy39_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
| Download URL | ratspy-0.1.0a3-pp39-pypy39_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl |
|---|---|
| Size | 735.9 kB |
| Tags | Linux glibc 2.17+ ARMv7l PyPy 3.9 PyPy 3.9 7.3 |
|
SHA-256 checksum How to use checksums |
25cde96eed746d7b997c118dcf291440de2020c2ec3b367440f8fbd0288b3a34
|
|
BLAKE2b-256 checksum How to use checksums |
76b9885e38f036671661596686e5cbf232bd84a1fe62c9119b56fa980bc86759
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Release files / ratspy-0.1.0a3-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | ratspy-0.1.0a3-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 835.6 kB |
| Tags | Linux glibc 2.17+ ARM64 PyPy 3.9 PyPy 3.9 7.3 |
|
SHA-256 checksum How to use checksums |
ae8c592aa8c10159fef05caa94d536bc258679b5a71db4b070adbb865df15552
|
|
BLAKE2b-256 checksum How to use checksums |
0397160ed86a88fb0d5d419ec380f86ec8a90855aa108b017f75103554f18f22
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Release files / ratspy-0.1.0a3-pp39-pypy39_pp73-manylinux2014_armv7l.manylinux_2_17_armv7l.whl
| Download URL | ratspy-0.1.0a3-pp39-pypy39_pp73-manylinux2014_armv7l.manylinux_2_17_armv7l.whl |
|---|---|
| Size | 717.8 kB |
| Tags | Linux glibc 2.17+ ARMv7l PyPy 3.9 PyPy 3.9 7.3 |
|
SHA-256 checksum How to use checksums |
d7e36342006db272fd95565963eea5e698e0cd5e56af3a55e72b923516e3aa33
|
|
BLAKE2b-256 checksum How to use checksums |
db3dc8e5ac706f5aafe6a8ede0020b8520feb347f232213c0364d1d2bc063316
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Release files / ratspy-0.1.0a3-pp39-pypy39_pp73-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
| Download URL | ratspy-0.1.0a3-pp39-pypy39_pp73-manylinux2014_aarch64.manylinux_2_17_aarch64.whl |
|---|---|
| Size | 809.7 kB |
| Tags | Linux glibc 2.17+ ARM64 PyPy 3.9 PyPy 3.9 7.3 |
|
SHA-256 checksum How to use checksums |
be2c6fa1c7bd57ffcbbe94121f4244bfcf0efe25ac4873d735632dcfbc2a8d28
|
|
BLAKE2b-256 checksum How to use checksums |
8417bd1cfaba7d52f291b05ae4d2a7a2d9a85492f8505d44c82b3a6d482e69c2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Release files / ratspy-0.1.0a3-cp38-abi3-win_amd64.whl
| Download URL | ratspy-0.1.0a3-cp38-abi3-win_amd64.whl |
|---|---|
| Size | 680.9 kB |
| Tags | CPython 3.8 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
4e9c6319c61e16f12af8aba9eaa4cac802cbc448c5cdf850ec8e470b6f2cc6bb
|
|
BLAKE2b-256 checksum How to use checksums |
645a05a8309812384b5964aaf27378712f74f80d1e0c05e36ee3cf505c9212db
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Release files / ratspy-0.1.0a3-cp38-abi3-win32.whl
| Download URL | ratspy-0.1.0a3-cp38-abi3-win32.whl |
|---|---|
| Size | 480.6 kB |
| Tags | CPython 3.8 Windows x86-32 abi3 |
|
SHA-256 checksum How to use checksums |
89975d5681ce190b4ecb72fff78a4e662968ebf825bc478f7fe81150f9476406
|
|
BLAKE2b-256 checksum How to use checksums |
a92b6bbdfaa68357a3026b292c597d53be1bff3e272a19341f3e27ee52aac66f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Release files / ratspy-0.1.0a3-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | ratspy-0.1.0a3-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 941.9 kB |
| Tags | CPython 3.8 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
ac6321b75f6d648601d1cebce0ec862485be70338ec0a503ddba0287097319c5
|
|
BLAKE2b-256 checksum How to use checksums |
323d3de5c37db6bf9e87d813e4b4e96098e4860b4750feb42eba2298408f4850
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Release files / ratspy-0.1.0a3-cp38-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
| Download URL | ratspy-0.1.0a3-cp38-abi3-manylinux_2_17_i686.manylinux2014_i686.whl |
|---|---|
| Size | 786.1 kB |
| Tags | CPython 3.8 Linux glibc 2.17+ x86-32 abi3 |
|
SHA-256 checksum How to use checksums |
dcd248ab203d59a030026a7bccd62e2402618517e44797348938f175d1a4e7d2
|
|
BLAKE2b-256 checksum How to use checksums |
0fecf58b4bcb051ce3581bbeedb3f308d3a65c78078eaed43bc12cef3c2a3c7c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Release files / ratspy-0.1.0a3-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
| Download URL | ratspy-0.1.0a3-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl |
|---|---|
| Size | 736.1 kB |
| Tags | CPython 3.8 Linux glibc 2.17+ ARMv7l abi3 |
|
SHA-256 checksum How to use checksums |
686093dde95b98fa83eed9f39701922f0e263fee3acfa296cdbcc74f8745b7be
|
|
BLAKE2b-256 checksum How to use checksums |
c0b4b02405cf1a3a493bb7d16ce27414d2c18b9f48bbb99e4bb6339f8e9337b6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Release files / ratspy-0.1.0a3-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | ratspy-0.1.0a3-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 838.1 kB |
| Tags | CPython 3.8 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
3be8010227f800e0827cfe347a6de0d6797783235e1ceec9ca312a2f9d5d0d31
|
|
BLAKE2b-256 checksum How to use checksums |
737494a6e2207b95947f478fae6f606c206eeec8f935dff24596d1d450e1349b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Release files / ratspy-0.1.0a3-cp38-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
| Download URL | ratspy-0.1.0a3-cp38-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
|---|---|
| Size | 924.9 kB |
| Tags | CPython 3.8 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
4ff65565ed88ce85ee22ca450eb061af411c6d04a81d96127b05568dd46be31b
|
|
BLAKE2b-256 checksum How to use checksums |
9d33a0845317ec2ebd3d97b7dee59e791b6b79db06e4bad92e0e678ca7f841d9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Release files / ratspy-0.1.0a3-cp38-abi3-manylinux2014_i686.manylinux_2_17_i686.whl
| Download URL | ratspy-0.1.0a3-cp38-abi3-manylinux2014_i686.manylinux_2_17_i686.whl |
|---|---|
| Size | 769.0 kB |
| Tags | CPython 3.8 Linux glibc 2.17+ x86-32 abi3 |
|
SHA-256 checksum How to use checksums |
249f9b9b6944940c5d8ca4b7bd4d2ac1bda4e56cd350bb5a7f3556ce590e6db5
|
|
BLAKE2b-256 checksum How to use checksums |
e24c69ea99bd0df8bbf85d244b9d6e8742b987aac32bace1e61a97d0da5887de
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Release files / ratspy-0.1.0a3-cp38-abi3-manylinux2014_armv7l.manylinux_2_17_armv7l.whl
| Download URL | ratspy-0.1.0a3-cp38-abi3-manylinux2014_armv7l.manylinux_2_17_armv7l.whl |
|---|---|
| Size | 717.7 kB |
| Tags | CPython 3.8 Linux glibc 2.17+ ARMv7l abi3 |
|
SHA-256 checksum How to use checksums |
b8e63f54bb0ac3a3caac5d422ad07e43739f8af2ec86c12188c3a0d6a9be479c
|
|
BLAKE2b-256 checksum How to use checksums |
187dcadd99175b5b5dfffdfe4be11870f27d84207f737e71f5eedaa9ae4eaeee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Release files / ratspy-0.1.0a3-cp38-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
| Download URL | ratspy-0.1.0a3-cp38-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl |
|---|---|
| Size | 812.2 kB |
| Tags | CPython 3.8 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
feac86f08f82cd386ce734839ecab85f149a434e58eadc5c5a9f6dd9b0ca398b
|
|
BLAKE2b-256 checksum How to use checksums |
fc1078d5b2bcf2e83e824ce5b75322e2e2985632fa6e8a1db362aad7583484c6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Release files / ratspy-0.1.0a3-cp38-abi3-macosx_11_0_arm64.whl
| Download URL | ratspy-0.1.0a3-cp38-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 750.0 kB |
| Tags | CPython 3.8 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
889d438cc5bfe878de4cdfee4ea7edbf9d73fffb968566476dbad0fdb6932a41
|
|
BLAKE2b-256 checksum How to use checksums |
aae34e12ffcb547c9c81cca0d502e8792674690f47a5cbeaeb4de8fa56aee606
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Release files / ratspy-0.1.0a3-cp38-abi3-macosx_10_12_x86_64.whl
| Download URL | ratspy-0.1.0a3-cp38-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 846.4 kB |
| Tags | CPython 3.8 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
ab8dee7253b7598b7f9aff965248508bbd3a63647f94a784d16088cf4cd7979e
|
|
BLAKE2b-256 checksum How to use checksums |
90748aa9e75bc706a9292b1cff865f4f52019b249d5ee69e366fd1a50820a662
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|