# DTW (Dynamic Time Warping) requires prior normalization?

I'm trying DTW from mlpy, to check similarity between time series.

Should I normalize the series before processing them with DTW? Or is it somewhat tolerant and I can use the series as they are?

All time series stored in a Pandas Dataframe, each in one column. Size is less than 10k points.

DTW often uses a distance between symbols, e.g. a Manhattan distance $(d(x, y) = {\displaystyle |x-y|}$). Whether symbols are samples or features, they might require amplitude (or at least) normalization. Should they? I wish I could answer such a question in all cases. However, you can find some hints in:

In 99% of cases, you must z-normalize.

Want to know why? I wrote a tutorial on this, page 46 http://www.cs.unm.edu/~mueen/DTW.pdf

• Any easy way to do this z-normalizaiton in Python? Jan 3, 2017 at 10:00
• And, by the way, nice presentation! Jan 3, 2017 at 10:17
• @KcFnMi z-normalization in Python: docs.scipy.org/doc/scipy-0.14.0/reference/generated/… Jan 5, 2017 at 8:56
• @eamonn Awesome slides, thanks for sharing your experience, I can't up vote the answer enough
– Emer
Mar 14, 2019 at 14:59
• @eamonn What if the data is multimodal?
– Alex
Aug 22, 2020 at 22:35