<s>
In	O
time	O
series	O
analysis	O
,	O
dynamic	B-Algorithm
time	I-Algorithm
warping	I-Algorithm
(	O
DTW	O
)	O
is	O
an	O
algorithm	O
for	O
measuring	O
similarity	O
between	O
two	O
temporal	O
sequences	O
,	O
which	O
may	O
vary	O
in	O
speed	O
.	O
</s>
<s>
A	O
well-known	O
application	O
has	O
been	O
automatic	B-Application
speech	I-Application
recognition	I-Application
,	O
to	O
cope	O
with	O
different	O
speaking	O
speeds	O
.	O
</s>
<s>
Other	O
applications	O
include	O
speaker	B-Application
recognition	I-Application
and	O
online	O
signature	O
recognition	O
.	O
</s>
<s>
It	O
can	O
also	O
be	O
used	O
in	O
partial	O
shape	B-Algorithm
matching	I-Algorithm
applications	O
.	O
</s>
<s>
This	O
sequence	B-Algorithm
alignment	I-Algorithm
method	O
is	O
often	O
used	O
in	O
time	O
series	O
classification	O
.	O
</s>
<s>
This	O
is	O
conceptually	O
very	O
similar	O
to	O
the	O
Needleman	B-Algorithm
–	I-Algorithm
Wunsch	I-Algorithm
algorithm	I-Algorithm
.	O
</s>
<s>
This	O
example	O
illustrates	O
the	O
implementation	O
of	O
the	O
dynamic	B-Algorithm
time	I-Algorithm
warping	I-Algorithm
algorithm	O
when	O
the	O
two	O
sequences	O
s	O
and	O
t	O
are	O
strings	O
of	O
discrete	O
symbols	O
.	O
</s>
<s>
While	O
the	O
dynamic	B-Algorithm
programming	I-Algorithm
algorithm	O
for	O
DTW	O
requires	O
space	O
in	O
a	O
naive	O
implementation	O
,	O
the	O
space	O
consumption	O
can	O
be	O
reduced	O
to	O
using	O
Hirschberg	B-Algorithm
's	I-Algorithm
algorithm	I-Algorithm
.	O
</s>
<s>
Averaging	O
for	O
dynamic	B-Algorithm
time	I-Algorithm
warping	I-Algorithm
is	O
the	O
problem	O
of	O
finding	O
an	O
average	O
sequence	O
for	O
a	O
set	O
of	O
sequences	O
.	O
</s>
<s>
A	O
nearest-neighbour	B-General_Concept
classifier	I-General_Concept
can	O
achieve	O
state-of-the-art	O
performance	O
when	O
using	O
dynamic	B-Algorithm
time	I-Algorithm
warping	I-Algorithm
as	O
a	O
distance	O
measure	O
.	O
</s>
<s>
Amerced	O
Dynamic	B-Algorithm
Time	I-Algorithm
Warping	I-Algorithm
(	O
ADTW	O
)	O
is	O
a	O
variant	O
of	O
DTW	O
designed	O
to	O
better	O
control	O
DTW	O
's	O
permissiveness	O
in	O
the	O
alignments	O
that	O
it	O
allows	O
.	O
</s>
<s>
ADTW	O
significantly	O
outperforms	O
DTW	O
with	O
windowing	O
when	O
applied	O
as	O
a	O
nearest	B-General_Concept
neighbor	I-General_Concept
classifier	O
on	O
a	O
set	O
of	O
benchmark	O
time	O
series	O
classification	O
tasks	O
.	O
</s>
<s>
In	O
functional	B-General_Concept
data	I-General_Concept
analysis	I-General_Concept
,	O
time	O
series	O
are	O
regarded	O
as	O
discretizations	O
of	O
smooth	O
(	O
differentiable	O
)	O
functions	O
of	O
time	O
.	O
</s>
<s>
Smoothness	O
and	O
monotonicity	O
of	O
time	O
warp	O
functions	O
may	O
be	O
obtained	O
for	O
instance	O
by	O
integrating	O
a	O
time-varying	O
radial	B-Algorithm
basis	I-Algorithm
function	I-Algorithm
,	O
thus	O
being	O
a	O
one-dimensional	O
diffeomorphism	O
.	O
</s>
<s>
Another	O
related	O
approach	O
are	O
hidden	O
Markov	O
models	O
(	O
HMM	O
)	O
and	O
it	O
has	O
been	O
shown	O
that	O
the	O
Viterbi	B-Algorithm
algorithm	I-Algorithm
used	O
to	O
search	O
for	O
the	O
most	O
likely	O
path	O
through	O
the	O
HMM	O
is	O
equivalent	O
to	O
stochastic	O
DTW	O
.	O
</s>
<s>
It	O
also	O
provides	O
a	O
C++	O
implementation	O
of	O
dynamic	B-Algorithm
time	I-Algorithm
warping	I-Algorithm
,	O
as	O
well	O
as	O
various	O
lower	O
bounds	O
.	O
</s>
<s>
The	O
mlpy	B-Application
Python	O
library	O
implements	O
DTW	O
.	O
</s>
<s>
The	O
Python	O
library	O
implements	O
the	O
classic	O
O(NM )	O
Dynamic	B-Algorithm
Programming	I-Algorithm
algorithm	O
and	O
bases	O
on	O
Numpy	O
.	O
</s>
<s>
The	O
CUDA	O
Python	O
library	O
implements	O
a	O
state	O
of	O
the	O
art	O
improved	O
Time	B-Algorithm
Warp	I-Algorithm
Edit	I-Algorithm
Distance	I-Algorithm
using	O
only	O
linear	O
memory	O
with	O
phenomenal	O
speedups	O
.	O
</s>
<s>
DP	O
matching	O
is	O
a	O
pattern-matching	O
algorithm	O
based	O
on	O
dynamic	B-Algorithm
programming	I-Algorithm
(	O
DP	O
)	O
,	O
which	O
uses	O
a	O
time-normalization	O
effect	O
,	O
where	O
the	O
fluctuations	O
in	O
the	O
time	O
axis	O
are	O
modeled	O
using	O
a	O
non-linear	O
time-warping	O
function	O
.	O
</s>
<s>
Several	O
techniques	O
are	O
used	O
to	O
counter	O
this	O
defense	O
,	O
one	O
of	O
which	O
is	O
dynamic	B-Algorithm
time	I-Algorithm
warping	I-Algorithm
.	O
</s>
<s>
Dynamic	B-Algorithm
time	I-Algorithm
warping	I-Algorithm
is	O
used	O
in	O
finance	O
and	O
econometrics	O
to	O
assess	O
the	O
quality	O
of	O
the	O
prediction	O
versus	O
real-world	O
data	O
.	O
</s>
