Dynamic Time Warping (DTW) algorithm with an O(N) time and memory complexity.
Project description
fastdtw
Python implementation of FastDTW [1], which is an approximate Dynamic Time Warping (DTW) algorithm that provides optimal or near-optimal alignments with an O(N) time and memory complexity.
Install
pip install fastdtw
Example
import numpy as np from scipy.spatial.distance import euclidean from fastdtw import fastdtw x = np.array([[1,1], [2,2], [3,3], [4,4], [5,5]]) y = np.array([[2,2], [3,3], [4,4]]) distance, path = fastdtw(x, y, dist=euclidean) print(distance)
References
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
fastdtw-0.3.4.tar.gz
(133.4 kB
view details)
Built Distribution
File details
Details for the file fastdtw-0.3.4.tar.gz
.
File metadata
- Download URL: fastdtw-0.3.4.tar.gz
- Upload date:
- Size: 133.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2350fa6ec36bcad186eaf81f46eff35181baf04e324f522de8aeb43d0243f64f |
|
MD5 | 03804669ea21e5a91ca06d39dc1908ec |
|
BLAKE2b-256 | 994330f2d8db076f216b15c10db663b46e22d1750b1ebacd7af6e62b83d6ab98 |
File details
Details for the file fastdtw-0.3.4-cp37-cp37m-macosx_10_14_x86_64.whl
.
File metadata
- Download URL: fastdtw-0.3.4-cp37-cp37m-macosx_10_14_x86_64.whl
- Upload date:
- Size: 103.9 kB
- Tags: CPython 3.7m, macOS 10.14+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 28918c163dce9e736e09252a02073fce712bc4c7aa18f2a45d882cca84da2dbb |
|
MD5 | ac819976d43d285e8381a969f2ee4d3b |
|
BLAKE2b-256 | 99e58425c47c3919e3fe3f771ee41c4f97c3a66104d33e07127dea81e32b7987 |