title: Unsupervised Clustering with Haskell
body: <p>I'm trying to develop an algorithm that can report the frequency and closeness in which similar patterns appear between data sets.</p>
  
  <p>Simple example:</p>
  
  <pre><code>set1 = [0, 1, 0, 0, 2, 0, 0, 3, 0]
  set2 = [1, 2, 3, 0, 0, 0, 0, 0, 0]
  set3 = [0, 0, 0, 0, 0, 1, 2, 0, 3]
  </code></pre>
  
  <p>Each of these sets have a 1, 2, and 3, but these numbers are within closer proximity in set2 and set3.</p>
  
  <p>I suspect I could accomplish this task with list comprehensions. I could draw the data into variables x and y, and catalog each match into a list of lists where the 1st element in one of the embedded lists is a string of the match found, and the 2nd and 3rd elements are their positions. And I could run this list through another function that calculates how often and how close those matches occur, and reports back a percentage.</p>
  
  <p>Or perhaps there's a more elegant way to do this?</p>
  
  <p>I'm still bit of a Haskell novice. Any advice would be appreciated.</p>