Closed roya0045 closed 5 years ago
Hi!
This seems like an interesting approach. Unfortunately I don't really have time anymore to follow and keep up to date with dtw literature so I don't know if this local method is used and how it affects the general algorithm. Sorry but I'm afraid I won't be much of a help here. I let this open and do not hesitate to share your results if you keep investigating this!
Greetings again,
Got around to implementing it properly and testing it today.
Interestingly cdist gives the same things in both cases, something seems off with cdist since the metric parameter did not change the output on my end. But the output of my alg makes sense for this test.
From what I can remember seeing since DTW uses a limited window to obtain the optimal path, computing the whole matrix for big series is overkill (at least it was for my cases.)
If you have the time to run it (assuming you have scipy, numpy and pandas) tell me what you think if you or anyone reading this has the time.
Turns out cdist is far more optimized even when it comes to bigger dataset, so using cdist is still the best option and the slowness that I experienced using your implementation must have came from something else.
I'm currently working on updating and expanding on this library in my fork and this is one thing I am concentrating on, more specifically the warping constraint as specified in http://www.cs.unm.edu/~mueen/DTW.pdf I'll make a PR when I'm finished implementing and testing it, if @pierre-rouanet is happy for me to do so.
Yes definitely @jlc-christie! I'll gladly integrate your PR. Thanks a lot for contributing.
Any news @jlc-christie?
@pierre-rouanet Hi, I have a fork of this project that implements the constrained distance matrix and I've got examples of it working, but it breaks the ability to have asymmetrical distance matrices and thus I can't merge in to your branch.
I also no longer have time to fix these bugs, but if anyone has time to merge our two codebases that would be welcomed!
Ok thanks for the quick answer @jlc-christie. I'll close the issue for the moment but feel free to re-open it if anyone has time to work on this.
Greetings,
I don't want to reinvent the wheel but I was wondering something. Since computing the full distance matrix and all other derivative values for big time series I was wondering if an alternative could be implemented.
In cases where the window is small a simple constrained distance matrix could be generated the following way:
i'm not sure how this would affect the algorithm (I don't have the time to delve more into the depths for now)
This is just a quick draft but let me know what you think!