Hello, I hope you can help me. I used the R hclust function (method 'average') to cluster a matrix, and I want to: 1. plot the dendrogram/heatmap 2. visualize the clustering information (essentially the number and composition of the clusters). I plot the dendrogram converting the hclust result with 'as.dendrogram', and I use the heatmap function to create the heatmap. In these steps I don't have to specify any pre-defined number of clusters (k) nor the heigth where to cut (h). And I don't grasp if they are set by default to a certain value. To visualize data I use 'write.hclust', which needs one of the 2 parameters, either k or h. I can set them, but of course the separation into clusters that I impose is different from the dendrogram/heatmap plot. I don't understand how to aling the graphyc and the text results. Could you please suggest me some solutions? Thanks Federica
Question: Write.Clust And Dendrogam
0
Fede • 0 wrote:
1
Michael Schubert • 6.9k wrote:
Hierarchical cluster analysis merges the two closest sequences in an iterative manner, until only one cluster remains. This immediately suggests that, if you want seprate clusters, you need to set a cutoff when the algorithm should stop merging. That's where the h
and k
parameters come in.
If your clusters are clear-cut in the Heatmap, you can e.g. use the number you see in there for the cluster number.
If you want your clusters to be determined automatically, you sould use a clustering algorithm that supports that (see references here and here, don't know about R packages).
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: 1352 users visited in the last hour