Back to results

Universidade de Coimbro

Advances in the Dynamic Time Warping Algorithm: Improvements and Applications

Abstract

dc:description.abstract

Extensive research and application have established Dynamic Time Warping (DTW) as a superior distance measure for time series analysis. By allowing non-linear warping and one-to-many alignments, DTW enables more robust matching between time series, effectively identifying similar patterns that may be out of phase. When combined with the One Nearest Neighbor (1NN) classifier, the resulting 1NN-DTW classifier is a highly competitive approach. It is not only simple to deploy and highly interpretable, but its classification accuracy is also difficult to surpass across many domains. However, the DTW algorithm always suffers from the significant drawback of high computational cost, with its quadratic time complexity. This cost is further amplified within the 1NN-DTW classifier, which requires computing DTW distances from a given sample to all templates in the dataset. The first objective of this thesis is to accelerate the 1NN-DTW classifier. We first introduce a novel algorithm named Partial Dynamic Time Warping (PDTW). Building upon the maximum warping window in Constrained DTW (CDTW), PDTW enables the segmentation of pairwise DTW computations. It slices a full DTW calculation into several independent sub-calculations, while ensuring that the alignments generated by PDTW for each segment closely approximate those of full DTW. The innovation of PDTW is achieving the separability of the dynamic programming-based DTW calculation, thereby making it feasible to abandon redundant computations to save time. Subsequently, by combining PDTW with the Early Aban doning (EA) strategy, we propose Early Abandoning DTW (EADTW). This method sig nificantly accelerates the 1NN-DTW classifier without sacrificing accuracy by pruning DTW calculations on certain non-critical segments of time series. The lower bound technique is another application of the EA strategy, which prunes unpromising candidates by using a quickly computed lower bound distance to determine if the expensive full DTW calculation can be safely skipped. Applying the separability of DTW computations enabled by PDTW, we propose the PDTWplugin to lower bound techniques. The PDTW plugin operates by applying the PDTW distance (with high tightness) to critical segments, which tightens the existing lower bounds and enhances their pruningpower. Extensive experiments demonstrate that the proposed PDTW plugin improves the performance of four popular and efficient existing lower bounds, including current SOTA methods. More importantly, the PDTW plugin exhibits excellent compat ibility, allowing it to be integrated into the majority of existing lower bounds to further improve their tightness and pruning rates. Another key focus of this thesis is the practical application of DTW-based classi fiers. First, we introduce a novel gesture recognition system based on sensors and the K-Nearest Neighbors (KNN) classifier. By classifying time series data from wearable inertial measurement units (IMUs), this system recognizes in-air handwritten English letters, offering a new approach for Human-Computer Interaction (HCI). Second, we in vestigate the comparative performance of 1NN-DTW versus KNN-DTW classifiers. By establishing a comprehensive baseline on 96 UCR datasets, we demonstrate that KNN DTW offers a slight performance advantage, although it is contingent on proper tuning. Furthermore, we provide detailed methods and results for tuning the parameter 𝑘. From our baseline of 1NN-DTW and KNN-DTW classifiers, we found that the 1NN DTW classifier remains optimal on a substantial number of datasets, suggesting that in these cases, incorporating information from additional neighbors introduces noise. This observation led us to propose a novel pruning strategy termed similarity pruning. This method decides whether to prune the remaining templates by detecting templates that are highly similar to the query sample. Experimental results demonstrate that de ploying similarity pruning not only significantly accelerates the 1NN-DTW classifier but also improves its accuracy. Crucially, due to its innovative pruning target, similarity pruning does not conflict with existing time-series-level and cell-level pruning methods, allowing for synergistic application. Furthermore, we demonstrate the generalizability of similarity pruning by successfully extending it to 1NN-ED (Euclidean Distance) and 1NN-shapeDTW classifiers, confirming its potential as a general optimization strategy for distance-based time series classification.

Author and committee

dc:creator, dc:contributor.*
Author dc:creator
  • Luo, Yuqi
Advisors dc:contributor.advisor
  • Ke, Wei
  • Filipe dos Santos Coelho Paquete, Luís

Subjects

dc:subject × 6

Rights

dc:rights
Statement dc:rights
  • openAccess
Language dc:language.iso
eng

Identifiers

dc:identifier.*
Dc Identifier Tid
101862342

Chain of custody

source
Harvested from
Universidade de Coimbro
Base URL
estudogeral.sib.uc.pt/oai/request
Last updated
2026-11-26
Source record
OAI-PMH GetRecord
citation

Luo, Yuqi. Advances in the Dynamic Time Warping Algorithm: Improvements and Applications. 2025. https://hdl.handle.net/10316/123657