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.
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):
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 thatsilhouette()
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