Displaying 20 results from an estimated 200 matches similar to: "Obtaining covariance matrices for kmeans output clusters"
2013 Apr 10
0
Problem with ode
Hi,
I am trying to run a 1D nutrient-phytoplankton-zooplankton model in R
using the package 'deSolve'. The code is shown below:
DEPTH = seq(2.5, 147.5, 5)
NPZ = function(t, state, params){
with(as.list(params), {
P <- state[1:NB]
Z <- state[(NB + 1): (2*NB)]
N <- state[(2*NB + 1): (3*NB)]
F.I = function(z, hr){
I0 = function(hr){
2011 Apr 28
1
DLSODA error
Dear R-users,
I'm running an MLE procedure where some ODEs are solved for each iteration
in the maximization process. I use mle2 for the Maximum likelihood and
deSolve for the ODEs.
The problem is that somewhere along the way the ODE solver crashes and I get
the following error message:
DLSODA- Warning..Internal T (=R1) and H (=R2)
are
such that in the machine, T + H = T on the next
2007 Jul 04
0
Kmeans performance difference
Hi All,
A question from a newbie using R 2-5-0 on windows XP. Why is it that
kmeans clustering with apparently the exact same parameters behaves so
differently between the two following examples :
> cl1 <- kmeans(subset(pointsUXO15555, select = c(2:4)), 10)
Takes about 2 seconds to deliver a result
> cl1 <- clust(subset(pointsUXO15555, select = c(2:4)), k=10,
2009 Feb 26
0
kmeans: invalid length argument
Dear R Experts,
I am running a cluter analysis using kmeans and have come across an error to which I am unable to find a solution. First, let me describe the problem:
THE R CODE IS:
--------------------------------------
# NRM is a 100 x 100 numerical matrix
infile = 't:\\NRM\\NRM'
groups = 7
outfile = 't:\\NRM\\cluster.groups'
print( paste(infile, groups, outfile, sep='
2008 Mar 03
1
silhouette plot for kmeans result
Dear All,
Is there any existing code for plotting silhouette for kmeans clustering
results?
Many thanks!
Linda
[[alternative HTML version deleted]]
2011 Feb 01
1
kmeans: number of cluster centres must lie between 1 and nrow(x)
Dear R,
Can't I cluster a dataset into k clusters where k is exactly the number of
observations? I have version 12.2 installed. See this example
> a <- matrix(1:100, 20)
> kmeans(a, 20)
Error: number of cluster centres must lie between 1 and nrow(x)
This is a bit ad-hoc but I known R from version 2.12 allows number of
clusters to be one. So I guess allowing number of clusters to be
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 Apr 22
2
distance method in kmeans
I am trying to cluster some binary data using k-means . As the regular "kmeans" available from stats package in R does'nt provide the option to change the distance method. I was wondering there is any package available to specify type of distance measure to be used in k means clustering in R. Especially distances like "Jaccard" which is good for binary data.
2011 Apr 05
0
kmeans clustering java
Hello,
I have been trying for a few days to do kmeans on a matrix of data which I
populate from java.
Here's my code:
String[] Rargs = {"--vanilla"};
Rengine re = new Rengine(Rargs, false, null);
System.out.println("Rengine created, waiting for R");
// the engine creates R is a new thread, so we should wait until it's
// ready
if
2012 Jan 13
1
how to find the number of iterations kmeans used to converge?
Dear all,
I need to know in which number of iterations the kmeans converge each
time I run it.
Any idea how to do it?
Thank you for your attention,
Rui
2008 Feb 28
0
question regarding using weights in the hierarchical/ kmeans clustering process
Hi R users!
I have a bit of a problem with using an hierarchical clustering algorithm:
a<-c(1:15)
b<-rep(seq(1:3), 5)
c<-rnorm(15, 0,1)
d<-c(sample(1:100, 15, replace=T))
e<-c(sample(1:100, 15, replace=T))
f<-c(sample(1:100, 15, replace=T))
data<-data.frame(a,b,c,d,e,f)
q<-data.frame(data$d, data$e, data$f)
q<-scale(q)
What i want to do is to use an
2012 Jun 04
1
aplicar reglas de un kmeans
Buenas tardes. Quisiera saber como puedo aplicar las reglas de un kmeans a
otra base, para hacer un proceso de validaciòn de la segmentaciòn. En SAS,
se cuenta con el argumento "OUTSEED", ¿què debo tener en cuenta en R?
Mil gracias.
--
Luis Alberto López González
[[alternative HTML version deleted]]
2013 Feb 07
1
Feature selection for kmeans
I know that within sum of squares, DB, sillhouette and cophenetic are
indicators of clustering quality, but what indicators I need to observe when
I choose attributes for kmeans?
--
View this message in context: http://r.789695.n4.nabble.com/Feature-selection-for-kmeans-tp4657830.html
Sent from the R help mailing list archive at Nabble.com.
2007 Aug 15
0
mda and kmeans
Hello,
I am using the function mda of the mda library in order to discriminate
4 groups with 8 explanatory variables. I only have 66 observations.
I tested all possible combinations of those variable and run for each
the Mixture Discriminant Analysis.
For some iterations, I got an error message: "error in kmeans(xx,
start): initial centers are not distinct".
I understood that the
2016 Aug 17
2
KMeans - Evaluation Results
I've gone through the link that you sent me and I currently understand how
this helps and works to some extent, but I am not too sure of how I should
start with converting the current interface to PIMPL design. I'm not used
to this design pattern so its taking some time to sink in :)
Say I start with the Clusterer class, I create a ClustererImpl class which
is the internal class that
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 <-
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
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 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
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