Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/slaypni/fastdtw
A Python implementation of FastDTW
https://github.com/slaypni/fastdtw
Last synced: about 2 months ago
JSON representation
A Python implementation of FastDTW
- Host: GitHub
- URL: https://github.com/slaypni/fastdtw
- Owner: slaypni
- License: mit
- Created: 2015-03-06T13:11:15.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2023-05-19T07:32:43.000Z (over 1 year ago)
- Last Synced: 2024-10-24T16:16:59.438Z (about 2 months ago)
- Language: Python
- Homepage:
- Size: 253 KB
- Stars: 786
- Watchers: 17
- Forks: 122
- Open Issues: 37
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
- StarryDivineSky - slaypni/fastdtw
README
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 euclideanfrom 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
----------.. [1] Stan Salvador, and Philip Chan. "FastDTW: Toward accurate dynamic time warping in linear time and space." Intelligent Data Analysis 11.5 (2007): 561-580.