Two problems with mlpy.dtw package in Python?

As a newbie to Dynamic Time Warping (DTW), I find that its Python implementation of mlpy.dtw is not documented in great detail. I have some problems with its return value.

Regarding the return value dist? I have two questions :

  • Any typo here? For standard DTW, the document says

Standard DTW, as described in [Muller07], using Euclidean distance (absolute difference value) or squared Euclidean distance (as in [Keogh01]) as a local cost measure.

and for the DTW subsequence, the document says

A DTW sequence, as described in [Muller07], assuming that the length of y is much greater than the length x and using Manhattan distance (the absolute value of the difference) as a measure of local value.

Does the same so-called โ€œabsolute difference valueโ€ correspond to two different distance marks?

  • Total distance? After starting the fragment

    dist, cost, path = mlpy.dtw_std (x, y, dist_only = False)

dist- one value. . So is this the sum of all the distances between each matched pair?

+1
source share
2 answers

Yes, the function is mlpy.dtw()poorly documented.

>>> import mlpy
>>> mlpy.dtw_std([1,2,3], [4,5,6], squared=False) # Euclidean distance
9.0
>>> mlpy.dtw_std([1,2,3], [4,5,6], squared=True) # Squared Euclidean distance
26.0

Cheers, Davide

+2

, . " ", . , , R ( ). , , ,

dist - ( , . ). , , () ""

+2

Source: https://habr.com/ru/post/1502959/


All Articles