similar to: A question regarding "cutree"

Displaying 20 results from an estimated 10000 matches similar to: "A question regarding "cutree""

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
2012 Aug 12
0
Different cluster orderings from cutree() and cut.dendrogram()
Hi! I just discovered that cutree() and cut.dendrogram() do not assign the same cluster numberings when called on the same tree. More specifically, cutree() assigns cluster numbers by order of appearance in the data, while cut.dendrogram() sorts clusters by height (see example below). I guess this is for historical reasons? I'm hit by this difference when I want to get a vector of cluster
2013 Nov 16
0
selecting optimal cluster validation score
Hi: I have calculated the Silhouette score and Dunn score after hierarchical clustering for 3 clusters: #Distance measure d <- dist(USArrests, method = "euclidean") #Hierarchical clustering hc <- hclust(dist(USArrests), "ave") #calculating silhouette value for 3 clusters sil<- silhouette(cutree(hc, k=3), d) #calculating Dunn index for 3 clusters clus <- cutree(hc,
2001 Aug 22
1
cutree (PR#1067)
Full_Name: Anja von Heydebreck Version: 1.3.0 OS: Alpha Unix Submission from: (NULL) (141.14.19.61) Hi, I repeatedly obtained meaningless results from the function 'cutree' in the 'mva' package, when the argument 'h' was greater or equal to the maximum height occuring: > library('mva') > y [,1] [,2] [,3] [,4] [1,] 0 1 -1 1 [2,] 0 -1
2011 May 11
2
hierarchical clustering within a size limit
Hello List, I am trying to implement a hierarchical cluster using the hclust method agglomerative single linkage method with a small wrinkle. I would like to cluster a set of numbers on a number line only if they are within a distance of 500. I would then like to print out the members of this list. So far I can put a vector: > x<-c(2,10,200,300,600,700) into a distance matrix: >
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")
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 =
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=
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)
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
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")
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
2003 Jun 09
1
estimate the number of clusters
Dear All, I am using Silhouette to estimate the number of clusters in a microarray dataset. Initially, I used the iris data to test my piece of code as follows: library(cluster) data(iris) mydata<-iris[,1:4] maxk<-15 # at most 15 clusters myindex<-rep(0,maxk) # hold the si values for each k clusters mdist<-1-cor(t(mydata)) #dissimlarity
2008 Mar 08
1
Elbow criterion plots for determining k in hierarchical clustering
Hi There, I'm working on some cluster analyses on a large data-set using hclust with Wards method and Manhattan (city block) distance measures. I've created dendrograms to illustrate the clustering criteria, but would like to create a plot to examine for the classic elbow criterion to use in determining the best number of clusters. Ideally I'd like to plot percent variance explained
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
2008 May 30
0
Problems with hclust and/or cutree.
I have been attempting to do some work using hclust, and have run into a (possibly subtle) problem. The background is that I constructed a dissimilarity matrix ``d1'' (it involved something called the ``Jaccard similarity coefficient''; I won't go into the details unless requested). I then did d2 <- as.dist(d1) try <- hclust(d2,method=ward)
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
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
2007 Oct 16
0
doubts about Silhouette
Sorry for the long message. I'm doing my best to try to explain myself. I have fitted a spline to my data, I have fitted a spline, filled in the missing data by replicating the spline coefficients associated to the last node. I obtained a number of dendograms by different combination of distance and link-method by calling DIST and AGNES. The agglomerative coefficient is very high (~ 0.99) for