Contents
Why do we need to know about dynamic time warping?
A decade ago, the Dynamic Time Warping (DTW) distance measure was introduced to the data mining community as a solution to this particular weakness of Euclidean distance metric [3]. This method’s flexibility allows two time series that are similar but locally out of phase to align in a non-linear manner.
How is dynamic time warping used in mlflow?
This blog is part 1 of our two-part series Using Dynamic Time Warping and MLflow to Detect Sales Trends. To go to part 2, go to Using Dynamic Time Warping and MLflow to Detect Sales Trends. The phrase “dynamic time warping,” at first read, might evoke images of Marty McFly driving his DeLorean at 88 MPH in the Back to the Future series.
Can a nearest neighbour classifier use dynamic time warping?
A nearest-neighbour classifier can achieve state-of-the-art performance when using dynamic time warping as a distance measure. In functional data analysis, time series are regarded as discretizations of smooth (differentiable) functions of time.
How does the DTW algorithm allow continuous warping?
The DTW algorithm produces a discrete matching between existing elements of one series to another. In other words, it does not allow time-scaling of segments within the sequence. Other methods allow continuous warping.
How is DTW barycenter averaging used in clustering?
A recent method DTW Barycenter Averaging (DBA) has been proposed by Petitjean et al. to average time series. In an other paper they proved empirically and theoretically how it can be used to cluster time series with k-means. An implementation is provided on GitHub by the authors ( link to code ).
When to use k-means for time warping?
K-means really should only be used with variance (= squared Euclidean), or some cases that are equivalent (like cosine, on L2 normalized data, where cosine similarity is the same as 2 − squared Euclidean distance) Instead, compute a distance matrix using DTW, then run hierarchical clustering such as single-link.
How to run hierarchical clustering using DTW?
Instead, compute a distance matrix using DTW, then run hierarchical clustering such as single-link. In contrast to k-means, the series may even have different length.