similar to: k- means cluster analysis

Displaying 20 results from an estimated 200 matches similar to: "k- means cluster analysis"

2002 Dec 31
3
Probit Analysis
Hello all, I have a very simple set of data and I would like to analyze them with probit analysis. The data are: X Event Trial 100 8 8 75 8 8 50 6 8 25 4 8 10 2 8 0 0 8 I want to estimate the value of X that will give a 95% hit rate (Event/Trial) and the corresponding 95% CI. Anyone can offer some help? Thanks!! -
2002 Jun 14
2
combination of different vector values
Hi, Thanks in advance for the help. I have a few vectors and I need to get all the combinations of the vector values. Normally I would use a few for-loops to do that. e.g x1_c(1,3,5) x2_c(2,5,6) for (i in x1) { for (j in x2) { ... }} My problem is that I don't know how many vectors there are ahead of time, so I don't know how many for-loops I need. Any
2002 Dec 17
1
Breslow Day Test
Hello everyone, Does anyone know if I can do Breslow Day Test for the homogeneity of odds ratio in R? Thanks! - Jacqueline
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
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
2002 Sep 13
3
subset
Dear list, I have a simple question. If I need to run linear regression on a subset of the dataset, will the following two commands give the same output: lm(y ~ as.factor(x1) + as.factor(x2), data, subset = z==Z[1]) and lm(y ~ as.factor(x1) + as.factor(x2), data[data$z==Z[1],] ) I have got different results running the two commands. Am I missing something here, or it there a bug on the
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 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
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
2002 Sep 10
3
print
Hi all, Suppose I have a vector Fruits <- c('Apple','Orange','Pear','Banana','Mango') I want to print the statement "The fruits in the basket are: Apple, Orange, Pear, Banana, Mango" If I do: print(paste('The fruits in the basket are:',Fruits)) The output is: [1] "The fruits in the basket are: Apple" "The fruits in
2013 Jun 24
1
K-means results understanding!!!
Dear members. I am having problems to understand the kmeans- results in R. I am applying kmeans-algorithms to my big data file, and it is producing the results of the clusters. Q1) Does anybody knows how to find out in which cluster (I have fixed numberofclusters = 5 ) which data have been used? COMMAND (kmeans.results <- kmeans(mydata,centers =5, iter.max= 1000, nstart =10000)) Q2) When I
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
2007 Dec 05
1
Information criteria for kmeans
Hello, how is, for example, the Schwarz criterion is defined for kmeans? It should be something like: k <- 2 vars <- 4 nobs <- 100 dat <- rbind(matrix(rnorm(nobs, sd = 0.3), ncol = vars), matrix(rnorm(nobs, mean = 1, sd = 0.3), ncol = vars)) colnames(dat) <- paste("var",1:4) (cl <- kmeans(dat, k)) schwarz <- sum(cl$withinss)+ vars*k*log(nobs) Thanks
2008 Aug 10
1
R function, sink() and empty file
Dear all, I wrote a simple script in order to put together some functions and method to be executed on various files I am trying to have to possibility to call the script changing few parameters in order to use the different files. I succeeded partly using the function method. However in my script I call the sink() function in order to output the results to a .txt file. When using the function the
2002 Mar 20
1
Wilcoxon Rank Sum Test
How does R compute the p-value in the Wilcoxon Rank Sum Test? If I have the test statistics, can I get the p-value using the function pwilcox? Thanks -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the
2012 Jun 27
1
Error: figure margins too large
Hello, I am running cluster analysis, and am attempting to create a graph of my clusters. I keep on getting an error that says that my figure margins are too large. d <- file.choose() d <- read.csv(d,header=TRUE) mydataS <- scale(d, center = TRUE, scale=TRUE) #Converts mydataS from a matrix to a data frame mydataS2 <- as.data.frame(mydataS) #removes "coden"
2012 Jan 14
1
Error: unexpected '<' in "<" when modifying existing functions
Hi. I am trying to modify kmeans function. It seems that is failing something obvious with the workspace. I am a newbie and here is my code: myk = function (x, centers, iter.max = 10, nstart = 1, algorithm = c("Hartigan-Wong", + "Lloyd", "Forgy", "MacQueen")) + { + do_one <- function(nmeth) { + Z <- switch(nmeth, { + Z
2013 Jul 26
1
variación en los resultados de k medias (Alfredo Alvarez)
Buen día, no sé si estoy utilizando bien la lista, es la primera vez. Si lo hago mal me corrigen por favor. Sobre tu comentario Pedro, muchas gracias. Lo qeu entiendo con tu sugerencia de set.seed es qeu de esa forma fijas los resultados, pero no estoy seguro si otra agrupación funcione mejor. Es decir me interesa un método de agrupación que genere la "mejor" agrupación y como los
2003 Jun 03
1
kmeans
Dear helpers I was working with kmeans from package mva and found some strange situations. When I run several times the kmeans algorithm with the same dataset I get the same partition. I simulated a little example with 6 observations and run kmeans giving the centers and making just one iteration. I expected that the algorithm just allocated the observations to the nearest center but think this
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.