If you have n time series of rainfall measurements every hour (x=time, y=amount of rain), and compute the distance matrix between each pair of time series based on Dynamic Time Warping, and then plot the clusters, what do the X and Y axes on the cluster plot represent?

I have figured out that the values in the distance matrix would have the same measurement unit as the amount of rain in the time series (mm or inches of rain).

In the k-medoids or k-means plot, is X still time, and Y still the amount of rain?

  • What does DTW stand for? – n1k31t4 Sep 14 at 11:00
  • Dynamic Time Warping – FaCoffee Sep 14 at 11:26
up vote 2 down vote accepted

If you have $n$ time series of rainfall measurements every hour ($x$=time, $y$=amount of rain), and compute the distance matrix between each pair of time series based on Dynamic Time Warping, and then plot the clusters, what do the X and Y axes on the cluster plot represent?

They remain the same, $x$=time, $y$=amount of rain - dynamic time warping (DTW) shifts the times so the curves of the amount of rain align their peaks and valleys.

A different example might be easier to understand. In the paper by Berndt and Clifford (see below) the population of the Snowshoe Hare is plotted and subjected to DTW. You can see as the population of hares increased so did the ability to hunt Lynx. As the population of Lynx increased the population of hares declined. That affected the hunting of Lynx, which again allowed the hare population to increase. This creates a double-top peak in the data, using DTW these can be aligned.

In the k-medoids or k-means plot, is X still time, and Y still the amount of rain?

Having aligned the time/population (similar to time/rainfall) the locations on a map can be plotted with a k-medoids or k-means plot.

K-medoids (also: Partitioning Around Medoids, PAM) uses the medoid instead of the mean, and this way minimizes the sum of distances for arbitrary distance functions. K-means clustering aims to partition n observations into k clusters in which each observation belongs to the cluster with the nearest mean, serving as a prototype of the cluster.

The time variable would be plotted on the map for a period of time, for example a month, season, or year; so while the time is not 'lost' it's also not $x$ or $y$. Instead a color on the map could represent the amount at a location for the entire duration of the period of time.

See how when k-medoids or k-means is applied "time" does not sit on $x$ or $y$, in this example location is on the $x$ and $y$:

Data Plotted

References:

"Alignment of curves by dynamic time warping", by Theo Gasser and Kongming Wang.

"Using Dynamic Time Warping to Find Patterns in Time Series", by Donald J. Berndt and James Clifford.

"Clustering analysis applied to NDVI/NOAA multitemporal images to improve the monitoring process of sugarcane crops", by Luciana Alvim Santos Romani, Renata Ribeiro do Valle Gonçalves, Bruno Ferraz Amaral and Agma Traina.

"Clustering" does not plot the data.

Whatever you plot is what you plot, it's not inherent to the method.

If you use, e.g., the clusplot function, check its manual on what it plots (in your case, probably multidimensional scaling).

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.