similar to: Feature selection for kmeans

Displaying 20 results from an estimated 1000 matches similar to: "Feature selection for kmeans"

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 <-
2016 Apr 21
1
"cophenetic" function for objects of class "dendrogram"
Note that cophenetic.default (which works on the output of hclust(dist(X))) uses the row names of X as labels. as.dendrogram.hclust does not retain those row names so cophenetic.dendrogram cannot use them (so it orders them based on the topology of the dendrogram). Bill Dunlap TIBCO Software wdunlap tibco.com On Thu, Apr 21, 2016 at 7:59 AM, William Dunlap <wdunlap at tibco.com> wrote:
2006 May 09
1
problem accessing trees after read.nexus from ape package
Hello, I've been trying to figure out how to access the individual elements from an object of class phylo. I am reading in 201 trees created by paup as below. > read.nexus("A_30knj_200t.txt", tree.names= NULL) -> anj30 > anj30[1] $tree1 $edge [,1] [,2] [1,] "-1" "-2" [2,] "-2" "-3" [3,] "-3" "1"
2001 Jun 12
1
cophenetic matrix
Hello, I analyse some free-sorting data so I use hierarchical clustering. I want to compare my proximity matrix with the tree representation to evalute the fitting. (stress, cophenetic correlation (pearson's correlation)...) "The cophenetic similarity of two objects a and b is defined as the similarity level at wich objects a and b become members of the same cluster during the course of
2009 Nov 10
2
All possible combinations of functions within a function
Dear All, I wrote a function for cluster analysis to compute cophenetic correlations between dissimilarity matrices (using the VEGAN library) and cluster analyses of every possible clustering algorithm (SEE ATTACHED) http://old.nabble.com/file/p26288610/cor.coef.R cor.coef.R . As it is now, it is extremely long, and for the future I was hoping to find a more efficient way of doing this sort of
2007 Feb 17
1
help with cluster stopping rules
Is there a function available in R that implements Mojena's Upper Tail Rule or that draws a Mojena plot? I would also like to find a function that implements Duda and Hart's stopping rule. Finally with function cophenet how can I achieve a straightforward Cophenet correlation coefficient (i.e. one number for example 0.876) that gives the agreement between the structure of the
2006 Jul 09
2
distance in kmeans algorithm?
Hello. Is it possible to choose the distance in the kmeans algorithm? I have m vectors of n components and I want to cluster them using kmeans algorithm but I want to use the Mahalanobis distance or another distance. How can I do it in R? If I use kmeans, I have no option to choose the distance. Thanks in advance, Arnau.
2012 Feb 27
2
kmeans: how to retrieve clusters
Hello, I'd like to classify data with kmeans algorithm. In my case, I should get 2 clusters in output. Here is my data colCandInd colCandMed 1 82 2950.5 2 83 1831.5 3 1192 2899.0 4 1193 2103.5 The first cluster is the two first lines the 2nd cluster is the two last lines Here is the code: x = colCandList$colCandInd y = colCandList$colCandMed m = matrix(c(x, y),
2011 Apr 06
2
Help in kmeans
Hi All, I was using the following command for performing kmeans for Iris dataset. Kmeans_model<-kmeans(dataFrame[,c(1,2,3,4)],centers=3) This was giving proper results for me. But, in my application we generate the R commands dynamically and there was a requirement that the column names will be sent instead of column indices to the R commands.Hence, to incorporate this, i tried using the R
2003 Jun 05
1
kmeans (again)
Regarding a previous question concerning the kmeans function I've tried the same example and I also get a strange result (at least according to what is said in the help of the function kmeans). Apparently, the function is disregarding the initial cluster centers one gives it. According to the help of the function: centers: Either the number of clusters or a set of initial cluster
2006 Apr 07
2
cclust causes R to crash when using manhattan kmeans
Dear R users, When I run the following code, R crashes: require(cclust) x <- matrix(c(0,0,0,1.5,1,-1), ncol=2, byrow=TRUE) cclust(x, centers=x[2:3,], dist="manhattan", method="kmeans") While this works: cclust(x, centers=x[2:3,], dist="euclidean", method="kmeans") I'm posting this here because I am not sure if it is a bug. I've been searching
2003 Apr 14
2
kmeans clustering
Hi, I am using kmeans to cluster a dataset. I test this example: > data<-matrix(scan("data100.txt"),100,37,byrow=T) (my dataset is 100 rows and 37 columns--clustering rows) > c1<-kmeans(data,3,20) > c1 $cluster [1] 1 1 1 1 1 1 1 3 3 3 1 3 1 3 3 1 1 1 1 3 1 3 3 1 1 1 3 3 1 1 3 1 1 1 1 3 3 [38] 3 1 1 1 3 1 1 1 1 3 3 3 1 1 1 1 1 1 3 1 3 1 1 3 1 1 1 1 3 1 1 1 1 1 1 3
2003 Jun 06
1
Kmeans again
Dear helpers I'm sorry to insist but I still think there is something wrong with the function kmeans. For instance, let's try the same small example: > dados<-matrix(c(-1,0,2,2.5,7,9,0,3,0,6,1,4),6,2) I will choose observations 3 and 4 for initial centers and just one iteration. The results are > A<-kmeans(dados,dados[c(3,4),],1) > A $cluster [1] 1 1 1 1 2 2 $centers
2005 Jun 14
1
KMEANS output...
Using R 2.1.0 on Windows 2 questions: 1. Is there a way to parse the output from kmeans within R? 2. If the answer to 1. is convoluted or impossible, how do you save the output from kmeans in a plain text file for further processing outside R? Example: > ktx<-kmeans(x,12, nstart = 200) I would like to parse ktx within R to extract cluster sizes, sum-of-squares values, etc., OR save ktx in
2009 Jul 20
2
kmeans.big.matrix
Hi, I'm playing around with the 'bigmemory' package, and I have finally managed to create some really big matrices. However, only now I realize that there may not be functions made for what I want to do with the matrices... I would like to perform a cluster analysis based on a big.matrix. Googling around I have found indications that a certain kmeans.big.matrix() function should
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 May 11
1
AW: Probleme with Kmeans...
Sorry, to solve your question I had tried: data(faithful) kmeans(faithful[c(1:20),1],10) Error: empty cluster: try a better set of initial centers But when I run this a second time it will be ok. It seems, that kmeans has problems to initialize good starting points, because of the random choose of these starting initial points. With kmeans(data,k,centers=c(...) the problem can be solved.
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
2004 May 11
2
Probleme with Kmeans...
Hello, I would like to have any help with the function Kmeans of R.. I use this to do a classification of my data...I have chosen 12 classes but, I have always an error message: Error: empty cluster: try a better set of initial centers So, I don't understand the probleme with this function.. Thank you to help me!! All the Best Clothilde Clothilde Kussener CNRS - CEBC 79360 Villiers en bois
2004 May 28
6
distance in the function kmeans
Hi, I want to know which distance is using in the function kmeans and if we can change this distance. Indeed, in the function pam, we can put a distance matrix in parameter (by the line "pam<-pam(dist(matrixdata),k=7)" ) but we can't do it in the function kmeans, we have to put the matrix of data directly ... Thanks in advance, Nicolas BOUGET