Abstract
Similarity search is the core procedure for several time series mining tasks. While different distance measures can be used for this purpose, there is clear evidence that the Dynamic Time Warping (DTW) is the most suitable distance function for a wide range of application domains. Despite its quadratic complexity, research efforts have proposed a significant number of pruning methods to speed up the similarity search under DTW. However, the search may still take a considerable amount of time depending on the parameters of the search, such as the length of the query and the warping window width. The main reason is that the current techniques for speeding up the similarity search focus on avoiding the costly distance calculation between as many pairs of time series as possible. Nevertheless, the few pairs of subsequences that were not discarded by the pruning techniques can represent a significant part of the entire search time. In this work, we adapt a recently proposed algorithm to improve the internal efficiency of the DTW calculation. Our method can speed up the UCR suite, considered the current fastest tool for similarity search under DTW. More important, the longer the time needed for the search, the higher the speedup ratio achieved by our method. We demonstrate that our method performs similarly to UCR suite for small queries and narrow warping constraints. However, it performs up to five times faster for long queries and large warping windows.
Similar content being viewed by others
Notes
From this point, we use this definition for the terms subsequence similarity search and similarity search without any distinction between them.
Our implementation traverses the matrix in row-major order. However, the algorithm can also be implemented by traversing the matrix in column-major order.
The experiments were carried out in a desktop computer with 12 Intel(R) Core(TM) \(\hbox {i}7-3930K\) CPU @ 3.20GHz and 64Gb of memory running Debian GNU/Linux 7.3.
References
Bachlin M, Plotnik M, Roggen D, Maidan I, Hausdorff JM, Giladi N, Troster G (2010) Wearable assistant for parkinsons disease patients with the freezing of gait symptom. IEEE Trans Inf Technol Biomed 14(2):436–446
Begum N, Ulanova L, Wang J, Keogh E (2015) Accelerating dynamic time warping clustering with a novel admissible pruning strategy. In: Proceedings of the 21th ACM SIGKDD international conference on knowledge discovery and data mining, ACM, pp 49–58
Chavoshi N, Hamooni H, Mueen A (2016) Debot: Twitter bot detection via warped correlation. In: Proceedings of the IEEE international conference on data mining, IEEE, pp 817–822
Chen Y, Keogh E, Hu B, Begum N, Bagnall A, Mueen A, Batista GEAPA (2015) The UCR time series classification archive. www.cs.ucr.edu/~eamonn/time_series_data/
Deng JJ, Leung CH (2015) Dynamic time warping for music retrieval using time series modeling of musical emotions. IEEE Trans Affect Comput 6(2):137–151
Ding H, Trajcevski G, Scheuermann P, Wang X, Keogh E (2008) Querying and mining of time series data: experimental comparison of representations and distance measures. Proc VLDB Endow 1(2):1542–1552
Goldberger AL, Amaral LA, Glass L, Hausdorff JM, Ivanov PC, Mark RG, Mietus JE, Moody GB, Peng CK, Stanley HE (2000) Physiobank, physiotoolkit, and physionet components of a new research resource for complex physiologic signals. Circulation 101(23):e215–e220
Górecki T, Łuczak M (2015) Multivariate time series classification with parametric derivative dynamic time warping. Expert Syst Appl 42(5):2305–2312
Hjaltason GR, Samet H (2003) Index-driven similarity search in metric spaces (survey article). ACM Trans Database Syst 28(4):517–580
Itakura F (1975) Minimum prediction residual principle applied to speech recognition. IEEE Trans Acoust Speech Signal Process 23(1):67–72
Jeong YS, Jeong MK, Omitaomu OA (2011) Weighted dynamic time warping for time series classification. Pattern Recognit 44(9):2231–2240
Kachuee M, Kiani MM, Mohammadzade H, Shabany M (2015) Cuff-less high-accuracy calibration-free blood pressure estimation using pulse transit time. In: IEEE international symposium on circuits and systems, IEEE, pp 1006–1009
Kate RJ (2016) Using dynamic time warping distances as features for improved time series classification. Data Min Knowl Discov 30(2):283–312
Keogh EJ, Pazzani MJ (2001) Derivative dynamic time warping. In: SIAM international conference on data mining, SIAM, pp 1–11
Keogh E, Ratanamahatana CA (2005) Exact indexing of dynamic time warping. Knowl Inf Syst 7(3):358–386
Keogh E, Wei L, Xi X, Vlachos M, Lee SH, Protopapas P (2009) Supporting exact indexing of arbitrarily rotated shapes and periodic time series under euclidean and warping distance measures. VLDB J 18(3):611–630
Kim SW, Park S, Chu WW (2001) An index-based approach for similarity search supporting time warping in large sequence databases. In: International conference on data engineering, pp 607–614
Marteau PF (2009) Time warp edit distance with stiffness adjustment for time series matching. IEEE Trans Pattern Anal Mach Intell 31(2):306–318
Moody GB, Mark RG (2001) The impact of the MIT-BIH arrhythmia database. IEEE Eng Med Biol Mag 20(3):45–50
Mueen A, Chavoshi N, Abu-El-Rub N, Hamooni H, Minnich A (2016) Awarp: fast warping distance for sparse time series. In: IEEE international conference on data mining. IEEE, Barcelona, pp 350–359
Müller M (2007) Information retrieval for music and motion. Springer-Verlag, New York Inc, Secaucus
Murray D, Liao J, Stankovic L, Stankovic V, Hauxwell-Baldwin R, Wilson C, Coleman M, Kane T, Firth S (2015) A data management platform for personalised real-time energy feedback. In: International conference energy efficiency in domestic appliances and lighting, pp 1293–1307
Park CH (2015) Query by humming based on multiple spectral hashing and scaled open-end dynamic time warping. Signal Process 108:220–225
Pettersen SA, Johansen D, Johansen H, Berg-Johansen V, Gaddam VR, Mortensen A, Langseth R, Griwodz C, Stensland HK, Halvorsen P (2014) Soccer video and player position dataset. In: ACM multimedia systems conference, ACM, pp 18–23
Rakthanmanon T, Campana B, Mueen A, Batista GEAPA, Westover B, Zhu Q, Zakaria J, Keogh E (2012) Searching and mining trillions of time series subsequences under dynamic time warping. In: Proceedings of the 18th ACM SIGKDD international conference on knowledge discovery and data mining, pp 262–270
Ratanamahatana CA, Keogh E (2005) Three myths about dynamic time warping data mining. In: Proceedings of the SIAM international conference on data mining, pp 506–510
Reiss A, Stricker D (2012) Introducing a new benchmarked dataset for activity monitoring. In: Proceedings of the 16th international symposium on wearable computers, IEEE, pp 108–109
Ren Z, Fan C, Ming Y (2016) Music retrieval based on rhythm content and dynamic time warping method. In: IEEE International conference on signal processing. IEEE, Hong Kong, pp 989–992
Sakoe H, Chiba S (1978) Dynamic programming algorithm optimization for spoken word recognition. IEEE Trans Acoust Speech Signal Process 26(1):43–49
Salvador S, Chan P (2007) Toward accurate dynamic time warping in linear time and space. Intell Data Anal 11(5):561–580
Shen Y, Chen Y, Keogh E, Jin H (2017) Searching time series with invariance to large amounts of uniform scaling. In: IEEE international conference on data engineering, IEEE, pp 111–114
Shokoohi-Yekta M, Hu B, Jin H, Wang J, Keogh E (2017) Generalizing dtw to the multi-dimensional case requires an adaptive approach. Data Min Knowl Discov 1(31):1–31
Silva DF, Batista GEAPA (2016) Speeding up all-pairwise dynamic time warping matrix calculation. In: Proceedings of the SIAM international conference on data mining, pp 837–845
Silva DF, Batista GEAPA, Keogh E (2016a) Prefix and suffix invariant dynamic time warping. In: IEEE international conference on data mining, IEEE, pp 1209–1214
Silva DF, Giusti R, Keogh E, Batista GEAPA (2016b) UCR-USP suite website. https://sites.google.com/view/ucruspsuite
Stefan A, Athitsos V, Das G (2013) The move-split-merge metric for time series. IEEE Trans Knowl Data Eng 25(6):1425–1438
Vlachos M, Hadjieleftheriou M, Gunopulos D, Keogh E (2006) Indexing multidimensional time-series. VLDB J 15(1):1–20
Wang X, Mueen A, Ding H, Trajcevski G, Scheuermann P, Keogh E (2013) Experimental comparison of representation methods and distance measures for time series data. Data Min Knowl Discov 26(2):275–309
Xu R, Wunsch D (2008) Clustering, vol 10. Wiley, Hoboken
Author information
Authors and Affiliations
Corresponding author
Additional information
Responsible editor: Jian Pei.
This work was funded by Grants #2012/08923-8, #2013/26151-5, and #2016/04986-6 São Paulo Research Foundation (FAPESP) and 306631/2016-4 National Council for Scientific and Technological Development (CNPq).
Rights and permissions
About this article
Cite this article
Silva, D.F., Giusti, R., Keogh, E. et al. Speeding up similarity search under dynamic time warping by pruning unpromising alignments. Data Min Knowl Disc 32, 988–1016 (2018). https://doi.org/10.1007/s10618-018-0557-y
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10618-018-0557-y