0
1

I have two time series q and c and I want to calculate dynamic time wrapping (DTW) distance between these two time series:

 q<-c(1,3,4,5,6,7)
 c<-c(2,3,1,5,3,4)

As I understand we should make a matrix like this:

4  9  1  0  1  4  9
3  16 0  1  4  9  16
5  16 4  1  0  1  4
1  0  4  9  16 25 36
3  4  0  1  4  9  16
   1  3  4  5  6  7

I have read many references, but I could not understand how to find the best path in this matrix. Could you please explain me how can I find the best path through this matrix, and then how can I calculate DTW?

asked Jan 22 '14 at 15:55

Babak's gravatar image

Babak
16447

Be the first one to answer this question!
toggle preview

powered by OSQA

User submitted content is under Creative Commons: Attribution - Share Alike; Other things copyright (C) 2010, MetaOptimize LLC.