<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    <div class="moz-text-plain" wrap="true" style="font-family:
      -moz-fixed; font-size: 12px;" lang="x-western">
      <pre wrap="">Peter


</pre>
      <blockquote type="cite" style="color: rgb(0, 0, 0);">
        <pre wrap=""><span class="moz-txt-citetags">> </span>I can't run your code because you didn't make it standalone,
</pre>
      </blockquote>
      <pre wrap="">Thanks for the heads up,  I've made a simple version of the clusterer
which you can view on pastebin: <a class="moz-txt-link-freetext" href="http://pastebin.com/7HmAkmfj">http://pastebin.com/7HmAkmfj</a> If you have time to look through
my code I would be very grateful!


</pre>
      <blockquote type="cite" style="color: rgb(0, 0, 0);">
        <pre wrap=""><span class="moz-txt-citetags">> </span>but in your case that is probably not enough. 
<span class="moz-txt-citetags">> </span>Try something along these lines:
<span class="moz-txt-citetags">></span>
<span class="moz-txt-citetags">> </span># untested
<span class="moz-txt-citetags">> </span>while len(self.clusters) > 1:
<span class="moz-txt-citetags">> </span>    c = self.clusters.pop()
<span class="moz-txt-citetags">> </span>    # find closest index
<span class="moz-txt-citetags">> </span>    for i, c2 in enumerate(self.clusters):
<span class="moz-txt-citetags">> </span>        ...
<span class="moz-txt-citetags">> </span>        if ...:
<span class="moz-txt-citetags">> </span>            closest_index = i
<span class="moz-txt-citetags">> </span>    closest = self.clusters.pop(closest_index)
<span class="moz-txt-citetags">> </span>    tmp.append(c + closest)
<span class="moz-txt-citetags">> </span>if self.clusters:
<span class="moz-txt-citetags">> </span>   tmp.append(self.clusters[0])
</pre>
      </blockquote>
      <pre wrap="">I had a go at implementing something along the lines above and I'm still
getting very bizarre results. There does appear to be some sort of logic
to it though, if you look at the graph chart, you can see that It seems
to be doing the clustering right and then forgetting to remove the old
groupings providing this "cloning" effect for some cluster groups.

Chart: <a class="moz-txt-link-freetext" href="http://img826.imageshack.us/i/clusters.png/">http://img826.imageshack.us/i/clusters.png/</a>

Thanks,

James

<div class="moz-txt-sig">-- 
James Ravenscroft
Funky Monkey Software - Bespoke Web and Software Solutions
<a class="moz-txt-link-freetext" href="http://www.funkymonkeysoftware.com/">http://www.funkymonkeysoftware.com/</a>
</div></pre>
    </div>
  </body>
</html>