[R] hcluster with linkage median

Kennedy henrik.aldberg at gmail.com
Tue Sep 28 09:36:48 CEST 2010


Thank you Peter for your help.

I had tried hclust before but I made the mistake of using the D matrix above
instead of a dist object. Hence

  library(flashClust)

  d <- as.dist(D)
  # Clustering using hclust
  hc <- hclust(d, method = "median",members=NULL)
  # Clustering using flashClust 
  fc <- flashClust(d,method="median",members=NULL)

solves the problem I posted. But another question arises. How is the median
linkage calculated? I want it to be like this:

Given clusters C1=(1,2,3) and C2=(4), the distance between C1 and C2 is: 
  d(C1,C2) = median(d(1,4),d(2,4),d(3,4)) = median(0.2, 1.0, 0.8) = 0.8,
where the values d(1,4), d(2,4) and d(3,4) are taken from the D matrix
above.

If this is not the case, is there any function that uses this linkage
metric?


Thanks

Henrik

-- 
View this message in context: http://r.789695.n4.nabble.com/hcluster-with-linkage-median-tp2715585p2716728.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list