diff --git a/README.md b/README.md index c9758f2..6231bb0 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,18 @@ -# DTW-C++ +DTW-C++ +=========================== +[![Ubuntu unit](https://github.com/Battery-Intelligence-Lab/dtw-cpp/workflows/Ubuntu%20unit/badge.svg)](https://github.com/Battery-Intelligence-Lab/dtw-cpp/actions) +[![macOS unit](https://github.com/Battery-Intelligence-Lab/dtw-cpp/workflows/macOS%20unit/badge.svg)](https://github.com/Battery-Intelligence-Lab/dtw-cpp/actions) +[![Windows unit](https://github.com/Battery-Intelligence-Lab/dtw-cpp/workflows/Windows%20unit/badge.svg)](https://github.com/Battery-Intelligence-Lab/dtw-cpp/actions) +![Website](https://img.shields.io/website?url=https%3A%2F%2FBattery-Intelligence-Lab.github.io%2Fdtw-cpp%2F) +[![codecov](https://codecov.io/gh/Battery-Intelligence-Lab/dtw-cpp/branch/main/graph/badge.svg?token=K739SRV4QG)](https://codecov.io/gh/Battery-Intelligence-Lab/dtw-cpp) -DTW-C++ is a dynamic time warping (DTW) based clustering library in C++. The user can input multiple time series (potentially of variable lengths) and the number of desired clusters if known or a range of possible cluster numbers if not known. DTW-C++ can cluster the time series using k-Medoids or mixed integer programming (MIP). k-Medoids is generally quicker but may be subject to sticking in local optima, whereas MIP can find globally optimal clusters. ANY DEPENDANCIES? + +![GitHub all releases](https://img.shields.io/github/downloads/Battery-Intelligence-Lab/dtw-cpp/total) +[![](https://img.shields.io/badge/license-BSD--3--like-5AC451.svg)](https://github.com/Battery-Intelligence-Lab/dtw-cpp/blob/main/LICENSE) + +In this `readme.md` a summary is given. You may find the detailed documentation [here](https://Battery-Intelligence-Lab.github.io/dtw-cpp/). +If you are affected by the sudden change of main branch, please switch to [dtw-cpp_v0.0.2]([https://github.com/Battery-Intelligence-Lab/dtw-cpp/tree/dtw-cpp_v2](https://github.com/Battery-Intelligence-Lab/dtw-cpp/tree/dtwc_0_0_2)) branch. + +Introduction +=========================== +DTW-C++ is a dynamic time warping (DTW) and clustering library, written in C++, for time series data. The user can input multiple time series (potentially of variable lengths), and the number of desired clusters (if known), or a range of possible cluster numbers (if the specific number is not known). DTW-C++ can cluster time series data using k-medoids or mixed integer programming (MIP); k-medoids is generally quicker, but may be subject getting stuck in local optima, whereas MIP can find globally optimal clusters. diff --git a/joss/paper.bib b/joss/paper.bib index 6eaa4b7..4758a18 100644 --- a/joss/paper.bib +++ b/joss/paper.bib @@ -1,156 +1,3 @@ - -@article{reniers2019review, - title={Review and performance comparison of mechanical-chemical degradation models for lithium-ion batteries}, - author={Reniers, Jorn M and Mulder, Grietus and Howey, David A}, - journal={Journal of The Electrochemical Society}, - Doi = {10.1149/2.0281914jes}, - volume={166}, - number={14}, - pages={A3189}, - year={2019}, - publisher={IOP Publishing} -} - -@article{reiners2022digital, - title={Digital twin of a MWh-scale grid battery system for efficiency and degradation analysis}, - author={Reniers, Jorn M and Howey, David A}, - year={2022}, -} - - -@article{kumtepeli2020energy, - title={Energy arbitrage optimization with battery storage: 3D-MILP for electro-thermal performance and semi-empirical aging models}, - author={Kumtepeli, Volkan and Hesse, Holger C and Schimpe, Michael and Tripathi, Anshuman and Wang, Youyi and Jossen, Andreas}, - journal={IEEE Access}, - volume={8}, - pages={204325--204341}, - year={2020}, - publisher={IEEE} -} - -@inproceedings{naumann2017simses, - title={Simses: Software for techno-economic simulation of stationary energy storage systems}, - author={Naumann, Maik and Truong, Cong Nam and Schimpe, Michael and Kucevic, Daniel and Jossen, Andreas and Hesse, Holger C}, - booktitle={International ETG Congress 2017}, - pages={1--6}, - year={2017}, - organization={VDE} -} - -@article{moller2022simses, - title={SimSES: A holistic simulation framework for modeling and analyzing stationary energy storage systems}, - author={M{\"o}ller, Marc and Kucevic, Daniel and Collath, Nils and Parlikar, Anupam and Dotzauer, Petra and Tepe, Benedikt and Englberger, Stefan and Jossen, Andreas and Hesse, Holger}, - journal={Journal of Energy Storage}, - volume={49}, - pages={103743}, - year={2022}, - publisher={Elsevier} -} - -@article{tranter2022liionpack, - title={liionpack: A Python package for simulating packs of batteries with PyBaMM}, - author={Tranter, Thomas and Timms, Robert and Sulzer, Valentin and Planella, Ferran and Wiggins, Gavin and Karra, Suryanarayana and Agarwal, Priyanshu and Chopra, Saransh and Allu, Srikanth and Shearing, Paul and others}, - journal={Journal of Open Source Software}, - volume={7}, - number={70}, - year={2022}, - publisher={The Open Journal} -} - -@article{howey2019tools, - title={Tools for battery health diagnostics and prediction}, - author={Howey, David A}, - journal={The Electrochemical Society Interface}, - volume={28}, - number={1}, - pages={55}, - year={2019}, - publisher={IOP Publishing} -} - -@article{Pearson:2017, - Adsnote = {Provided by the SAO/NASA Astrophysics Data System}, - Adsurl = {http://adsabs.harvard.edu/abs/2017arXiv170304627P}, - Archiveprefix = {arXiv}, - Author = {{Pearson}, S. and {Price-Whelan}, A.~M. and {Johnston}, K.~V.}, - Eprint = {1703.04627}, - Journal = {ArXiv e-prints}, - Keywords = {Astrophysics - Astrophysics of Galaxies}, - Month = mar, - Title = {{Gaps in Globular Cluster Streams: Pal 5 and the Galactic Bar}}, - Year = 2017} - -@book{Binney:2008, - Adsnote = {Provided by the SAO/NASA Astrophysics Data System}, - Adsurl = {http://adsabs.harvard.edu/abs/2008gady.book.....B}, - Author = {{Binney}, J. and {Tremaine}, S.}, - Booktitle = {Galactic Dynamics: Second Edition, by James Binney and Scott Tremaine.~ISBN 978-0-691-13026-2 (HB).~Published by Princeton University Press, Princeton, NJ USA, 2008.}, - Publisher = {Princeton University Press}, - Title = {{Galactic Dynamics: Second Edition}}, - Year = 2008} - -@article{zenodo, - Abstractnote = {

