7
$\begingroup$

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.

$\endgroup$
4
$\begingroup$

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:

| improve this answer | |
$\endgroup$
11
$\begingroup$

I am glad you asked ;-)

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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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