[R] finding a stable cluster for kmeans
Wiebke Timm
wtimm at techfak.uni-bielefeld.de
Wed Sep 26 02:16:05 CEST 2007
You might want to check if there is a neural gas algorithm in R.
kmeans generally has a high variance since it is very dependent on
the initialization. Neural gas overcomes this problem by using a
ranked list of neighbouring data points instead using data points
directly. It is more stable (at the cost of additional computational
time).
On 25.09.2007, at 05:00, Julia Kröpfl wrote:
> I applied kmeans to my data:
>
> kcluster= kmeans((mydata, 4, iter.max=10)
> table(code, kcluster$cluster)
>
> If I run this code again, I get a different result as with the
> first trial (I understand that this is correct, since kmeans starts
> randomly with assigning the clusters and therefore the outcomes can
> be different)
> But is there a way to stabilize the cluster (meaning finding the
> one cluster that appears the most often in 10 trials)?
>
> Thank you for any ideas,
> Julia
> --
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-
> guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list