[Sequence Alignment Methods] Dynamic time Warping (DTW)

Source: Internet
Author: User

This series describes several sequence alignment methods, including dynamic time warping (DTW), Smith–waterman algorithm,cross-recurrence plot

Dynamic time Warping (DTW) is a well-known technique to find an optimal alignment between both given (Time-dependent) Seque NCEs under certain restrictions.     

--meinard Muller "Information retrieval for Music and Motion"

dtw Path definition : Use p = (P1, p2, ..., pL) to indicate that the following three conditions need to be met:

(i) boundary conditions: P1 = (+) and PL = (n,m)

(ii) monotonic condition: n1≤n2≤ ... ≤NL and m1≤m2≤ ... ≤ml

(iii) Stride size: P (l+1)-Pl belongs to {(1,0), (0,1), (n)} for L belongs to [1:L-1]

objective function of DTW : To define C (x, y) as the loss function of aligning X, y two points, the total loss function is the sum of the loss function from P1 to PL per point pair, and the goal of DTW path is the path of minimizing the total loss function.

DTW Dynamic Planning : D (n,m) = Min{d (n-1,m-1), D (N-1,m), D (n,m-1)} + C (Xn,yn), for traditional DTW, you can see that the time complexity is O (MN)

Variants of DTW:

Step Variant 1: The original stride size causes the slope range of each step to be 0 to positive infinity, which may cause path degradation, so the change is {(2,1), (n), ()}, so that the slope range becomes 0.5 to 2. At this point the state transition equation becomes d (n,m) = Min{d (n-1,m-1), D (N-2,m-1), D (n-1,m-2)} + C (Xn,yn)

Step Variant 2: Variant 1 will introduce a new problem, that is, some points of two sequences will be ignored, so the state transfer equation D (n,m) = Min{d (n-1,m-1), D (n-2,m-1) + C (xn-1, YM), D (n-1,m-2) + C (xn, ym-1)} + C (Xn,yn)

Loss Function Weight variant: (1,0), (0,1), (three) steps corresponding to different weights, such as in the state transfer, the loss function is multiplied by the weight (1,1,2)

Global Constraints: The goal is to make the optimal path within a certain limit range. Two well-known global restricted areas are Sakoe-chiba band and Itakura parallelogram. This method makes the complexity of time also greatly reduced. The problem is that the optimal path of the interval that is slightly beyond the limit is discarded.

Approximate estimate: Just to reduce computational complexity. Reduce the size of M and N in O (MN) by reducing sampling, low-pass filtering, piecewise smoothing functions, etc.

Multiscale DTW: Comprehensive global constraints and approximate estimation method, first through the optimal path at low resolution, the higher resolution is obtained in the near optimal path range, and the optimal path of high rate of separation is found; cyclic iterative operation

the problem with DTW is that it warping the whole sequence, and it doesn't meet many real needs.

subsequence DTW: (A *, b*) = Argmin (DTW (X, Y (A:B))), (A, B): 1≤a≤b≤m. Find the matching pair with the lowest loss value

Conclusion: In the actual large-scale retrieval, the strategy of most methods is to first extract the coarse-grained data characterization time series, retrieve the candidate documents, and then perform the fine-grained rank

[Sequence Alignment Methods] Dynamic time Warping (DTW)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.