Dynamic Time Warping (DTW) algorithm with an O(N) time and memory complexity.
Project Links
Meta
Author: Kazuaki Tanida
Classifiers
Programming Language
- Python :: 2
- Python :: 3
Intended Audience
- Science/Research
License
- OSI Approved :: MIT License
Topic
- Scientific/Engineering
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
0.3.4
Oct 07, 2019
0.3.2
Jul 16, 2017
0.3.1
Jul 16, 2017
0.3.0
Sep 04, 2016
0.2.2
Jul 05, 2016
0.2.1
Mar 15, 2016
0.2.0
Mar 06, 2015
0.1.0
Mar 06, 2015
Wheel compatibility matrix
Files in release
Extras:
None
Dependencies:
numpy