A rust implementation of dynamic time warping with python bindings!
Project description
RustDTW
Python extension backed by a multi-threaded Rust implementation of Dynamic Time Warping (DTW).
⚡️ Quick Install
To install rustDTW, simply:
pip install rust-dtw
❓ What is Dynamic Time Warping
In time series analysis, dynamic time warping (DTW) is one of the algorithms for measuring similarity between two temporal sequences, which may vary in speed 1. This has applications in speech recognition, time series classification and neuroscience.
Example Usage
rustDTW was designed for usage with timeseries data from functional brain regions. However any data represented as a numpy matrix can be provided.
import numpy as np
import rust_dtw
rust_dtw.dtw(
s=np.array([0., 1., 2.]),
t=np.array([3., 4., 5.]),
window=50,
distance_mode="euclidean"
)
>>> 5.0990195
For more examples please see examples/
Developing
Built With
- PyO3
- Maturin
- rust-numpy
- Rayon
Setting up Dev
To get started with development, simply clone the repository and edit the main library code in src/
. Once done, simply build and test the code with ./build.sh
.
git clone https://github.com/FL33TW00D/rustDTW.git
cd rust-dtw/
./build.sh
Tests
All tests are implemented using pytest.
poetry run pytest
📈 Performance
⚠️ License
rustDTW
is free and open-source software licensed under the MIT License.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Hashes for rust_dtw-0.1.13-cp39-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5bbc0a049dd720980c75c0b1bad22c5c9a770f929ec2204531dd5cb811c3afa6 |
|
MD5 | 493576c19782b2a6ad5aac8fefc1366a |
|
BLAKE2b-256 | f80812d582fda05e993f7b0a6d2d9cb02657489b08215e14b6d915fea937ea97 |
Hashes for rust_dtw-0.1.13-cp39-cp39-manylinux_2_24_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e9697d698735f060175dde8c41558f93d5f5d1bb4a6bdf13743ec3af1e15fe14 |
|
MD5 | 8e89fb270d89ed15b587610d8085086c |
|
BLAKE2b-256 | e9ab583e16cc66978b4298fac7e0d2ff4b03fcd45339a95fd019bd8d67844b78 |
Hashes for rust_dtw-0.1.13-cp39-cp39-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 898b28863828895bc2dfd745634747b05a4e6a5963ee2b2a3d14f09922e0af3f |
|
MD5 | f6a5c31fd913319f545c9c770e606ad9 |
|
BLAKE2b-256 | 8ff1c9a9f5224c714a759a7afd807c39a288634f5c0d0df47c32603fee454c35 |
Hashes for rust_dtw-0.1.13-cp38-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5bf2dac2da7cd870d455b40b78200fac3bb992211cdf6acc12603ec90df83871 |
|
MD5 | 3342f6b1657e13124df6c91e734be37f |
|
BLAKE2b-256 | 3539e0a37db86f3dc1fb1cfc409091bcab940f83d015b0e5c43953dcd6de36d6 |
Hashes for rust_dtw-0.1.13-cp38-cp38-manylinux_2_24_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d6a4119f3e0de596128e93058ea8b9892567df1642e03261824fc3e00a30ba8 |
|
MD5 | d3132840b71badd94d83ccaf0beaae25 |
|
BLAKE2b-256 | d9a2dfcd90310707f7781dc6facfb638f2bfe554388392cb3d6111ef2b43dc04 |
Hashes for rust_dtw-0.1.13-cp38-cp38-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 100024851c6735ebce4c0f9802924931fc003870739e2a81ae27584cfebd34d1 |
|
MD5 | e4f4269092d63658da66055239bb156b |
|
BLAKE2b-256 | 73df85a60569564ef2ae1ff48f9ab1286851003e087c21fa97c0fbed89e6637e |
Hashes for rust_dtw-0.1.13-cp37-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2a6b00444b979777c6d03f3b09c0ea90e8cef6915b9101b443c1aaddfae13cd2 |
|
MD5 | 02518f059b58ff431d804befabb9836e |
|
BLAKE2b-256 | 184c0235e5ea8f25b1604128492e2409cf9c2010ae4aa57c15729e78943f4951 |
Hashes for rust_dtw-0.1.13-cp37-cp37m-manylinux_2_24_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a043063ae90fa54c2600c74d476ed7b76c79ba0b83336c5e604bffc4fdf523a3 |
|
MD5 | 2427ff538aac4a5fa1fa8a632b150f4e |
|
BLAKE2b-256 | f08f2cdc3045b875cc56b4d7531ddada37fa57d2cd997e25c83366314844e093 |
Hashes for rust_dtw-0.1.13-cp37-cp37m-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd987313c2291adfffd179d12fe38c63f347826cf9aebfd24eddde43e97940be |
|
MD5 | 2bf438417b797eaf70292a8607e3a527 |
|
BLAKE2b-256 | ef2586fce69ca516e5816e195a51554bdf767a0904a4e8874aa175c3834b1a30 |
Hashes for rust_dtw-0.1.13-cp36-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2cd93406387ea98628b994080eab21366ec53ae823e10502d69cf71216c33e05 |
|
MD5 | d4a2792b4ef1fea359d54638e2743e25 |
|
BLAKE2b-256 | 70c428af712e46661ff5d383173fead6f0e50e139e52bbcfe0410e9d9a29c099 |
Hashes for rust_dtw-0.1.13-cp36-cp36m-manylinux_2_24_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 08ab5cf982a56a7b2ba2c2dd6cff0fad26c408da78f2500beee28ff07e638f27 |
|
MD5 | b25469a0ef0ee7e7b06d21b94c6957d9 |
|
BLAKE2b-256 | dc67b6553bf904f9ced0ba44671a3d33f86118eee9d2bd095a580a030849dcff |
Hashes for rust_dtw-0.1.13-cp36-cp36m-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f4ff3ce322fbce1fc921ba4832fcc2d522e352ab2a27e0f2e69af918db39553 |
|
MD5 | 717e8a5187b5fb4b5096a6250e26c46e |
|
BLAKE2b-256 | eab16d28e6cf3950c1695833fe2531da5fd5bf3f520c71b310ba26b1ce85f271 |