pollen-robotics / dtw

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

Removal of normalisation in version 1.4 #42

Closed Meldanen closed 5 years ago

Meldanen commented 5 years ago

Hi again,

(Continuing our email exchange and following your suggestion to post it here)

I'd like to find out the similarity between the two signals. In order to do this should I repeat what you did before this version change?

distance / sum(acc_cost_matrix.shape)

or would you suggest a different method?

Thanks, Alex

pierre-rouanet commented 5 years ago

Hi @Meldanen,

I guess the answer is really dependent on your data.

The normalisation used before the recent update in version 1.4 was meant to let you more directly measure similarity between signals with very different length. You can think of comparing recorded spoken words (for instance the word "cat" with one second of background noise before and another word "cat" with almost no noise before and after). In such context you may want to normalise the distance by the length of your signals.

In another context, this normalisation may actually not be useful.

Meldanen commented 5 years ago

Hi @pierre-rouanet ,

Thank you for your quick reply.

Yeah I suppose that makes sense. I'll look into a few normalisation methods and commpare.

Thanks again!

DZNarayanan commented 4 years ago

Hi @pierre-rouanet. How can I get access to DTW version 1.33?

Thank you.

pierre-rouanet commented 4 years ago

pip install dtw==1.3.3

DZNarayanan commented 4 years ago

Thank you very much @pierre-rouanet.