next up previous contents
Next: Software functions Up: Product functions Previous: Use cases   Contents


The DTW algorithm

The DTW algorithm is so essential part of the software that it will be discussed here briefly. More thorough descriptions can be found in the references $[2]$, $[3]$ and $[4]$.

We have two time series, $S$ and $T$. Let $d(i,j)$ be the distance between points $s_i$ and $t_i$. Now we try to find such path $W$ in the $i \times j$ matrix that minimizes the quotient

\begin{displaymath}
\frac{\sum_{k=1}^p d(w_k)}{K} = \frac{\sum_{k=1}^p d(i_k,j_k)}{K}
\end{displaymath} (1)

where K is the length of the path. Now we have
\begin{displaymath}
DTW(S,T)=\min_W \frac{\sum_{k=1}^p d(w_k)}{K}
\end{displaymath} (2)

We restrict the algorithm by a local constraint so that the path may go from point $(i_k,j_k)$ to point $(i_k+1,j_k)$, $(i_k+1,j_k+1)$ or $(i_k,j_k+1)$ , i.e. we set continuity and monotonicity requiremnts.

The set of allowable paths may be restricted with parameters discussed in section 3.1.3. When parameter $P_1$ restricts the paths to set $A_1$ and simultaneously parameter $P_2$ to set $A_2$, the total set of allowable paths is the intersection of these two sets, i.e.

\begin{displaymath}
A=A_1 \cap A_2
\end{displaymath} (3)


next up previous contents
Next: Software functions Up: Product functions Previous: Use cases   Contents
2002-03-19