Write.Clust And Dendrogam
1
0
Entering edit mode
12.5 years ago
Fede • 0

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

r • 3.0k views
ADD COMMENT
1
Entering edit mode
12.5 years ago

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).

ADD COMMENT

Login before adding your answer.

Traffic: 2712 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