search for: clusters1

Displaying 2 results from an estimated 2 matches for "clusters1".

Did you mean: clusters
2012 May 24
4
Manually modifying an hclust dendrogram to remove singletons
Dear R-Help, I have a clustering problem with hclust that I hope someone can help me with. Consider the classic hclust example: hc <- hclust(dist(USArrests), "ave") plot(hc) I would like to cut the tree up in such a way so as to avoid small clusters, so that we get a minimum number of items in each cluster, and therefore avoid singletons. e.g. in this example, you can see
2004 Jul 21
2
Cutting heatmap dendrogram
...# genes genes.distance <- as.dist(1-cor(set2)); genes.clusters <- hclust(genes.distance); genes.dendrogr <- as.dendrogram(genes.clusters); # samples samples.distance <- as.dist(1-cor(set1)); samples.clusters <- hclust(samples.distance1); samples.dendrogr <- as.dendrogram(samples.clusters1); # cut the trees samples.members <- cutree(samples.clusters, k=4); genes.members <- cutree(genes.clusters, k=25); # heatmap colouring my.colors <- function(n = 20, low.col = 0.35, high.col=1, saturation = 0.85) { if (n < 2) stop("n must be greater than 2") n1 <...