-
Notifications
You must be signed in to change notification settings - Fork 918
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
DTW alignment plot does not seem to work properly [BUG] #1871
Comments
Thanks you @AhmetZamanis for reporting this bug, would you have the time to open a PR to fix it? |
@madtoinou I can give it a try next week. Can't guarantee a clean implementation though. |
@madtoinou I took another look, I've made a small fix that apparently works with both types of time dimensions, and tested it locally. Before creating a PR, I have a small question about the procedure. I followed the guidelines from step 1 to 6 (and installed the pre-commit hook). When I run |
Thank you a lot for investigating the problem and identify the bug so quickly. Ideally, If |
Describe the bug
I am using the
dtw
module to perform dynamic time warping on two univariate series. Everything seems to work fine except theDTWAlignment.plot_alignment()
method, which does not produce the correct DTW alignment plot. It plots the two time series correctly, but the black alignment lines are just a vertical line around the start of the plot (see image below the reproducible code).To Reproduce
Here's the code I used for everything. All other
DTWAlignment
methods seem to work fine except.plot_alignment()
. The two series are univariate, and I've replicated the same issue with essentially the same code, using two other multivariate series.Expected behavior

I was able to manually create the correct plot using the alignment indices from
DTWAlignment.path()
(see image below). I'll share the code for this in the additional context, in case it's helpful.System:
Additional context
Here's the code I used to create the second, correct alignment plot. I'm sure there's a cleaner way to do it.
The text was updated successfully, but these errors were encountered: