similar to: Different cluster orderings from cutree() and cut.dendrogram()

Displaying 20 results from an estimated 3000 matches similar to: "Different cluster orderings from cutree() and cut.dendrogram()"

2007 Oct 26
2
cut.dendrogram and cutree
Hi! In the example: hc <- hclust(dist(USArrests), "ave") dend1 <- as.dendrogram(hc) dend2 <- cut(dend1, h=70) Do the branches "Branch 1", "Branch 2", "Branch 2"...in dend2$upper str(dend2$upper) --[dendrogram w/ 2 branches and 4 members at h = 152] |--[dendrogram w/ 2 branches and 2 members at h = 77.6] | |--leaf "Branch 1" (h=
2015 Jun 06
2
Request: making cutree S3 in R?
Hello all, A question/suggestion: I was wondering if there is a chance of changing stats::cutree to be S3 and use cutree.hclust? For example: cutree <- function(tree, k = NULL, h = NULL,...) { UseMethod("cutree") } cutree.hclust <- stats::cutree # This will obviously need the actual content of stats::cutree This would be nicer for people like me to add new methods to
2002 May 14
1
cutree() and horizontal dendrograms
When I use the function cutree(), the numbers of the clusters are not in the same order as the plotted dendrogram. Is there any way of sorting them so that they match the tree? Is it possible to plot a dendrogram horizontally, preferably with the branches to the right? This would enable some practical composite plots, e.g. labels that were an entire table with several columns of information, or
2004 Jul 21
2
Cutting heatmap dendrogram
Hello, I've been clustering my data using hclust and cutting the resulting tree with cutree. Separately, I visualize the clusterings with heatmap. Is it possible to have the dendrogram on the heatmap reflect the cutree results? That is, instead of having one large dendrogram, it would have 4 or 25 in the example below. Any guidance on if that's possible or not, and what kinds of
2009 Sep 21
0
Help needed to clarify hclust and cutree algorithms
Dear R Helpers, I read carefully the documentation and all postings on the hclust and cutree functions, however some aspects of the tree ordering and cluster assignment performed by these functions remain unclear to me, so I would very much appreciate your help in making sure I get them right. Here is an example, with values chosen to illustrate the problems. I have a set of five profiles
2003 Dec 11
1
cutree with agnes
Hi, this is rather a (presumed) bug report than a question because I can solve my personal statistical problem by working with hclust instead of agnes. I have done a complete linkage clustering on a dist object dm with 30 objects with agnes (R 1.8.0 on RedHat) and I want to obtain the partition that results from a cut at height=0.4. I run > cl1a <- agnes(dm, method="complete")
2003 Dec 11
1
cutree with agnes
Hi, this is rather a (presumed) bug report than a question because I can solve my personal statistical problem by working with hclust instead of agnes. I have done a complete linkage clustering on a dist object dm with 30 objects with agnes (R 1.8.0 on RedHat) and I want to obtain the partition that results from a cut at height=0.4. I run > cl1a <- agnes(dm, method="complete")
2011 Sep 16
1
cutree() and rect.hclust(): different labelling of classes
I've found that while cutree() and rect.hclust() make the same classes for a given height in the dendrogram, the actual labeling of the classes is different. For example, both produce the same 4 classes but class 1 according to cutree() is class 4 according to rect.hclust(). Would it be possible that future versions provide the same labeling? rect.hclust() is useful to display the classes
2012 Mar 29
2
hclust and plot functions work, cutree does not
Hi, I have the distance matrix computed and I feed it to hclust function. The plot function produces a dense dendrogram as well. But, the cutree function applied does not produce the desired list. Here is the code x=data.frame(similarity_matrix) colnames(x) = c(source_tags_vec) rownames(x) = c(source_tags_vec) clust_tree=hclust(as.dist(x),method="complete") plot(clust_tree)
2011 Sep 13
2
help with hclust and cutree
Hello, I would like to cut a hclust tree into several groups at a specific similarity. I assume this can be achieved by specifying the "h" argument with the specified similarity, e.g.: clust<-hclust(dist,"average") cut<-cutree(clust,h=0.65) Now, I would like to draw rectangles around the branches of the dendrogram highlighting the corresponding clusters, as is done by
2002 Jul 19
2
Plotting a section of a dendrogram
> I have performed clustering analysis with hclust (Ward's method) on a > database of 800 samples. As you may imagine the full dendrogram is not > really readable. I have obtained groups with cutree. I would like to plot > sub-sections of my big dendrogram to show group 1, group 2 and so on. I don't think R has anything like subtree in Splus, unfortunately. I think what has
2012 Feb 23
2
Advice on exploration of sub-clusters in hierarchical dendrogram
Dear R user, I am a biochemist/bioinformatician, at the moment working on protein clusterings by conformation similarity. I only started seriously working with R about a couple of months ago. I have been able so far to read my way through tutorials and set-up my hierarchical clusterings. My problem is that I cannot find a way to obtain information on the rooting of specific nodes, i.e. of
2011 Mar 02
2
clustering problem
Hi, I have a gene expression experiment with 20 samples and 25000 genes each. I'd like to perform clustering on these. It turned out to become much faster when I transform the underlying matrix with t(matrix). Unfortunately then I'm not anymore able to use cutree to access individual clusters. In general I do something like this: hc <- hclust(dist(USArrests), "ave")
2002 May 15
0
RE: cut.dendrogram (PR#1552)
>>>>> "MM" == Martin Maechler <maechler@stat.math.ethz.ch> writes: >>>>> "MikG" == M GRUM <M.GRUM@CGIAR.ORG> writes: MikG> I'm resending this bug report with a new example. As MikG> seen below, cut.dendrogram gives an error message for MikG> some heights, but not for others and with some MikG> datasets
2005 Sep 15
2
about cutree
Hi Everyone, I'm trying to use cutree to get the clusters after hclust. What I used is: mycluster<-cutree(cnclust,h=0.5) Now, my problem is, how can I get the actual clusters? Thanks! Best, Baoqiang Cao
2010 Sep 22
0
How to Ignore NaN values in Rows when using hclust function in making Heatmap??
I am making heatmaps for a dataset (~ 300*600 matrix) with the following R script (I am not familiar with R and this is the first time I am using it). library("gplots") library("Cairo") mydata <- read.csv(file="data.csv", header=TRUE, sep=",") rownames(mydata)=mydata$Name mydata <- mydata[,2:297] mydatamatrix <- data.matrix(mydata) mydatascale
2010 Sep 08
1
saving heatmaps in graphical format that can be edited in graphic editor tool
I generated a heatmap in R using the following commands: > mydata <- read.csv(file="Data.csv", header=TRUE, sep=",") > mydata <- mydata[rowSums(mydata[,-1]^2) >0, ] > rownames(mydata)=mydata$Name > mydata <- mydata[,2:253] > mydatamatrix <- data.matrix(mydata) > mydatascale <- t(scale(t(mydatamatrix))) > hr <-
2011 Sep 12
1
hclust and cutree: identifying branches as classes
Good afternoon, After cuting a hierarchical tree using cutree(), how to check correspondances between classes and branches? This is what we do: srndpchc <- hclust(dist(srndpc$x[1:1000,1:3]),method="ward") #creation of hierarchical tree plclust(srndpchc,hmin=20000) #visualisation srndpchc20000 = cutree(srndpchc,h=20000) #returns 4 classes table(srndpchc20000 ) srndclass20000 =
2004 Jun 17
1
Re: Clustering in R
Thanks a lot, Michael! I cc to R-help, where this question really belongs {as the 'Subject' suggests itself...} -- please drop 'bioconductor' from CC'ing further replies. >>>>> "michael" == michael watson (IAH-C) <michael.watson at bbsrc.ac.uk> >>>>> on Thu, 17 Jun 2004 09:16:59 +0100 writes: michael> OK, admittedly it
2002 May 14
0
RE: cut.dendrogram (PR#1552)
>>>>> "MikG" == M GRUM <M.GRUM@CGIAR.ORG> writes: MikG> I'm resending this bug report with a new example. As MikG> seen below, cut.dendrogram gives an error message for MikG> some heights, but not for others and with some MikG> datasets adn not others. I can't see why. MikG> Last time I unwittingly sent my message with