DTW
Dynamic Time Warping (DTW) is a similarity measure for temporal sequences that may vary in speed. It aligns two sequences by warping their time axes to minimize differences between corresponding elements. DTW has been widely applied in speech recognition, handwriting analysis, gesture recognition, and other time-series domains. Given two sequences X = (x1, ..., xn) and Y = (y1, ..., ym), DTW seeks an optimal alignment path that minimizes the cumulative distance between paired points after time warping.
To define DTW, specify a local distance d(x_i, y_j) (commonly the Euclidean distance). A warping path P
Variants and enhancements include constraining the warping window (e.g., Sakoe-Chiba band, Itakura parallelogram) to improve efficiency
DTW is widely used for comparing time series with speed variations but has limitations: it can over-align