Re: [SOCIAL]Question about Ward hierarchical clustering in function HCPC

75 views
Skip to first unread message

Francois Husson

unread,
Jun 12, 2023, 2:49:35 AM6/12/23
to factomin...@googlegroups.com
Hi,

In the program, before using hclust, I first calculate the square distance, that is why I use method="ward" with hclust.
It is thus equivalent to use "ward.D2" on the distance.

FH

Le 08/06/2023 à 17:53, Jhan Rodriguez a écrit :

Hi,

I have seen in the code that the HCPC function uses flashClust::hclust for hierarchical clustering, with method=”ward”.

This seems to be the same as using stats::hclust() with method “ward.D”:

myDist <- dist(USArrests)

plot(stats::hclust(myDist, method = "ward.D"))plot(flashClust::hclust(myDist, method = "ward"))

 

In view of the documentation for function hclust{stats} quoted below, wouldn’t it be rather better to use stats::hclust(myDist, method = "ward.D2") for the hierarchic clustering part?

 

I mean this part of the documentation:

Two different algorithms are found in the literature for Ward clustering. The one used by option "ward.D" (equivalent to the only Ward option "ward" in R versions \le 3.0.3) does not implement Ward's (1963) clustering criterion, whereas option "ward.D2" implements that criterion (Murtagh and Legendre 2014). With the latter, the dissimilarities are squared before cluster updating. Note that agnes(*, method="ward") corresponds to hclust(*, "ward.D2").

Thanks a lot.

Regards

JR

--
Vous recevez ce message, car vous êtes abonné au groupe Google Groupes "FactoMineR users".
Pour vous désabonner de ce groupe et ne plus recevoir d'e-mails le concernant, envoyez un e-mail à l'adresse factominer-use...@googlegroups.com.
Cette discussion peut être lue sur le Web à l'adresse https://groups.google.com/d/msgid/factominer-users/9553ea6b-4a0e-44f6-9e22-38409ae60198n%40googlegroups.com.

--
Logo signature e-mail
François Husson
Department Statistics & Computer science
UMR 6625 IRMAR CNRS
65 rue de Saint-Brieuc, CS 84215, 35042 Rennes Cedex
Tel: +33 2 23 48 58 86
https://husson.github.io
En 2022, Agrocampus Ouest devient l'Institut Agro Rennes-Angers.
Reply all
Reply to author
Forward
0 new messages