Skip to content
forked from klon/ucrdtw

Python extension for UCR Suite highly optimized subsequence search using Dynamic Time Warping (DTW)

Notifications You must be signed in to change notification settings

mikelnrd/ucrdtw

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#ucrdtw

Python extension for UCR Suite highly optimized subsequence search using Dynamic Time Warping (DTW)

Based on the paper Searching and Mining Trillions of Time Series Subsequences under Dynamic Time Warping

More info on the UCR Suite web page http://www.cs.ucr.edu/~eamonn/UCRsuite.html

###Requirements Python 2.7+, numpy 1.8+

###Usage

import _ucrdtw
import numpy as np
import matplotlib.pyplot as plt

data = np.cumsum(np.random.uniform(-0.5, 0.5, 1000000))
query = np.cumsum(np.random.uniform(-0.5, 0.5, 100))
loc, dist = _ucrdtw.ucrdtw(data, query, 0.05, True)
query = np.concatenate((np.linspace(0.0, 0.0, loc), query)) + (data[loc] - query[0])

plt.figure()
plt.plot(data)
plt.plot(query)
plt.show()

About

Python extension for UCR Suite highly optimized subsequence search using Dynamic Time Warping (DTW)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 94.2%
  • Python 5.2%
  • Makefile 0.6%