This is a test version of Biostars. For the public version, visit https://www.biostars.org.
how to measure silhouette coefficient and Dunn index for Hierarchical Clustering in WGCNA?

Hi,

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.

silhouette coefficient wgcna

1 answer

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

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

http://www.sthda.com/english/wiki/print.php?id=241#required-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.

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

Log in to answer this question.