Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Dynamic time warping
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Algorithm for measuring similarity between temporal sequences}} [[File:Dynamic time warping.png|thumb|300px|Dynamic time warping between two piecewise linear functions. The dotted line illustrates the time-warp relation. Notice that several points in the lower function are mapped to one point in the upper function, and ''vice versa''.]] [[File:Two repetitions of a walking sequence of an individual recorded using a motion-capture system.gif|thumb|300px|Two repetitions of a walking sequence recorded using a motion-capture system. While there are differences in walking speed between repetitions, the spatial paths of limbs remain highly similar.<ref name="olsen_et_al_2018">{{Citation |last1=Olsen | first1=NL |last2=Markussen |first2=B | last3=Raket | first3=LL| year=2018 |title=Simultaneous inference for misaligned multivariate functional data |journal= Journal of the Royal Statistical Society, Series C |volume=67 |issue=5 |pages=1147–76 |doi=10.1111/rssc.12276|arxiv=1606.03295 | s2cid=88515233 }}</ref>]] [[File:DTW illustration.png|thumb|DTW between a sinusoid and a noisy and shifted version of it.]] In [[time series analysis]], '''dynamic time warping''' ('''DTW''') is an [[algorithm]] for measuring similarity between two temporal sequences, which may vary in speed. For instance, similarities in walking could be detected using DTW, even if one person was walking faster than the other, or if there were [[acceleration]]s and decelerations during the course of an observation. DTW has been applied to temporal sequences of video, audio, and graphics data — indeed, any data that can be turned into a one-dimensional sequence can be analyzed with DTW. A well-known application has been automatic [[speech recognition]], to cope with different speaking speeds. Other applications include [[speaker recognition]] and online [[signature recognition]]. It can also be used in partial [[Shape analysis (digital geometry)|shape matching]] applications. In general, DTW is a method that calculates an [[Optimal matching|optimal match]] between two given sequences (e.g. [[time series]]) with certain restriction and rules: * Every index from the first sequence must be matched with one or more indices from the other sequence, and vice versa * The first index from the first sequence must be matched with the first index from the other sequence (but it does not have to be its only match) * The last index from the first sequence must be matched with the last index from the other sequence (but it does not have to be its only match) * The mapping of the indices from the first sequence to indices from the other sequence must be monotonically increasing, and vice versa, i.e. if <math>j > i</math> are indices from the first sequence, then there must not be two indices <math>l > k</math> in the other sequence, such that index <math>i</math> is matched with index <math>l</math> and index <math>j</math> is matched with index <math>k</math>, and vice versa We can plot each match between the sequences <math>1:M</math> and <math>1:N</math> as a path in a <math>M\times N</math> matrix from <math>(1, 1)</math> to <math>(M, N)</math>, such that each step is one of <math>(0, 1), (1, 0), (1, 1)</math>. In this formulation, we see that the number of possible matches is the [[Delannoy number]]. The [[Optimal matching|optimal match]] is denoted by the match that satisfies all the restrictions and the rules and that has the minimal cost, where the cost is computed as the sum of absolute differences, for each matched pair of indices, between their values. The sequences are "warped" [[non-linear]]ly in the time dimension to determine a measure of their similarity independent of certain non-linear variations in the time dimension. This [[sequence alignment]] method is often used in time series classification. Although DTW measures a distance-like quantity between two given sequences, it doesn't guarantee the [[triangle inequality]] to hold. In addition to a similarity measure between the two sequences (a so called "warping path" is produced), by warping according to this path the two signals may be aligned in time. The signal with an original set of points ''X''(original), ''Y''(original) is transformed to ''X''(warped), ''Y''(warped). This finds applications in genetic sequence and audio synchronisation. In a related technique sequences of varying speed may be averaged using this technique see the [[#Average sequence|average sequence]] section. This is conceptually very similar to the [[Needleman–Wunsch algorithm]].
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)