6

3

I am performing a comparison among time series by using Dynamic Time Warping (DTW). However, it is not a real distance, but a distance-like quantity, since it doesn't assure the triangle inequality to hold.

Reminder:`d:MxM->R`

is a distance if for all x,y in M:

```
1 - d(x,y) ≥ 0, and d(x,y) = 0 if and only if x = y
2 - It is symmetric: d(x,y) = d(y,x)
3 - Triangle inequality: d(x,z) ≤ d(x,y) + d(y,z)
```

There is any equivalent measure that ensures the condition of *distance* in a matemathical sense? Obviously, I am not looking for a Euclidean distance, but one that ensures the proper classification of my series in a future clustering.
If so, there is any solid implementation in a R or Python package?

What about of the average of the DTW in both directions? $dist(x, y) = \frac{1}{2}(DTW(x,y) + DTW(y,x))$. – noe – 2018-03-26T10:39:23.823

Why does that ensure the triangle inequality? I see it ensures symmetry when there is not (but in this case there is) – Ripstein – 2018-03-26T11:13:26.450

I stand corrected, thanks. I DID address the actual question, by noting that DTW IS a real measure. – Eamonn Keogh – 2018-03-30T04:58:58.533