Contents
Dynamic Time Warping
Dyanmic Time Warping is technique which is often used in classification or clustering of time series. DTW is used as a measure of similarity for two sequences. In essence, the DTW algorithm stretches or compresses the sequences locally in order to make the two sequences resememble each other as closely as possible.
Suppose we have two time series which consist of and observations, these are often referred to as the “query” and the “reference” series.
We may define a function as a local dissimilarity measure. This is the only input required for the DTW algorithm. Typically, euclidean distance is used as the dissimilarity measure, although there are other definitions which maybe useful as well.
The key to DTW is what is known as a warping curve which remap the time indices of and .Given the warping curve, , one may compute the average acculmulated distance between two time series.