<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:"Yu Gothic";
panose-1:2 11 4 0 0 0 0 0 0 0;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"\@Yu Gothic";
panose-1:2 11 4 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:3.0cm 2.0cm 3.0cm 2.0cm;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="DA" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US">You can use it to get a single similarity / closeness number between two timeseries and then feed that into a clustering algorithm.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">For instance look at<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><a href="https://github.com/markdregan/K-Nearest-Neighbors-with-Dynamic-Time-Warping">https://github.com/markdregan/K-Nearest-Neighbors-with-Dynamic-Time-Warping</a><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">as a first idea:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">if you expand the distance function d = lambda x,y: abs(x-y) to a multivariate local distance<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">d2 = lambda a,b: np.sqrt(float((a[0]-b[0])**2 + (a[1]-b[1])**2)
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">(or any other n-dim metric)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Then you have an algorithm that could cluster the timeseries.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">It does also work when the timeseries are of equal length…<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Best<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Mikkel Brynildsen<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span lang="EN-US">From:</span></b><span lang="EN-US"> scikit-learn <scikit-learn-bounces+mbrynildsen=grundfos.com@python.org>
<b>On Behalf Of </b>lampahome<br>
<b>Sent:</b> 17. januar 2019 08:45<br>
<b>To:</b> Scikit-learn mailing list <scikit-learn@python.org><br>
<b>Subject:</b> Re: [scikit-learn] Any clustering algo to cluster multiple timing series data?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
</div>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US">Mikkel Haggren Brynildsen <</span><a href="mailto:mbrynildsen@grundfos.com"><span lang="EN-US">mbrynildsen@grundfos.com</span></a><span lang="EN-US">>
</span><span lang="JA" style="font-family:"Yu Gothic",sans-serif">於</span><span lang="EN-US"> 2019</span><span lang="JA" style="font-family:"Yu Gothic",sans-serif">年</span><span lang="EN-US">1</span><span lang="JA" style="font-family:"Yu Gothic",sans-serif">月</span><span lang="EN-US">17</span><span lang="JA" style="font-family:"Yu Gothic",sans-serif">日</span><span lang="JA">
</span><span lang="JA" style="font-family:"Yu Gothic",sans-serif">週四</span><span lang="JA">
</span><span lang="JA" style="font-family:"Yu Gothic",sans-serif">下午</span><span lang="EN-US">3:07</span><span lang="JA" style="font-family:"Yu Gothic",sans-serif">寫道</span><span lang="JA" style="font-family:"Yu Gothic",sans-serif">:</span><span lang="EN-US"><o:p></o:p></span></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt">
<p class="MsoNormal"><span lang="EN-US">What about dynamic time warping ?<o:p></o:p></span></p>
</blockquote>
<div>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US">I thought DTW is used to different length of two datasets<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US">But I only get the same length of two datasets.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal">Maybe it doesn't work?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
</div>
</div>
</body>
</html>