Table of Contents
Fetching ...

A Review and Evaluation of Elastic Distance Functions for Time Series Clustering

Chris Holder, Matthew Middlehurst, Anthony Bagnall

TL;DR

It is found that clustering with DTW distance is not better than using Euclidean distance and that distance measures that employ editing in conjunction with warping are significantly better than other approaches and that k-medoids clusterer rather than k-means improves the clusterings for all nine elastic distance measures.

Abstract

Time series clustering is the act of grouping time series data without recourse to a label. Algorithms that cluster time series can be classified into two groups: those that employ a time series specific distance measure; and those that derive features from time series. Both approaches usually rely on traditional clustering algorithms such as $k$-means. Our focus is on distance based time series that employ elastic distance measures, i.e. distances that perform some kind of realignment whilst measuring distance. We describe nine commonly used elastic distance measures and compare their performance with k-means and k-medoids clustering. Our findings are surprising. The most popular technique, dynamic time warping (DTW), performs worse than Euclidean distance with k-means, and even when tuned, is no better. Using k-medoids rather than k-means improved the clusterings for all nine distance measures. DTW is not significantly better than Euclidean distance with k-medoids. Generally, distance measures that employ editing in conjunction with warping perform better, and one distance measure, the move-split-merge (MSM) method, is the best performing measure of this study. We also compare to clustering with DTW using barycentre averaging (DBA). We find that DBA does improve DTW k-means, but that the standard DBA is still worse than using MSM. Our conclusion is to recommend MSM with k-medoids as the benchmark algorithm for clustering time series with elastic distance measures. We provide implementations in the aeon toolkit, results and guidance on reproducing results on the associated GitHub repository.

A Review and Evaluation of Elastic Distance Functions for Time Series Clustering

TL;DR

It is found that clustering with DTW distance is not better than using Euclidean distance and that distance measures that employ editing in conjunction with warping are significantly better than other approaches and that k-medoids clusterer rather than k-means improves the clusterings for all nine elastic distance measures.

Abstract

Time series clustering is the act of grouping time series data without recourse to a label. Algorithms that cluster time series can be classified into two groups: those that employ a time series specific distance measure; and those that derive features from time series. Both approaches usually rely on traditional clustering algorithms such as -means. Our focus is on distance based time series that employ elastic distance measures, i.e. distances that perform some kind of realignment whilst measuring distance. We describe nine commonly used elastic distance measures and compare their performance with k-means and k-medoids clustering. Our findings are surprising. The most popular technique, dynamic time warping (DTW), performs worse than Euclidean distance with k-means, and even when tuned, is no better. Using k-medoids rather than k-means improved the clusterings for all nine distance measures. DTW is not significantly better than Euclidean distance with k-medoids. Generally, distance measures that employ editing in conjunction with warping perform better, and one distance measure, the move-split-merge (MSM) method, is the best performing measure of this study. We also compare to clustering with DTW using barycentre averaging (DBA). We find that DBA does improve DTW k-means, but that the standard DBA is still worse than using MSM. Our conclusion is to recommend MSM with k-medoids as the benchmark algorithm for clustering time series with elastic distance measures. We provide implementations in the aeon toolkit, results and guidance on reproducing results on the associated GitHub repository.
Paper Structure (22 sections, 23 equations, 18 figures, 8 tables, 7 algorithms)

This paper contains 22 sections, 23 equations, 18 figures, 8 tables, 7 algorithms.

Figures (18)

  • Figure 1: Two most common bounding techniques everything2004knowdtw.
  • Figure 2: An example of Euclidean and DTW distance functions for two series. The left hand matrix, Figure \ref{['fig:example-distances']}(a), shows the pointwise distance between the series (matrix $M$ in Equation \ref{['eqn:dtw']}). The Euclidean distance is the sum of the diagonal path. The right hand matrix, Figure \ref{['fig:example-distances']}(b), shows the DTW distances (matrix $C$ in Equation \ref{['eqn:dtw']}) and the resulting warping path when the window size is unconstrained.
  • Figure 3: An example of constraining the DTW window. The left hand matrix, Figure \ref{['fig:example-window']}(a), show the DTW distances for the same series used in Figure \ref{['fig:example-distances']} when the window is contrained to 20% of the series length using a Sakoe-Chiba band. Figure \ref{['fig:example-window']}(a) shows the resulting alignment.
  • Figure 4: Examples of the weighted DTW cost matrix $C$ and resulting alignment for two weight parameters.
  • Figure 5: An example of the LCSS cost matrix with $\epsilon = 1$, where the white cells are members of the LCSS.
  • ...and 13 more figures