https://github.com/statefb/dtwalign
Comprehensive dynamic time warping module for python
https://github.com/statefb/dtwalign
alignment distance-calculation distance-measures dtw python time-series
Last synced: 3 months ago
JSON representation
Comprehensive dynamic time warping module for python
- Host: GitHub
- URL: https://github.com/statefb/dtwalign
- Owner: statefb
- License: mit
- Created: 2018-01-11T02:29:39.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2022-12-30T15:05:31.000Z (over 3 years ago)
- Last Synced: 2025-09-14T11:36:38.511Z (7 months ago)
- Topics: alignment, distance-calculation, distance-measures, dtw, python, time-series
- Language: Python
- Homepage:
- Size: 3.57 MB
- Stars: 109
- Watchers: 7
- Forks: 20
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# DTW (Dynamic Time Warping)
[](https://dtwalign.readthedocs.io/en/latest/?badge=latest)

Comprehensive dynamic time warping module for python.
Documentation is [available via ReadTheDocs](https://dtwalign.readthedocs.io/en/latest/index.html).
**Note: Please consider to use [python-dtw](https://dynamictimewarping.github.io/) package which is compatible with [dtw for R](https://cran.r-project.org/web/packages/dtw/index.html).**
## Installation
```
pip install dtwalign
```
## Features
### Fast computation
---
by [Numba](https://numba.pydata.org)
### Partial alignment
---
- before alignment

- after alignment

### Local constraint (step pattern)
---
example:
| Symmetric2 | AsymmetricP2 | TypeIVc |
| :--------------------------: | :----------------------------: | :-----------------------: |
|  |  |  |
### Global constraint (windowing)
---
example:
| Sakoechiba | Itakura | User defined |
| :--------------------------: | :-----------------------: | :------------------------: |
|  |  |  |
### Alignment path visualization
---

## Usage
see [example](https://htmlpreview.github.io/?https://github.com/statefb/dtwalign/blob/master/example/example.html)
## Reference
1. Sakoe, H.; Chiba, S., Dynamic programming algorithm optimization for spoken word recognition, Acoustics, Speech, and Signal Processing
- Paolo Tormene, Toni Giorgino, Silvana Quaglini, Mario Stefanelli (2008). Matching Incomplete Time Series with Dynamic Time Warping: An Algorithm and an Application to Post-Stroke Rehabilitation. Artificial Intelligence in Medicine, 45(1), 11-34.
- Toni Giorgino (2009). Computing and Visualizing Dynamic Time Warping Alignments in R: The dtw Package. Journal of Statistical Software, 31(7), 1-24.