[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: clustering algorith
From: |
Marcus G. Daniels |
Subject: |
Re: clustering algorith |
Date: |
25 Aug 2000 16:57:20 -0700 |
User-agent: |
Gnus/5.070084 (Pterodactyl Gnus v0.84) Emacs/20.4 |
>>>>> "PJ" == Paul Johnson <address@hidden> writes:
PJ> Can you point me at C/objc-c code that I can use to decide if
PJ> there are separate clusters in a set of points in 2D space and
PJ> then to sort the points among the clusters if they exist?
In R¹, try:
> library(mva)
> data(swiss)
> plot(hclust(dist(swiss)))
R's hclust² is implemented in Fortran, but it is only about 300 lines.
You could either link it in and use it with C or rewrite it in C by hand.
*Or* you could use the Java layer of R with the Java layer of Swarm.³
Then you could take the resulting point indices and draw colored
perimeters around clusters of these agents on a raster while a
simulation ran! Woo hoo, Swarm models in pure S!
¹ http://www.r-project.org
² http://stat.ethz.ch/R-alpha/library/mva/html/hclust.html
(src/library/mva/src/hclust.f, in the source distribution)
³ http://www.omegahat.org/RSJava
==================================
Swarm-Modelling is for discussion of Simulation and Modelling techniques
esp. using Swarm. For list administration needs (esp. [un]subscribing),
please send a message to <address@hidden> with "help" in the
body of the message.
==================================