CFFI binding for UTC DTW suite
Project description
UCRDTW-cffi: Dynamic Time Warping with UCR optimizations
=========================================================
[](https://travis-ci.org/alendit/ucrdtw_cffi)
Based on [Searching and Mining Trillions of Time Series Subsequences under Dynamic Time Warping](http://www.cs.ucr.edu/~eamonn/SIGKDD_trillion.pdf) .
C implementation from [libdtw](https://github.com/b/libdtw).
Interface and tests from https://github.com/klon/ucrdtw/.
### Requirements
Python 2.7+ or 3.3+, numpy 1.8+
### Usage
```
from ucrdtw_cffi import dtw_query
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()
```
=========================================================
[](https://travis-ci.org/alendit/ucrdtw_cffi)
Based on [Searching and Mining Trillions of Time Series Subsequences under Dynamic Time Warping](http://www.cs.ucr.edu/~eamonn/SIGKDD_trillion.pdf) .
C implementation from [libdtw](https://github.com/b/libdtw).
Interface and tests from https://github.com/klon/ucrdtw/.
### Requirements
Python 2.7+ or 3.3+, numpy 1.8+
### Usage
```
from ucrdtw_cffi import dtw_query
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()
```
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
utcdtw-cffi-0.1.tar.gz
(8.1 kB
view details)
File details
Details for the file utcdtw-cffi-0.1.tar.gz.
File metadata
- Download URL: utcdtw-cffi-0.1.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8c81c33528c80ff8538018bc0bec2ad6c8070925d36b74d6d6468c0f6c445a1b
|
|
| MD5 |
e6071be5a6558581758634d686591e1e
|
|
| BLAKE2b-256 |
1d4b2554ca5be5ed05596d719f003b49dddeb6e11d1137c46b1b85c5d22eed06
|