tslearn icon indicating copy to clipboard operation
tslearn copied to clipboard

LDTW result

Open NiuWenYu12138 opened this issue 4 years ago • 3 comments

When I use the ldtw method to calculate the distance between two time series of different lengths, the result obtained is the same as the result calculated with dtw (the parameter max_length is not greater than the sum of the lengths of the two time series)

NiuWenYu12138 avatar Oct 08 '20 04:10 NiuWenYu12138

Hi @NiuWenYu12138

In fact, if the length of the DTW path is smaller than the max_length you set, then LDTW and DTW will indeed return the same result. LDTW is just a way to avoid pathologically long paths in the DTW optimization. Some quick explanation is provided here, if it may help.

rtavenar avatar Oct 08 '20 07:10 rtavenar

Hi @NiuWenYu12138

In fact, if the length of the DTW path is smaller than the max_length you set, then LDTW and DTW will indeed return the same result. LDTW is just a way to avoid pathologically long paths in the DTW optimization. Some quick explanation is provided here, if it may help.

Thanks for your answer! I have tested some other data,When I set the value of Max_length to be smaller than the DTW path, the result is still consistent with the result calculated by DTW.By the way,now my data is two-dimensional.

NiuWenYu12138 avatar Oct 09 '20 01:10 NiuWenYu12138

Could you please provide an example of this behavior ?

rtavenar avatar Dec 13 '20 17:12 rtavenar