pollen-robotics / dtw

DTW (Dynamic Time Warping) python module
GNU General Public License v3.0
1.16k stars 233 forks source link

Distance normalisation #2

Closed themiurgo closed 9 years ago

themiurgo commented 9 years ago

Why is distance normalised by over the sum of the shape the cost matrix (https://github.com/pierre-rouanet/dtw/blob/master/dtw.py#L38)? I couldn't find this in the definition of DTW.

pierre-rouanet commented 9 years ago

This is kind of arbitrary. This is just a way to penalize longer path. There exists many possible normalization. You can have a look at this for instance : http://www.cs.ucr.edu/~eamonn/DTW_myths.pdf

themiurgo commented 9 years ago

Great, thanks! And thanks for the nice library. :)