similar to: error in kmeans

Displaying 20 results from an estimated 6000 matches similar to: "error in kmeans"

2005 Mar 30
5
2d plotting and colours
Hi! I am new to R just 3 days in it and i apologize if my questions seem very trivial and consumed your valuable time. I am coding in perl and i stumbled upon R regarding plotting good statistical graphs. I tried the kmean clustering for a large matrix ,say > 150 * 150 . I tried the example code given in the tutorial to perform 2d plot # i ranges from 2 to 10 cl <- kmeans(x, i, 20)
2005 Apr 22
1
algorithm used in k-mean clustering
Hi, I have used the kmean fucntion in R to produce some results for my analysis. I like to know the specific underlying algorithm used for the implementation of the function kmean in R. I tried looking for some documents but could not find any. I obtained the kmean result for k ranging from 2 to 10. When i did this initally it worked perfectly. When i tried running again i get the error
2005 Mar 31
4
NA's?
Your message doesn't help us very much. You haven't said what kind of calculation it is you want to do, and that certainly matters. For example, for some kinds of computations the solution you started below would work fine: > M <- matrix(1:16, 4, 4) > is.na(diag(M)) <- TRUE > M [,1] [,2] [,3] [,4] [1,] NA 5 9 13 [2,] 2 NA 10 14 [3,] 3 7 NA
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 Nov 10
1
kmeans error (bug?)
Hello, I have been getting the following intermittent error from kmeans: >str(cavint.p.r) num [1:1967, 1:13] 0.691 0.123 0.388 0.268 0.485 ... - attr(*, "dimnames")=List of 2 ..$ : chr [1:1967] "6" "49" "87" "102" ... ..$ : chr [1:13] "HYD" "NEG" "POS" "OXY" ... > set.seed(34) >
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
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
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
2000 Sep 14
1
Pl. provide and Input for Kmeans
Sir, Would like to know what sort of input matrix are taken by the kmeans function defined in mva library of R application. As per the documentation for the Kmeans it takes the following 2 data sets: 1) data 2) centers The commands to be executed in R are as follows: library(mva) data <- read.table('file1',header=TRUE,sep="\t") centers <-
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
2013 Mar 13
1
Empty cluster / segfault using vanilla kmeans with version 2.15.2
Hello, here is a working reproducible example which crashes R using kmeans or gives empty clusters using the nstart option with R 15.2. library(cluster) kmeans(ruspini,4) kmeans(ruspini,4,nstart=2) kmeans(ruspini,4,nstart=4) kmeans(ruspini,4,nstart=10) ?kmeans either we got empty always clusters and or, after some further commands an segfault. regards, Detlef Groth ------------ [R] Empty
2013 Jan 24
1
Help regarding kmeans output. need to save the clusters into different directories/folders.
Hi Team, I am trying to run kmeans in R, and I need to save the different clusters into different folders. How can I achieve this? # this is how my data looks. $ *cat 1.tsv | head* userid bookid rating bookTotalRatings bookAvgRating userTotalRatings userAvgRating 1 100 0 24 2.7916666666666665 291 2.6735395189003435 2 200 7 24 2.9583333333333335 6 7.0
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
2008 Jul 03
1
Otpmial initial centroid in kmeans
Helo there. I am using kmeans of base package to cluster my customers. As the results of kmeans is dependent on the initial centroid, may I know: 1) how can we specify the centroid in the R function? (I don't want random starting pt) 2) how to determine the optimal (if not, a good) centroid to start with? (I am not after the fixed seed solution as it only ensure that the
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
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.
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
2004 Mar 22
1
beginners question - kmeans
I am a complete beginner at R and am using the "kmeans" function for the first time... I have a data frame (dat) that is 17 columns * 91 rows (including headers) I have entered the following: cl <- kmeans(dat, 3, 10) plot(dat, col = cl$cluster) points(cl$centers, col = 1:2, pch = 8) the output is 17*17 graphs ... this is not what I was anticipating - I was hoping to get one graph