New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Need help #9
Comments
Try with a small alignment that can be computed by hand. In the
documentation and tests there should be at least one.
Il mar 16 feb 2021, 15:21 Nodar Okroshiashvili <notifications@github.com>
ha scritto:
…
- Python port of R's Comprehensive Dynamic Time Warp algorithm package
version: 1.1.6
- Python version: 3.7
- Operating System: Ubuntu 18.04
Description
I want to find DTW score between two time series. To understand how these
algorithm work I use two libraries, dtw-python and tslearn
<https://github.com/tslearn-team/tslearn>.
However, I'm getting different results and I don't know why. Any help
would be appreciate :)
What I Did
import numpy as np
import tslearn.metrics as tsm
import dtw
x = np.linspace(0, 50, 100)
ts1 = pd.Series(3 * np.sin(x / .5))
ts2 = pd.Series(2 * np.sin(x))
Results
tsm.dtw(ts1, ts2) -> 16.578554103357583
dtw_result = dtw.dtw(x=ts1, y=ts2, dist_method="euclidean", step_pattern="symmetric2") -> 174.2896
Why do I have such a big difference? I tried all the available
step_pattern functions for dtw-python library but without any success.
Which one is correct result?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#9>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAU74C2OAUPPCVAMTAQE4ATS7J5PDANCNFSM4XWRDH5Q>
.
|
Sorry @tonigi I did not understand what you mean. Can you elaborate little bit more? |
. The algorithm can be "run" with pen and paper on small cases. I was suggesting to check which implementation is correct (maybe both, with different conventions) using a "manual" solution as a reference. I can't debug other people's implementations. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
I want to find DTW score between two time series. To understand how these algorithm work I use two libraries,
dtw-python
and tslearn.However, I'm getting different results and I don't know why. Any help would be appreciate :)
What I Did
Results
Why do I have such a big difference? I tried all the available
step_pattern
functions fordtw-python
library but without any success. Which one is correct result?The text was updated successfully, but these errors were encountered: