Displaying 20 results from an estimated 7000 matches similar to: "How to plot the dendrogram or tree for kmeans ?"
2010 Jun 23
1
Clustering
Hi,
I use the following clustering methods and get the
corresponding dendrograms for single, complete, average, ward and
kmeans clustering.
This gives the dendrograms, but doesn't show the calculation-way.
My question: is there a possibility to show this calculation steps
(cluster steps) in matrix or graphical form?
Mit freundlichen Gr??en
Ralph Modjesch
2010 Jun 15
2
Graphics question: How to create a changing "smudge factor" for overlapping lines?
Hello all,
I am trying to create a Clustergram in R.
(More about it here: http://www.schonlau.net/clustergram.html)
And to produce a picture similar to what is seen here:
http://www.schonlau.net/images/clustergramexample.gif
I was able (more or less) to write the R code for creating the image, but
there is one thing I can't seem to figure out, that is the
*changing*"smudge factor"
2006 Feb 28
1
creating dendrogram from cluster hierarchy
Dear R users,
I have created data for hierarchical agglomerative cluster analysis
which consist of the merging pairs and the agglomeration heights, e.g.
something like
my.merge <- matrix(c(-1,-2,-3,1), ncol=2, byrow=TRUE)
my.height <- c(0.5, 1)
I'd like to plot a corresponding dendrogram but I don't know how to
convert my data to achieve this.
Is it possible to create a
2005 Nov 02
1
x/y coordinates of dendrogram branches
Dear R-users,
I need some help concerning the plotting of dendrograms for hierarchical
agglomerative clustering.
The agglomeration niveau of each step should be displayed at the
branches of the dendrogram.
For this I need the x/y coordinates of the branch-agglomerations of the
dendrogram.
The y-values are known (the heights of the agglomeration), but how can I
get the x-values?
> mydata
2004 May 10
3
Colouring hclust() trees
I have a data set with 6 variables and 251 cases.
The people who supplied me with this data set believe that it falls
naturally into three groups, and have given me a rule for determining
group number from these 6 variables.
If I do
scaled.stuff <- scale(stuff, TRUE, c(...the design ranges...))
stuff.dist <- dist(scaled.stuff)
stuff.hc <- hclust(stuff.dist)
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
2002 Apr 29
2
cluster analyses
I'm clustering rather large data sets and would like to cut the dendrograms
to get a better view of specific components. I calculate the dissimilarity
matrix using daisy() because I have a mixture of variable types: factors,
ordered factors and numerical variables. If I want one dendrogram, I use
agnes() for the agglomerative nesting and pltree() to draw the dendrogram.
That way, I get the
2010 May 05
2
custom metric for dist for use with hclust/kmeans
Hi guys,
I've been using the kmeans and hclust functions for some time now and
was wondering if I could specify a custom metric when passing my data
frame into hclust as a distance matrix. Actually, kmeans doesn't even
take a distance matrix; it takes the data frame directly. I was
wondering if there's a way or if there's a package that lets you
create distance matrices from
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
2001 Aug 01
2
clustering question ... hclust & kmeans
I am using R 1.3.0 on Windows 2000.
For an experiment, I am wanting to find the most diverse 400 items to
study in a possible 3200 items. Diversity here is based on a few
hundred attributes. For this, I would like to do a clustering analysis
and find 400 clusters (i.e. different from each other in some way
hopefully). From each of these 400 clusters, I will pick a
representative. I expect
2001 Mar 13
1
kmeans cluster stability
I'm doing kmeans partitioning on a small (n=26) dataset that has 5
variables. I noticed that if I repeatedly run the same command, the
cluster centers change and the cluster membership changes.
Using RW1022 under Windows NT & Windows 2000
>kmeans(pottery[,1:5], 4, 20)
[...snip]
$size
[1] 7 3 9 7
[...snip]
$size
[1] 7 10 4 5
[...snip]
$size
[1] 6 10 5 5
yields a different
2006 Aug 07
5
kmeans and incom,plete distance matrix concern
Hi there
I have been using R to perform kmeans on a dataset. The data is fed in using read.table and then a matrix (x) is created
i.e:
[
mat <- matrix(0, nlevels(DF$V1), nlevels(DF$V2),
dimnames = list(levels(DF$V1), levels(DF$V2)))
mat[cbind(DF$V1, DF$V2)] <- DF$V3
This matrix is then taken and a distance matrix (y) created using dist() before performing the kmeans clustering.
My query
2008 Feb 11
1
Dendrogram for agglomerative hierarchical clustering result
Hey group,
I have a problem of drawing dendrogram as the result of my program
written in C. My algorithm is a approximation algorithm for single
linkage method. AS a result I will get the following data:
[Average distance] [cluster A] [cluster B]
For example:
42.593141 1 26
42.593141 4 6
42.593141 123 124
42.593141 4 113
74.244206 1 123
74.244206 4 133
74.244206 1 36
So far I have used C to
2006 May 24
1
dendrogram plotting problem
Dear List
RGui Version : 2.3.0
User : 1 month
I am having the *dendrogram plotting problem *
The code i tried:
>library(cluster)
DD<-DataSetS01022 # 575 x 2 matrix
> VC<-hclust(dist(DD),"ave")
*Warning message:
NAs introduced by coercion* ( what does it mean? Is that the problem?)
> plot(VC,hang=-2)
Output: http://roughjade.blogspot.com
Can anyone guide me? Thanks
2011 Apr 28
1
visualizing bootstrapped dendrogram
I want to classify bipolar neurons in human cochleas and have data of the
following structure:
Vol_Nuc Vol_Soma
1 186.23 731.96
2 204.58 4370.96
3 539.98 7344.86
4 477.71 6939.28
5 421.22 5588.53
6 276.61 1017.05
7 392.28 6392.32
8 424.43 6190.13
9 256.41 3850.51
10 249.17 3118.14
11 276.97 3037.29
12 295.30 3703.76
13 314.43 5265.97
14 301.15 5781.73
I
2017 Mar 23
1
A question on stats::as.hclust.dendrogram
Hi all,
This is the first time I'm writing to R-devel, and this time I'm just asking for the purpose for a certain line of code in stats::as.hclust.dendrogram, which comes up as I'm trying to fix dendextend.
The line in question is at line 128 of dendrogram.R in R-3.3.3, at stats::as.hclust.dendrogram:
stopifnot(length(s) == 2L, all( vapply(s, is.integer, NA) ))
Is there any
2013 Jan 16
1
dendrogram stops!
Dear I am using the 'as.dendrogram' function from the 'stats' library to convert from an hclust object to a dendrogram with a dataset of size
~30000 (an example code is below). I need the dendrogram structure to
use the "dendrapply" and "attributes" functions and to access the child
nodes, I do not need any of the plot properties.
The problem is that it
2012 Apr 30
2
Generate Dendrogram
Hi
I have a distance matrix which is computed by user defined method. I
would like to plot the dendrogram. I would like to use different color
and want the leaves laying down bottom.
The script like this. I am not familiar with R. I followed the example
shown in
http://stat.ethz.ch/R-manual/R-devel/library/stats/html/dendrogram.html
dist.obj <- as.dist(matrix.distance)
hc.obj <-
2003 Sep 26
1
a. crossing branches with hclust, b. plot.dendrogram
Hello,
a. when I use hclust with the methods media, centroid, and mcquitty,
and plot the results, the dendrograms have lines that are crossing each
other. Is this ok?
b. My next question refers to plot.dendrogram: How can I use parameters
as "hang" or "cex" here? E.g. for
st <- as.dendrogram(subtreeshc[[x]])
I would like to have something like this, where cex and hang
2016 Apr 21
2
"cophenetic" function for objects of class "dendrogram"
Hello,
I have been using the "cophenetic" function for objects of class "dendrogram" and I have realised that it gives different results when it is used with objects of class "hclust". For instance, running the first example in the help file of the "cophenetic" function,
d1 <- dist(USArrests)
hc <- hclust(d1, "ave")
d2 <-