<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>DTW on 热爱可抵万难</title><link>https://www.jingmengzhiyue.tech/en/tags/dtw/</link><description>Recent content from 热爱可抵万难</description><generator>Hugo</generator><language>en</language><copyright>All articles on this blog are licensed under the BY license agreement unless otherwise stated. Please indicate the source when reprinting!</copyright><lastBuildDate>Sat, 24 Jun 2023 14:47:16 +0800</lastBuildDate><atom:link href="https://www.jingmengzhiyue.tech/en/tags/dtw/index.xml" rel="self" type="application/rss+xml"/><item><title>DTW (Dynamic Time Warping)</title><link>https://www.jingmengzhiyue.tech/en/dtw/</link><pubDate>Sat, 24 Jun 2023 14:47:16 +0800</pubDate><guid>https://www.jingmengzhiyue.tech/en/dtw/</guid><description>
<![CDATA[<h1>DTW (Dynamic Time Warping)</h1><p>Author: Jingmengzhiyue()</p>
        
          <p>DTW was originally used to measure similarity between speech signals. The DTW algorithm is now commonly used to compute the similarity of two time series, <strong>especially series of different lengths and different rhythms</strong>.</p>
<h2 id="algorithm">
<a class="header-anchor" href="#algorithm"></a>
Algorithm
</h2><p>Suppose there are two sequences
</p>
$$\mathbf{X}=\{\mathbf{x}_1,\mathbf{x}_{2},\ldots,\mathbf{x}_{n}\}
$$$$\mathbf{Y}=\{\mathbf{y}_1,\mathbf{y}_{2},\ldots,\mathbf{y}_{m}\}
$$<p>
<img src="/img/DTWgrid.gif" alt=""></p>
<p>First, build an $m\times n$ two-dimensional array $W$. Each point $W(i,j)$ in the array is the cumulative distance between $\mathbf{X}_{i}$ and $\mathbf{Y}_{j}$, $\sqrt{ (\mathbf{X}_{i}-\mathbf{Y}_{j})^2 }$. The core idea of DTW is to find, in this distance matrix, the minimum-distance warping path from the start of both sequences to their ends. While searching for that path, several constraints must be satisfied:</p>
        
        <hr><p>Published on 2023-06-24 at <a href='https://www.jingmengzhiyue.tech/'>热爱可抵万难</a>, last modified on 2023-06-24</p>]]></description><category>Algorithm</category></item></channel></rss>