dtw

DTW (Dynamic Time Warping) python module

https://github.com/pollen-robotics/dtw

Science Score: 23.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    1 of 13 committers (7.7%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (8.5%) to scientific vocabulary

Keywords

distance distance-measures distance-metric dtw python
Last synced: 6 months ago · JSON representation

Repository

DTW (Dynamic Time Warping) python module

Basic Info
  • Host: GitHub
  • Owner: pollen-robotics
  • License: gpl-3.0
  • Language: Python
  • Default Branch: master
  • Size: 191 KB
Statistics
  • Stars: 1,206
  • Watchers: 32
  • Forks: 236
  • Open Issues: 16
  • Releases: 1
Topics
distance distance-measures distance-metric dtw python
Created over 11 years ago · Last pushed almost 2 years ago
Metadata Files
Readme License

README.md

Dynamic Time Warping Python Module

Build Status

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

  • the basic version (see here) for the algorithm
  • an accelerated version which relies on scipy cdist (see https://github.com/pierre-rouanet/dtw/pull/8 for detail)

```python

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, costmatrix, acccostmatrix, path = dtw(x, y, dist=manhattandistance)

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(acccostmatrix.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.

Owner

  • Name: Pollen Robotics
  • Login: pollen-robotics
  • Kind: organization
  • Email: contact@pollen-robotics.com
  • Location: Bordeaux, France

GitHub Events

Total
  • Watch event: 54
  • Fork event: 3
Last Year
  • Watch event: 54
  • Fork event: 3

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 54
  • Total Committers: 13
  • Avg Commits per committer: 4.154
  • Development Distribution Score (DDS): 0.407
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Pierre Rouanet p****t@g****m 32
mynameisvinn v****g@g****m 7
Alexander Kain k****a@o****u 3
Sebastian Rodriguez v****w@g****m 2
cperales c****s@u****s 2
Roberto r****r@h****t 1
Petr Viktorin e****u@g****m 1
Mutex86 g****h@g****m 1
Michael Schubert m****v@g****m 1
Martin Mauch m****h@g****m 1
James Christie j****e@l****m 1
David Schaefer d****r@u****e 1
cperales s****s@g****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 41
  • Total pull requests: 22
  • Average time to close issues: about 1 month
  • Average time to close pull requests: 6 days
  • Total issue authors: 40
  • Total pull request authors: 14
  • Average comments per issue: 1.83
  • Average comments per pull request: 0.95
  • Merged pull requests: 17
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 3
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 3
  • Pull request authors: 0
  • Average comments per issue: 0.33
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • schaefed (2)
  • rabihiawaludin (1)
  • TrayyTur (1)
  • Karim-53 (1)
  • rekadanielweiner (1)
  • ruiann (1)
  • FranGoitia (1)
  • wxtyixiao (1)
  • alexvks22 (1)
  • cmuell89 (1)
  • TaosifShaad (1)
  • MatthieuBizien (1)
  • Erickrus (1)
  • iWangLin (1)
  • zhangboyang (1)
Pull Request Authors
  • pierre-rouanet (5)
  • mynameisvinn (3)
  • schaefed (2)
  • nightscape (2)
  • lxkain (2)
  • renataghisloti (1)
  • encukou (1)
  • capkuro (1)
  • 0mod4 (1)
  • mschubert (1)
  • jlc-christie (1)
  • rob-med (1)
  • cperales (1)
  • mutex86 (1)
Top Labels
Issue Labels
enhancement (4) question (2) help wanted (1)
Pull Request Labels
bug (1)

Dependencies

setup.py pypi
  • numpy *
  • scipy *