Closed castdice closed 1 year ago
I am trying to use the package in my work but found the dtw distance computed by this package is different from some other version of dtw implementations. Here is the code snippet:
from dtw import * x=[0, 1, 2, 3, 4, 5, 6, 7, 8] y=[1, 2, 3, 4, 5, 6, 7, 7, 10] alignments = dtw(x, y) dtw_dist = alignments.distance print("DTW package result: {}".format(dtw_dist))
and the output is
DTW package result: 4.0
However, the output of matlab is:
x=[0, 1, 2, 3, 4, 5, 6, 7, 8] y=[1, 2, 3, 4, 5, 6, 7, 7, 10] dtw(x, y)
ans = 3
The default distance for both functions is euclidean. I am new to this field. Did I do something wrong? Thank you for your patience.
See FAQ 1 and 2 here https://dynamictimewarping.github.io/faq/
That really helps. Thank you!
I am trying to use the package in my work but found the dtw distance computed by this package is different from some other version of dtw implementations. Here is the code snippet:
and the output is
However, the output of matlab is:
The default distance for both functions is euclidean. I am new to this field. Did I do something wrong? Thank you for your patience.