Displaying 20 results from an estimated 8000 matches similar to: "Using centers of hierarchical clustering for k-means"
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
2003 Sep 09
0
Re: Hierarchical clustering
I think are looking for the function 'cutree' from package mva
checkout its documentation:
> require(mva)
> ?cutree
pleanty of examples to do what you want.
#############################################################################
Hi R lovers!
I am using the agnes function of the package cluster to compute a
hierarchical clustering.
I'd like to know if somebody has ever
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 Jun 09
1
k-nn hierarchical clustering
Hi there,
is there any R-function for k-nearest neighbour agglomerative hierarchical
clustering?
By this I mean standard agglomerative hierarchical clustering as in hclust
or agnes, but with the k-nearest neighbour distance between clusters used
on the higher levels where there are at least k>1 distances between two
clusters (single linkage is 1-nearest neighbour clustering)?
Best regards,
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
2010 Jan 11
1
K-means recluster data with given cluster centers
K-means recluster data with given cluster centers
Dear R user,
I have several large data sets. Over time additional new data sets will be created.
I want to cluster all the data in a similar/ identical way with the k-means algorithm.
With the first data set I will find my cluster centers and save the cluster centers to a file [1].
This first data set is huge, it is guarantied that cluster
2009 Jul 23
0
using k-means clustering in conjunction with heatmap.2 function
Hello,
I am trying to create a heatmap that clusters based on a k-means scheme
rather than a hierarchical clustering scheme.
Suppose I have the following input data, located in sample.table:
x1 x2 x3 x4
x1 17.198 16.306 16.806 16.374
x2 14.554 10.866 15.780 14.596
x3 14.374 14.118 14.569 17.352
x4 17.505 14.596 15.738 14.070
By using the heatmap.2 function as follows, I can create a heatmap
2013 Oct 27
2
About K-means Clustering
Hi,
I need some answers regarding to R. In K-means clustering ,for K=2, How can I find the members of each cluster and What are the coordinates for the cluster centers?
Please send me a reply soon.
Thank You
Sent from Windows Mail
[[alternative HTML version deleted]]
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 =
2010 Aug 09
1
Need help on heatmap, K-means and hhierarchical clustering methods
Hi folks,
I am new to the R software. I have been going through different materials to
know more about R.
I have the R software installed on my windows machine.I would like to know
the R source code for the following problems on iris flower data set.
I need to do the cluster analysis project with the iris data set. The goal
is to cluster the flowers
according to their Sepal.Length, Sepal.Width,
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
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
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
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
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,
2003 Aug 13
0
re: two dimentional hierarchical clustering algorithm
Dear Dr. Liaw Andy:
I have a few more questions about your heatmap function. actually heatmap is
what I am looking for.
heatmap(x, Rowv, Colv, distfun = dist, hclustfun = hclust, add.expr,
scale=c("row", "column", "none"), na.rm = TRUE, ...)
my data is a XNEW,
> dim(XNEW)
[1] 554 335
554 genes, 335 samples.
now I want to use 1-CORR as a distance
2008 Feb 28
0
question regarding using weights in the hierarchical/ kmeans clustering process
Hi R users!
I have a bit of a problem with using an hierarchical clustering algorithm:
a<-c(1:15)
b<-rep(seq(1:3), 5)
c<-rnorm(15, 0,1)
d<-c(sample(1:100, 15, replace=T))
e<-c(sample(1:100, 15, replace=T))
f<-c(sample(1:100, 15, replace=T))
data<-data.frame(a,b,c,d,e,f)
q<-data.frame(data$d, data$e, data$f)
q<-scale(q)
What i want to do is to use an
2010 Aug 18
1
Plotting K-means clustering results on an MDS
Hello All,
I'm having some trouble figuring out what the clearest way to plot my
k-means clustering result on an my existing MDS.
First I performed MDS on my distance matrix (note: I performed k-means on
the MDS coordinates because applying a euclidean distance measure to my raw
data would have been inappropriate)
canto.MDS<-cmdscale(canto)
I then figured out what would be my optimum
2006 Apr 11
1
Specifying an appropriate error term in a hierarchical regression
Hi all --
So I'm working through my statistics homework again, and trying to
reproduce the examples in the book (Kirk's _Experimental Design_,
third edition) in R. This is a completely randomized hierarchical
design (CRH-28(A)). The B factor is completely nested within the A
factor. Pages 480-482, for those playing along at home.
I can use:
summary(aov(value ~ a + Error(b),
2013 Apr 23
1
assigning cluster id in cluster package-reg.
Well, you don't give much of an example....
I'm replying CC to the R mailing list. Please ask questions there, rather
than adressing individuals for basic help.
Here is one; does it answer your question ?
data(agriculture)
ag.ag <- agnes(agriculture)
class(ag.ag)
pltree(ag.ag) # the dendrogram, if you want to see it
## cut the dendrogram -> get cluster assignments:
(ck3 <-