3

I'm currently dealing with multivariate dynamic time warping (DTW) in R. The best library I found so far is the dtw package as described here: http://dtw.r-forge.r-project.org/

But I do not know how multivariate dtw is actually implemented and it is also not described in the description of the package. All in all, I would like to know if it implements DTWD (Dependent DTW) or DTWI (Independent DTW).

Does anyone have an idea or a suggestion how to find out which of these two approaches the package uses? Or are there libaries which allow me to choose the variant?

gprinz
  • 95
  • 1
  • 9
  • 1
    I don't really know what is (in)dependent DTW, but I have an example explaining multivariate DTW in my package, [code is here](https://github.com/asardaes/dtwclust/blob/master/man-examples/multivariate-dtw.R). I think the `dtw` package does the same. – Alexis May 16 '19 at 17:21

2 Answers2

2

You can always look at the companion papers that come with the packages for a more theoretical grounding of the packages

https://www.jstatsoft.org/article/view/v031i07

Additionally, you can always look into the "guts" of the functions to understand how things are implemented in the code

https://www.rdocumentation.org/packages/dtw/versions/1.20-1/source

As far as this question in general, perhaps it is better suited for https://stats.stackexchange.com/ where the questions are more methodological than programming.

MDEWITT
  • 2,338
  • 2
  • 12
  • 23
  • Thanks a lot to all that were contributing to this post. All answers were useful, but taking a look at the guts answered my question. It is definitively not Independent DTW that is implemented by the package. – gprinz May 20 '19 at 10:49
2

The two types of multivariate dynamic time warping are carefully explained here https://www.cs.ucr.edu/~eamonn/Multi-Dimensional_DTW_Journal.pdf

user2313186
  • 254
  • 1
  • 1