pollen-robotics / dtw

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

The weighting coefficient #13

Closed wxtyixiao closed 7 years ago

wxtyixiao commented 7 years ago

In the code of dtw, maybe the weighting coefficient should be added. I don't know if my thought is right. Please give me some answers, thanks.

pierre-rouanet commented 7 years ago

Hi @wxtyixiao,

I don't really understand what you have in mind. Can you give a use example?

wxtyixiao commented 7 years ago

The distance between two time series is calculated by the formula: D(A, B)=(min(sum(d(c(k))*w(k))))/N, in which the w(k) is the weighting coefficient. It can be calculated by the symmetric form or asymmetric form.

Sakoe H, Chiba S. Dynamic programming algorithm optimization for spoken word recognition[J]. IEEE Transactions on Acoustics Speech & Signal Processing, 1978, 26(1):43-49.

pierre-rouanet commented 7 years ago

Ok I see. I don't have time to add extra feature to DTW at the moment but I'll gladly integrate a PR with this.