[BioC] Ward's linkage, agnes and hclust

nicolas servant Nicolas.Servant at curie.fr
Thu Jan 24 16:16:09 CET 2008


Hi,

Does anybody know if the Ward agglomerative method is different from 
hclust to agnes functions ?
This is the example given in the as.hclust help, but instead of using 
complete linkage, i use ward linkage.
The clustering results from the both functions can change (depending on 
the random data), while they both use euclidean metric and ward linkage !!

x <- matrix(rnorm(30), ncol=3)
     hc <- hclust(dist(x), method="ward")

     if(require(cluster, quietly=TRUE)) {# is a recommended package
       ag <- agnes(x, method="ward")
       hcag <- as.hclust(ag)
       ## The dendrograms order slightly differently:
       op <- par(mfrow=c(1,2))
       plot(hc) ;  mtext("hclust", side=1)
       plot(hcag); mtext("agnes",  side=1)
     }

If someone can explain the difference ...
Thanks,

Best,
Nicolas S.

-- 
Nicolas Servant
Equipe Bioinformatique
Institut Curie
26, rue d'Ulm - 75248 Paris Cedex 05 - FRANCE

Email: Nicolas.Servant at curie.fr
Tel: 01 53 10 70 55
http://bioinfo.curie.fr/



More information about the Bioconductor mailing list