similar to: Comparing membership of clusters

Displaying 20 results from an estimated 8000 matches similar to: "Comparing membership of clusters"

2008 Sep 15
1
Help... Organizing multiple spreadsheets data into a huge R data structure!
Hello R users, I am relatively new to the R program, and I hope some of you can offer me some suggestions on how to organize my data in R using some of the more advanced data structuring technique. Here's my scenario: I have date set of 50 participants (each with conditions and demographic data), each participant performed 2x16 trials, for each trial, there was specific information about the
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)
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
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)
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
2009 Mar 02
0
Distance between clusters
Dear friends I reformulate the question. I think I did not formulate it properly. I have some data on some sites. I can define a dissimilarity between each pair of sites. Using this dissimilarity, I have clustered the sites using the hclust algorithm, with method ward. I then obtain 48 clusters, by cutting the tree using cutree with k=48. I would now like to estimate the distance between
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
2009 Mar 02
0
Distance between clusters
Dear friends I reformulate the question. I think I did not formulate it properly. I have some data on some sites. I can define a dissimilarity between each pair of sites. Using this dissimilarity, I have clustered the sites using the hclust algorithm, with method ward. I then obtain 48 clusters, by cutting the tree using cutree with k=48. I would now like to estimate the distance between
2003 Oct 15
1
is.na(v)<-b (was: Re: Beginner's query - segmentation fault)
I think the thread ended up with several people (not only me) feeling certain they didn't like `is.na<-` but with the developers defending it and me not really understanding why. Uwe Ligges was going to come up with an example of `<- NA` going wrong (sorry Brian R, I mean behaving unexpectedly), but never did, and I think the problem has been fixed. It was apparently a problem with
2011 Dec 09
1
Help understanding cutree used for Dunn Index
Basic question: Is it correct to assume that when using cutree to set the # clusters (say k=4), cutree determines the clusters by the largest distances among all potential clusters? I've read the R help for cutree and am using it to define the number of groups to obtain Dunn Index scores (using clValid library) for cluster analysis (using Euclidean Distance and Ward's method) More
2003 May 28
1
Numbers that look equal, should be equal, but if() doesn't see as equal (repost with code included)
Hi! Apologies for sending the mail without any code. Apparently somewhere along the way the .R attachments got filtered out. I have included the code below as clean as possible. My original mail is below the code. Thank you again for your time. regards, Paul vincentize <- function(data, bins) { if ( length(data) < 2 ) { stop("The data is really short. Is that ok?"); }
2000 Jul 20
3
printing hclust with k clusters
howdy R friends, I've searched CRAN but to no avail... I'm trying to use mva's hclust and print out for say 10 clusters in batch. How do I do this? It's unclear if I can use cutree. thanks, John Strumila -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send
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
2006 May 08
1
finding centroids of clusters created with hclust
Hello, Can someone point me to documentation or ideas on how to calculate the centroids of clusters identified with hclust ? I would like to be able to chose the number of clusters (in the style of cutree) and then get the centroids of these clusters. This seems like a quite obvious task to me, but I haven't been able to put my hands on a relevant command. Thank you, Moritz
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")
2004 Feb 24
1
Accessing columns in data.frame using formula
Hello! I'm trying the hard way to use a formula, in a function, to specify the names of several important columns in a data.frame. Maybe I'm just battling to figure out the right search terms :-( This is on XP, R 1.8.1. So, for instance, wery[1:5,] V1 V2 V3 V4 V5 congr V7 V8 V9 ok RT 1 1 1 960 520 1483 c 1 r r 1 760 2 1 2 1060 450 3753 c 1 r r 1 555
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
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 Feb 22
0
A question regarding "cutree"
Hi Everyone, I am doing hierarchical clustering analysis and have a question regarding "cutree". I am doing things like this: hc <- hclust(dist(X)) a <- cutree(hc, k=2) Basically "a" is a vector containing the assignments of 1 or 2 for each sample. May I know how "cutree" decides to assign 1 and 2's to each sample (in other words, how clusters 1 and 2