Question: how to measure silhouette coefficient and Dunn index for Hierarchical Clustering in WGCNA?
gravatar for modarzi
9 months ago by
modarzi120 wrote:


In the WGCNA package, hierarchical clustering is performed by hclust() function. the input of that is the Topology overlap matrix(TOM) as input. I need to calculate some clustering validation measures such as silhouette coefficient and Dunn index.

But I don't know by which package I can calculate these measures for my hclust object.

I appreciate if anybody shares his/her comments with me.

ADD COMMENTlink written 9 months ago by modarzi120
gravatar for Kevin Blighe
9 months ago by
Kevin Blighe63k
Kevin Blighe63k wrote:

Have you searched? - there are a few different ways to derive silhouette coefficients, and also Dunn's measure.

ADD COMMENTlink written 9 months ago by Kevin Blighe63k

Yes. I have searched and have done this tutorial which has a focus on "NbClust" and "factoextra" packages.

but the base of this tutorial for calculating "silhouette coefficient" and "Dunn index" is specific for these packages. For example, in WGCNA I calculate my Hierarchical Clustering based on hclust() function but at that tutorial, you should run below code for calculating Hierarchical Clustering object (iris.scaled is the scale of iris dataset):

res.hc <- eclust(iris.scaled, "hclust", k = 3, method = "complete", graph = FALSE)

As you see, in that code res.hc as a Hierarchical Clustering object is created by eclust() which is a function in "factoextra" package and completely different from WGCNA method. I appreciate if you share your comment with me.

ADD REPLYlink modified 9 months ago • written 9 months ago by modarzi120

Oh, but I think that it is still using the hclust() function, because that is what you specify. Either way, I assume that silhouette() will accept a diverse range of data-types in order to cater for diverse analysis pipelines. Have you not simply looked at the manual pages for the function and tried to use it?

Same should be true for cluster.stats(), which calculates [in part] Dunn's index

ADD REPLYlink written 9 months ago by Kevin Blighe63k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1588 users visited in the last hour