complete linkage Agglomerative hierarchical clustering, nnclust, spatclus or something else?
On Tue, 20 Apr 2010, Hans Ekbrand wrote:
I have just read about clustering on wikipedia, and learnt that what I want is: Agglomerative hierarchical clustering, with complete linkage
library(cluster) ?hclust is for clustering with moderate numbers of points. Below: in UTM, the units are metres, so distances are in metres too. Hope this helps, Roger
I searched for suitable r-packages for this and found nnclust, and
spatclus. Are those the packages that you could recommend for
clustering events data (the events here is urban fires, created by
arsonists)? Or do you want to suggest other packages?
In this first analysis I want to do the clustering should only by
location, and ignore the point in time.
Later on I will also include time data, so if the clustering package
could handle time too, that would be great, but that is not a
requirement at this time.
The aim at this stage is only to group events with the same, or almost
the same, location. In my data-set the coordiante-data is a bit too
precise in some cases.
I guess a crude way of clustering would be to round the
coordinate-data to a lesser number of significant digits, however, a
sound clustering algorithm would be better :-)
I also need to grasp the scale here:
With this proj4string, and datapoints as below:
..@ proj4string:Formal class 'CRS' [package "sp"] with 1 slots
.. .. ..@ projargs: chr " +proj=utm +zone=33 +ellps=GRS80 +units=m +no_defs"
head(fires at coords, 2)
East North
[1,] 315359.9 6393110
[2,] 325862.4 6405239
dist(head(fires at coords, 2))
1
2 16044.10
Is this in meters?
TIA
Roger Bivand Economic Geography Section, Department of Economics, Norwegian School of Economics and Business Administration, Helleveien 30, N-5045 Bergen, Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43 e-mail: Roger.Bivand at nhh.no