Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/google-research/soft-dtw-divergences
An implementation of soft-DTW divergences.
https://github.com/google-research/soft-dtw-divergences
dtw dynamic-time-warping soft-dtw time-series
Last synced: about 1 month ago
JSON representation
An implementation of soft-DTW divergences.
- Host: GitHub
- URL: https://github.com/google-research/soft-dtw-divergences
- Owner: google-research
- License: apache-2.0
- Created: 2020-11-18T22:05:43.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2021-10-14T14:27:20.000Z (about 3 years ago)
- Last Synced: 2024-08-02T13:27:48.157Z (5 months ago)
- Topics: dtw, dynamic-time-warping, soft-dtw, time-series
- Language: Python
- Homepage:
- Size: 16.6 KB
- Stars: 131
- Watchers: 9
- Forks: 16
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
Differentiable Divergences between Time Series
==============================================An implementation of soft-DTW divergences.
Example
-------```python
import numpy as np
from sdtw_div.numba_ops import sdtw_div, sdtw_div_value_and_grad# Two 3-dimensional time series of lengths 5 and 4, respectively.
X = np.random.randn(5, 3)
Y = np.random.randn(4, 3)# Compute the divergence value. The parameter gamma controls the regularization strength.
value = sdtw_div(X, Y, gamma=1.0)# Compute the divergence value and the gradient w.r.t. X.
value, grad = sdtw_div_value_and_grad(X, Y, gamma=1.0)
```
Similarly, we can use `sharp_sdtw_div`, `sharp_sdtw_div_value_and_grad`,
`mean_cost_div` and `mean_cost_div_value_and_grad`.Install
--------Run `python setup.py install` or copy the files to your project.
Reference
----------> Differentiable Divergences between Time Series
> Mathieu Blondel, Arthur Mensch, Jean-Philippe Vert
> [arXiv:2010.08354](https://arxiv.org/abs/2010.08354)