Gala is a Python package for Galactic astronomy and gravitational dynamics. The bulk of the package centers around implementations of gravitational potentials, numerical integration, and nonlinear dynamics.

}, - Author = {Adrian Price-Whelan and Brigitta Sipocz and Syrtis Major and Semyeong Oh}, - Date-Modified = {2017-08-13 14:14:18 +0000}, - Doi = {10.5281/zenodo.833339}, - Month = {Jul}, - Publisher = {Zenodo}, - Title = {adrn/gala: v0.2.1}, - Year = {2017}, - Bdsk-Url-1 = {http://dx.doi.org/10.5281/zenodo.833339}} - -@ARTICLE{gaia, - author = {{Gaia Collaboration} and {Prusti}, T. and {de Bruijne}, J.~H.~J. and - {Brown}, A.~G.~A. and {Vallenari}, A. and {Babusiaux}, C. and - {Bailer-Jones}, C.~A.~L. and {Bastian}, U. and {Biermann}, M. and - {Evans}, D.~W. and et al.}, - title = "{The Gaia mission}", - journal = {\aap}, -archivePrefix = "arXiv", - eprint = {1609.04153}, - primaryClass = "astro-ph.IM", - keywords = {space vehicles: instruments, Galaxy: structure, astrometry, parallaxes, proper motions, telescopes}, - year = 2016, - month = nov, - volume = 595, - eid = {A1}, - pages = {A1}, - doi = {10.1051/0004-6361/201629272}, - adsurl = {http://adsabs.harvard.edu/abs/2016A%26A...595A...1G}, - adsnote = {Provided by the SAO/NASA Astrophysics Data System} -} - -@ARTICLE{astropy, - author = {{Astropy Collaboration} and {Robitaille}, T.~P. and {Tollerud}, E.~J. and - {Greenfield}, P. and {Droettboom}, M. and {Bray}, E. and {Aldcroft}, T. and - {Davis}, M. and {Ginsburg}, A. and {Price-Whelan}, A.~M. and - {Kerzendorf}, W.~E. and {Conley}, A. and {Crighton}, N. and - {Barbary}, K. and {Muna}, D. and {Ferguson}, H. and {Grollier}, F. and - {Parikh}, M.~M. and {Nair}, P.~H. and {Unther}, H.~M. and {Deil}, C. and - {Woillez}, J. and {Conseil}, S. and {Kramer}, R. and {Turner}, J.~E.~H. and - {Singer}, L. and {Fox}, R. and {Weaver}, B.~A. and {Zabalza}, V. and - {Edwards}, Z.~I. and {Azalee Bostroem}, K. and {Burke}, D.~J. and - {Casey}, A.~R. and {Crawford}, S.~M. and {Dencheva}, N. and - {Ely}, J. and {Jenness}, T. and {Labrie}, K. and {Lim}, P.~L. and - {Pierfederici}, F. and {Pontzen}, A. and {Ptak}, A. and {Refsdal}, B. and - {Servillat}, M. and {Streicher}, O.}, - title = "{Astropy: A community Python package for astronomy}", - journal = {\aap}, -archivePrefix = "arXiv", - eprint = {1307.6212}, - primaryClass = "astro-ph.IM", - keywords = {methods: data analysis, methods: miscellaneous, virtual observatory tools}, - year = 2013, - month = oct, - volume = 558, - eid = {A33}, - pages = {A33}, - doi = {10.1051/0004-6361/201322068}, - adsurl = {http://adsabs.harvard.edu/abs/2013A%26A...558A..33A}, - adsnote = {Provided by the SAO/NASA Astrophysics Data System} -} - @article{Aghabozorgi2015, abstract = {Clustering is a solution for classifying enormous data when there is not any early knowledge about classes. With emerging new concepts like cloud computing and big data and their vast applications in recent years, research works have been increased on unsupervised solutions like clustering algorithms to extract knowledge from this avalanche of data. Clustering time-series data has been used in diverse scientific areas to discover patterns which empower data analysts to extract valuable information from complex and massive datasets. In case of huge datasets, using supervised classification solutions is almost impossible, while clustering can solve this problem using un-supervised approaches. In this research work, the focus is on time-series data, which is one of the popular data types in clustering problems and is broadly used from gene expression data in biology to stock market analysis in finance. This review will expose four main components of time-series clustering and is aimed to represent an updated investigation on the trend of improvements in efficiency, quality and complexity of clustering time-series approaches during the last decade and enlighten new paths for future works.}, author = {Saeed Aghabozorgi and Ali Seyed Shirkhorshidi and Teh Ying Wah}, @@ -224,3 +71,73 @@ @misc{UCRArchive2018 month = {October}, note = {\url{https://www.cs.ucr.edu/~eamonn/time_series_data_2018/}} } + +@article{Sakoe1978, + abstract = {This paper reports on an optimum dynamic programming (DP) based time-normalization algorithm for spoken word recognition. First, a general principle of time-normalization is given using time-warping function. Then, two time-normalized distance definitions, called symmetric and asymmetric forms, are derived from the principle. These two forms are compared with each other through theoretical discussions and experimental studies. The symmetric form algorithm superiority is established. A new technique, called slope constraint, is successfully introduced, in which the warping function slope is restricted so as to improve discrimination between words in different categories. The effective slope constraint characteristic is qualitatively analyzed, and the optimum slope constraint condition is determined through experiments. The optimized algorithm is then extensively subjected to experimental comparison with various DP-algorithms, previously applied to spoken word recognition by different research groups. The experiment shows that the present algorithm gives no more than about two-thirds errors, even compared to the best conventional algorithm. © 1978 IEEE}, + author = {Hiroaki Sakoe and Seibi Chiba}, + doi = {10.1109/TASSP.1978.1163055}, + issn = {00963518}, + issue = {1}, + journal = {IEEE Transactions on Acoustics, Speech, and Signal Processing}, + pages = {43-49}, + title = {Dynamic Programming Algorithm Optimization for Spoken Word Recognition}, + volume = {26}, + year = {1978}, +} + +@article{Rajabi2020, + abstract = {Smart meters have been widely deployed in power networks since the last decade. This trend has resulted in an enormous volume of data being collected from the electricity customers. To gain benefits for various stakeholders in power systems, proper data mining techniques, such as clustering, need to be employed to extract the underlying patterns from energy consumptions. In this paper, a comparative study of different techniques for load pattern clustering is carried out. Different parameters of the methods that affect the clustering results are evaluated and the clustering algorithms are compared for two data sets. In addition, the two suitable and commonly used data size reduction techniques and feature definition/extraction methods for load pattern clustering are analysed. Furthermore, the existing studies on clustering of electricity customers are reviewed and the main results are highlighted. Finally, the future trends and major applications of clustering consumption patterns are outlined to inform industry practitioners and academic researchers to optimize smart meter operational use and effectiveness.}, + author = {Amin Rajabi and Mohsen Eskandari and Mojtaba Jabbari Ghadi and Li Li and Jiangfeng Zhang and Pierluigi Siano}, + doi = {10.1016/j.rser.2019.109628}, + issn = {18790690}, + journal = {Renewable and Sustainable Energy Reviews}, + keywords = {Clustering algorithms,Comparative study,Data mining,Load pattern,Smart grids,Smart meters}, + month = {3}, + publisher = {Elsevier Ltd}, + title = {A comparative study of clustering techniques for electrical load pattern segmentation}, + volume = {120}, + year = {2020}, +} + +@misc{Tavenard2020, + abstract = {tslearn is a general-purpose Python machine learning library for time series that offers tools for pre-processing and feature extraction as well as dedicated models for clustering, classification and regression. It follows scikit-learn's Application Programming Interface for transformers and estimators, allowing the use of standard pipelines and model selection tools on top of tslearn objects. It is distributed under the BSD-2-Clause license, and its source code is available at https://github.com/tslearn-team/tslearn.}, + author = {Romain Tavenard and Johann Faouzi and Gilles Vandewiele and Felix Divo and Guillaume Androz and Chester Holtz and Marie Payne and Roman Yurchak and Marc Rußwurm}, + journal = {Journal of Machine Learning Research}, + keywords = {classification,clustering,data mining,pre-processing,time series}, + pages = {1-6}, + title = {Tslearn, A Machine Learning Toolkit for Time Series Data}, + volume = {21}, + url = {https://github.com/tslearn-team/tslearn.}, + year = {2020}, +} + +@misc{Dau2018, + author = {Hoang Anh Dau and Eamonn Keogh and Kaveh Kamgar and Chin-Chia Michael Yeh and Yan Zhu and Shaghayegh Gharghabi and Chotirat Ann Ratanamahatana and Yanping and Bing Hu and Nurjahan Begum and Anthony Bagnall and Abdullah Mueen and Gustavo Batista}, + month = {10}, + title = {The UCR Time Series Classification Archive}, + url = {https://www.cs.ucr.edu/~eamonn/time_series_data_2018/}, + year = {2018}, +} + +@article{Huangfu2018, + abstract = {This paper introduces the design and implementation of two parallel dual simplex solvers for general large scale sparse linear programming problems. One approach, called PAMI, extends a relatively unknown pivoting strategy called suboptimization and exploits parallelism across multiple iterations. The other, called SIP, exploits purely single iteration parallelism by overlapping computational components when possible. Computational results show that the performance of PAMI is superior to that of the leading open-source simplex solver, and that SIP complements PAMI in achieving speedup when PAMI results in slowdown. One of the authors has implemented the techniques underlying PAMI within the FICO Xpress simplex solver and this paper presents computational results demonstrating their value. In developing the first parallel revised simplex solver of general utility, this work represents a significant achievement in computational optimization.}, + author = {Q. Huangfu and J. A.J. Hall}, + doi = {10.1007/s12532-017-0130-5}, + issn = {18672957}, + issue = {1}, + journal = {Mathematical Programming Computation}, + keywords = {Linear programming,Parallel computing,Revised simplex method}, + month = {3}, + pages = {119-142}, + publisher = {Springer Verlag}, + title = {Parallelizing the dual revised simplex method}, + volume = {10}, + year = {2018}, +} + +@misc{gurobi, + author = {{Gurobi Optimization, LLC}}, + title = {{Gurobi Optimizer Reference Manual}}, + year = 2023, + url = "https://www.gurobi.com" +} diff --git a/joss/paper.md b/joss/paper.md index f459e88..eae4fcb 100644 --- a/joss/paper.md +++ b/joss/paper.md @@ -32,9 +32,9 @@ We present an approach for computationally efficient dynamic time warping (DTW) # Statement of need -Clustering time series is becoming increasingly popular as data availability increases; however as the data avilability increases, so does the complexity of the clustering problem. Most time series clustering objectives currently depend on dimension reduction techniques or finding features from the time series which can induce bias into the clustering [@Aghabozorgi2015]. Dynamic time warping [@Sakoe1978DynamicRecognition] is a well-known technique for manipulating time series to enable comparisons between datasets, using local warping (stretching or compressing along the time axis) of the elements within each time series to find an optimal alignment between series. This emphasises the similarity of the shapes of the respective time series, rather than the exact alignment of specific features. Unfortunately, DTW does not scale well in computational speed as the length and number of time series to be compared increases---the computational complexity grows quadratically with the total number of data points. This complexity is a barrier to DTW being widely implemented in time series clustering [@Rajabi2020ASegmentation]. ``DTW-C++`` is written to handle large time series datasets, working on the raw data rather than reduced dimension data or selected features from the time series, across the various applications. +Clustering time series is becoming increasingly popular as data availability increases; however as the data avilability increases, so does the complexity of the clustering problem. Most time series clustering objectives currently depend on dimension reduction techniques or finding features from the time series which can induce bias into the clustering [@Aghabozorgi2015]. Dynamic time warping [@Sakoe1978] is a well-known technique for manipulating time series to enable comparisons between datasets, using local warping (stretching or compressing along the time axis) of the elements within each time series to find an optimal alignment between series. This emphasises the similarity of the shapes of the respective time series, rather than the exact alignment of specific features. Unfortunately, DTW does not scale well in computational speed as the length and number of time series to be compared increases---the computational complexity grows quadratically with the total number of data points. This complexity is a barrier to DTW being widely implemented in time series clustering [@Rajabi2020]. ``DTW-C++`` is written to handle large time series datasets, working on the raw data rather than reduced dimension data or selected features from the time series, across the various applications. -While there are other packages available for time series clustering using DTW, namely [@Petitjean2011] and [@meert2020wannesm], ``DTW-C++`` offers signficant imporvements in both speed and memory use, allowing larger datasets to be clustered. This is done by task level parallelisation, allowing multiple pairwise comparsions between time series to be evaluated simulataneously, as well as more efficient memory management by solving the DTW distance using only the preceding vector rather than storing the entire warping matrix. This means that the warping path between each time series is not stored, but this is not required for the clustering process - only the final cost is needed. In addition, MIP is preferable to other DTW clustering packages which use k-based methods for clustering, as k-based methods are suseptible to sticking in local optima. MIP finds the global optimum in most cases, and in the rare event that the global optimum is not found, the gap between the best solution found and the global optimum is given. +While there are other packages available for time series clustering using DTW, namely \texttt{DTAIDistance} [@meert2020wannesm] and \texttt{TSlearn} [@Tavenard2020], ``DTW-C++`` offers signficant imporvements in both speed and memory use, allowing larger datasets to be clustered. This is done by task level parallelisation, allowing multiple pairwise comparsions between time series to be evaluated simulataneously, as well as more efficient memory management by solving the DTW distance using only the preceding vector rather than storing the entire warping matrix. This means that the warping path between each time series is not stored, but this is not required for the clustering process - only the final cost is needed. In addition, MIP is preferable to other DTW clustering packages which use k-based methods for clustering, as k-based methods are suseptible to sticking in local optima. MIP finds the global optimum in most cases, and in the rare event that the global optimum is not found, the gap between the best solution found and the global optimum is given. Time series clustering applications range from energy to find consumption patterns, to detecting brain activity in medical applications, to discovering patterns in stock price trends in the fincance industry. The target audience for this software can therefore range acorss multiple disciplines, intended for any user with a requirement for time-series clustering. @@ -43,7 +43,7 @@ Time series clustering applications range from energy to find consumption patter The current functionality of the software is as follows: -* Calculate DTW pairwise distances between time series, using a vector based approach to reduce memory use. There is also the option to use a Sakoe-Chiba band to restrict warping in the DTW distance calculation [@Sakoe1978DynamicRecognition]. This speeds up the computation time as well as being a useful constraint for some time series clustering scenarios (e.g., if an event must occur within a certain time window to be considered similar). +* Calculate DTW pairwise distances between time series, using a vector based approach to reduce memory use. There is also the option to use a Sakoe-Chiba band to restrict warping in the DTW distance calculation [@Sakoe1978]. This speeds up the computation time as well as being a useful constraint for some time series clustering scenarios (e.g., if an event must occur within a certain time window to be considered similar). * Produce a distance matrix containing all pairwise comparisons between each time series in the dataset. * Split all time series into a predefined number of clusters, with a representative centroid time series for each cluster. This can be done using MIP or k-medoids clustering, depending on user choice. * Output the clustering cost, which is the sum of distances between every time series within each cluster and its cluster centroid. @@ -90,7 +90,7 @@ The DTW distance $C_{x,y}$ is found for each pairwise comparison. As shown in \r Using this matrix, ($D$), the time series can be split into ($k$) separate clusters with integer programming. The problem formulation begins with a binary square matrix $A^{p\times p}$, where $A_{ij}=1$ if time series ($j$) is a member of the $i$th cluster centroid, and 0 otherwise, as shown in \autoref{fig:A_matrix}. -![Example output from the clustering process, where an entry of 1 indicates that time series $j$ belongs to cluster with centroid $i$. \label{fig:A_matrix}](../media/cluster_matrix_formation4.svg) +![Example output from the clustering process, where an entry of 1 indicates that time series $j$ belongs to cluster with centroid $i$. \label{fig:A_matrix}](../media/cluster_matrix_formation4.svg){ width=70% } As each centroid has to be in its own cluster, non-zero diagonal entries in $A$ represent centroids. In summary, the following constraints apply: @@ -118,13 +118,13 @@ The optimisation problem to solve, subject to the above constraints, is A^\star = \min_{A} \sum_i \sum_j D_{ij} \times A_{ij}. \end{equation} -After solving this integer program, the non-zero diagonal entries of ($A$) represent the centroids, and the non-zero elements in the corresponding columns in ($A$) represent the members of that cluster. In the example in \autoref{fig:A_matrix}, the clusters are time series 1, **2**, 5 and 3, **4** with the bold time series being the centroids. +This integer program is solved using Gurobi [@gurobi] or HiGHS [@Huangfu2018]. After solving this integer program, the non-zero diagonal entries of ($A$) represent the centroids, and the non-zero elements in the corresponding columns in ($A$) represent the members of that cluster. In the example in \autoref{fig:A_matrix}, the clusters are time series 1, **2**, 5 and 3, **4** with the bold time series being the centroids. Finding global optimality can increase the computation time, depending on the number of time series within the dataset and the DTW distances. Therefore, there is also a built-in option to cluster using k-medoids, as used in other packages such as \texttt{DTAIDistance} [@meert2020wannesm]. The k-medoids method is often quicker as it is an iterative approach, however it is subject to getting stuck in local optima. The results in the next section show the timing and memory performance of both MIP clustering and k-medoids clustering using \texttt{DTW-C++} compared to other packages. # Comparison -We compared our approach with two other DTW clustering packages, \texttt{DTAIDistance} [@Meert2020Dtaidistance] and \texttt{TSlearn} [@Tavenard2020TslearnData]. The datasets used for the comparison are from the UCR Time Series Classification Archive [@Dau2018TheArchive], and consist of 128 time series datasets with up to 16,800 data series of lengths up to 2,844. The full results can be found in the Appendix. Benchmarking against \texttt{TSlearn} was stopped after the first 22 datasets because the results were consistently over 20 times slower than \texttt{DTW-C++}. \autoref{tab} shows the results for datasets downselected to have a number of time series ($N$) greater than 100 and a length of each time series greater than 500 points. This is because \texttt{DTW-C++} is aimed at larger datasets where the speed improvements are more relevant. +We compared our approach with two other DTW clustering packages, \texttt{DTAIDistance} [@meert2020wannesm] and \texttt{TSlearn} [@Tavenard2020]. The datasets used for the comparison are from the UCR Time Series Classification Archive [@Dau2018], and consist of 128 time series datasets with up to 16,800 data series of lengths up to 2,844. The full results can be found in the Appendix. Benchmarking against \texttt{TSlearn} was stopped after the first 22 datasets because the results were consistently over 20 times slower than \texttt{DTW-C++}. \autoref{tab} shows the results for datasets downselected to have a number of time series ($N$) greater than 100 and a length of each time series greater than 500 points. This is because \texttt{DTW-C++} is aimed at larger datasets where the speed improvements are more relevant.