Choosing a window size for DTW



I have time series data from mobile sensors for different motions such as walking, pushups, dumbellifts, rowing and so on. All these motions have different length of time series. For classifying them using Dynamic Time Warping (DTW), how do I choose an appropriate window size that will give good results?

Nitin Labhishetty

Posted 2014-09-18T06:22:13.940

Reputation: 171


You might want to check my answers on the Cross Validated site on using DTW for time series analysis: DTW for clustering and/or classification and, if applicable, DTW for irregular time series.

– Aleksandr Blekh – 2015-01-19T08:51:37.100



If you have enough data, use cross validation.

If you don't have a lot of data, use cross validation on a similar dataset, and transfer the window size (the UCR archive has a bunch of similar dataset)

Don't forget, that the best warping window size depends on the amount of training data. As you get more data, you can have a smaller warping window, see fig 6 of



Posted 2014-09-18T06:22:13.940

Reputation: 11