how to measure silhouette coefficient and Dunn index for Hierarchical Clustering in WGCNA?
1
0
Entering edit mode
4.5 years ago
modarzi ▴ 170

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 • 2.7k views
ADD COMMENT
0
Entering edit mode
4.5 years ago

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

ADD COMMENT
0
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

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 REPLY

Login before adding your answer.

Traffic: 2379 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6