pierre-rouanet / Dtw

Licence: gpl-3.0
DTW (Dynamic Time Warping) python module

Programming Languages

python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to Dtw

similarity measures
Quantify the difference between two arbitrary curves in space
Stars: ✭ 140 (-81.82%)
Mutual labels:  distance
TriangleMeshDistance
Header only, single file, simple and efficient C++11 library to compute the signed distance function (SDF) to a triangle mesh
Stars: ✭ 55 (-92.86%)
Mutual labels:  distance
Geolib
Zero dependency library to provide some basic geo functions
Stars: ✭ 3,675 (+377.27%)
Mutual labels:  distance
geojson-python-utils
Python helper functions for manipulating GeoJSON
Stars: ✭ 86 (-88.83%)
Mutual labels:  distance
laravel-geoly
Perform fast and efficient radius searches on your Laravel Eloquent models.
Stars: ✭ 25 (-96.75%)
Mutual labels:  distance
Vincenty-Excel
Thaddeus Vincenty's Direct and Inverse formulae for geodesic calculations in Excel (distance, azimuth, latitude, longitude).
Stars: ✭ 29 (-96.23%)
Mutual labels:  distance
erkir
Երկիր (Erkir) - a C++ library for geodesic and trigonometric calculations
Stars: ✭ 26 (-96.62%)
Mutual labels:  distance
Whereami
Uses WiFi signals 📶 and machine learning to predict where you are
Stars: ✭ 4,878 (+533.51%)
Mutual labels:  distance
Multi-Face-Comparison
This repo is meant for backend API for face comparision and computer vision. It is built on python flask framework
Stars: ✭ 20 (-97.4%)
Mutual labels:  distance
Cheap Ruler
Fast approximations for common geodesic measurements 🌐
Stars: ✭ 334 (-56.62%)
Mutual labels:  distance
NearestNeighborDescent.jl
Efficient approximate k-nearest neighbors graph construction and search in Julia
Stars: ✭ 34 (-95.58%)
Mutual labels:  distance
pubg mobile memory hacking
Pubg Mobile Emulator Gameloop Memory Hacking C++ Source Code. Ex: Name, Cords, Bones, Weapons, Items, Box, Drop, Aimbot etc.
Stars: ✭ 69 (-91.04%)
Mutual labels:  distance
similar-english-words
Give me a word and I’ll give you an array of words that differ by a single letter.
Stars: ✭ 25 (-96.75%)
Mutual labels:  distance
dist
🗺️ Python/C API extension module that computes distance between two coordinates on the world map
Stars: ✭ 13 (-98.31%)
Mutual labels:  distance
Pyemd
Fast EMD for Python: a wrapper for Pele and Werman's C++ implementation of the Earth Mover's Distance metric
Stars: ✭ 361 (-53.12%)
Mutual labels:  distance
PosDefManifold.jl
A Julia package for manipulating data in the Riemannian manifold of positive definite matrices
Stars: ✭ 23 (-97.01%)
Mutual labels:  distance
dodgr
Distances on Directed Graphs in R
Stars: ✭ 106 (-86.23%)
Mutual labels:  distance
Geolocator
A utility for getting geo-location information via HTML5 and IP look-ups, geocoding, address look-ups, distance and durations, timezone information and more...
Stars: ✭ 598 (-22.34%)
Mutual labels:  distance
Stringmetric
🎯 String metrics and phonetic algorithms for Scala (e.g. Dice/Sorensen, Hamming, Jaccard, Jaro, Jaro-Winkler, Levenshtein, Metaphone, N-Gram, NYSIIS, Overlap, Ratcliff/Obershelp, Refined NYSIIS, Refined Soundex, Soundex, Weighted Levenshtein).
Stars: ✭ 481 (-37.53%)
Mutual labels:  distance
Three Mesh Bvh
A BVH implementation to speed up raycasting against three.js meshes.
Stars: ✭ 302 (-60.78%)
Mutual labels:  distance

Dynamic Time Warping Python Module

Build Status

Dynamic time warping is used as a similarity measured between temporal sequences. This package provides two implementations:

import numpy as np

# We define two sequences x, y as numpy array
# where y is actually a sub-sequence from x
x = np.array([2, 0, 1, 1, 2, 4, 2, 1, 2, 0]).reshape(-1, 1)
y = np.array([1, 1, 2, 4, 2, 1, 2, 0]).reshape(-1, 1)

from dtw import dtw

manhattan_distance = lambda x, y: np.abs(x - y)

d, cost_matrix, acc_cost_matrix, path = dtw(x, y, dist=manhattan_distance)

print(d)
>>> 2.0 # Only the cost for the insertions is kept

# You can also visualise the accumulated cost and the shortest path
import matplotlib.pyplot as plt

plt.imshow(acc_cost_matrix.T, origin='lower', cmap='gray', interpolation='nearest')
plt.plot(path[0], path[1], 'w')
plt.show()

Result of the accumulated cost matrix and the shortest path (in white) found: Acc cost matrix and shortest path

Other examples are available as notebook

Installation

python -m pip install dtw

It is tested on Python 2.7, 3.4, 3.5 and 3.6. It requires numpy and scipy.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].