Displaying 20 results from an estimated 1000 matches similar to: "Cluster analysis, defining center seeds or number of clusters"
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),
2003 Apr 25
1
plot clusters
Hi,
I have a dataset which has more than two clusters (say 3 clusters).
I used kmeans to cluster the dataset.
I am wondering how I can plot the clustering result on a two-dimensional
figure????
The example in the kmeans help file is as follows:
x <- rbind(matrix(rnorm(100, sd = 0.3), ncol = 2),
matrix(rnorm(100, mean = 1, sd = 0.3), ncol = 2))
cl <- kmeans(x, 2, 20)
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
2009 Jun 24
7
Remuestreo de Clusters
Buenos dias para todos,
Estoy trabajando en una aplicación que involucra análisis de clusters.
Básicamente el objetivo es determinar a qué cluster pertenece cada
observación de una matriz de datos "mydata" y luego generar muestras
aleatorias de los mismos datos para determinar la proporción de veces que
cada observación es clasificada en el cluster k.
Este tipo de análisis es muy común
2004 Mar 18
2
don't stop when error occurs
Look up ?try
Regards
Wayne
-----Original Message-----
From: pastaska1934 [mailto:pastaska1934@free.fr]
Sent: 18 March 2004 14:36
To: R-help@stat.math.ethz.ch
Subject: [R] don't stop when error occurs
hi,
i'm doing some bootstraping on a data set, using kmeans for each bootstrap,
i mean i do a loop(200 times) and in each loop i use kmeans.
i have to count some occurences in a matrix
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
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 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
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.
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
2012 Aug 28
1
K-Means clustering Algorithm
I was wondering if there was an R equivalent to the two phased approach that
MATLAB uses in performing the Kmeans algorithm. If not is there away that I
can determine if the kmeans in R and the kmeans in MATLAB are essentially
giving me the same clustering information within a small amount of error?
--
View this message in context:
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
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
2008 Jun 18
3
[LLVMdev] JIT bug?
Hi,
I see sth that to me looks like a JIT bug. The program is the KMeans benchmark
from the STAMP benchmark suite (http://stamp.stanford.edu).
Overwrite ./common/Defines.common.mk with the attached files to make CC/LD
customizable.
in ./kmeans, for
./kmeans -m40 -n40 -t0.00001 -i inputs/random-n65536-d32-c16.txt -p 1 :
make -f Makefile.seq clean
CC='llvm-gcc' LD='llvm-gcc
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
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
2005 Mar 31
2
Using kmeans given cluster centroids and data with NAs
Hello,
I have used the functions agnes and cutree to cluster my data (4977
objects x 22 variables) into 8 clusters. I would like to refine the
solution using a k-means or similar algorithm, setting the initial
cluster centres as the group means from agnes. However my data matrix
has NA's in it and the function kmeans does not appear to accept this?
> dim(centres)
[1] 8 22
> dim(data)
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
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
2008 May 12
2
k means
Hi the devel list,
I am using K means with a non standard distance. As far as I see, the
function kmeans is able to deal with 4 differents algorithm, but not
with a user define distance.
In addition, kmeans is not able to deal with missing value whereas
there is several solution that k-means can use to deal with them ; one
is using a distance that takes the missing value in account, like a