KeithTheEE / scipy-cluster

Automatically exported from code.google.com/p/scipy-cluster
Other
0 stars 0 forks source link

bug in dendogram #20

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi, 

try the following code, it yields weird results, 
see the attached files.

Best regards,
Petr Danecek

---------------------------------------------------
from pylab import *
from hcluster import pdist, linkage, dendrogram
import numpy
from numpy.random import rand

Y = [174,181,218,150,199,205,119,212,121,148]
for i in range(len(Y)):
    Y[i] = (500-Y[i])/500.

Z = linkage(Y,method='complete')
dendrogram(Z)
print Z
savefig('_test-complete.png')

Z = linkage(Y,method='average')
dendrogram(Z)
print Z
savefig('_test-average.png')

Z = linkage(Y,method='weighted')
dendrogram(Z)
print Z
savefig('_test-weighted.png')

Z = linkage(Y,method='single')
dendrogram(Z)
print Z
savefig('_test-single.png')

---------------------------------------------------

Original issue reported on code.google.com by petr.dan...@gmail.com on 15 Jan 2009 at 5:34

Attachments:

GoogleCodeExporter commented 8 years ago
Hi,

Agreed this is bizarre behavior but it does not seem to happen if you put a 
clf()
command in between.

Damian

Original comment by damian.e...@gmail.com on 20 Feb 2009 at 11:55

GoogleCodeExporter commented 8 years ago

Original comment by damian.e...@gmail.com on 16 Jan 2010 at 7:18