search for: forgy

Displaying 5 results from an estimated 5 matches for "forgy".

Did you mean: forge
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 <- .Fortran(R_kmns, as.double(x), as.integer(m), + as.integer(ncol(x)), centers = as.double(centers), + as.integer(k), c1 = integer(m), integer...
2013 Feb 03
1
Empty cluster / segfault using vanilla kmeans with version 2.15.2
...ar was reported many years ago, see https://stat.ethz.ch/pipermail/r-help/2003-November/041784.html. It was then suggested that R's behaviour was correct. I'm not familiar with such an early R version, but the up-to-date documentation of kmeans clearly states that "Except for the Lloyd-Forgy method, k clusters will always be returned if a number is specified.". I am using the default Hartigan-Wong, and I specify an exact number k: thus, k clusters should be returned. They aren't, and the empty cluster is then more likely the symptom of a bug rather than the outcome of a 't...
2013 Mar 13
1
Empty cluster / segfault using vanilla kmeans with version 2.15.2
...years ago, see > https://stat.ethz.ch/pipermail/r-help/2003-November/041784.html. It was > then suggested that R's behaviour was correct. I'm not familiar with such > an early R version, but the up-to-date documentation of kmeans clearly > states that "Except for the Lloyd-Forgy method, k clusters will always be > returned if a number is specified.". > I am using the default Hartigan-Wong, and I specify an exact number k: > thus, k clusters should be returned. They aren't, and the empty cluster is > then more likely the symptom of a bug rather than the...
2010 Dec 02
1
kmeans() compared to PROC FASTCLUS
Hello all, I've been comparing results from kmeans() in R to PROC FASTCLUS in SAS and I'm getting drastically different results with a real life data set. Even with a simulated data set starting with the same seeds with very well seperated clusters the resulting cluster means are still different. I was hoping to look at the source code of kmeans(), but it's in C and FORTRAN and
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