Skip to main content

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.2.tar.gz (118.4 kB view details)

Uploaded Source

File details

Details for the file fastdtw-0.3.2.tar.gz.

File metadata

  • Download URL: fastdtw-0.3.2.tar.gz
  • Upload date:
  • Size: 118.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for fastdtw-0.3.2.tar.gz
Algorithm Hash digest
SHA256 09a24d62a8eb72f87c03692dffae4b8d8499b53f503e9abce5e717c5b705dff9
MD5 63d55d14dbc4a40d2d1ceecb756d0ee4
BLAKE2b-256 faefa4cf2d72518b5fccd30284ba4d431fdb6266f72e75702ff05fd7c00b0b63

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page