mpadge / spatialcluster

spatially-constrained clustering in R
https://mpadge.github.io/spatialcluster/
30 stars 6 forks source link

triangulation method #5

Open mpadge opened 6 years ago

mpadge commented 6 years ago

Here's one for you @mdsumner : This is a spatial clustering package that uses bog-standard Delaunay triangulation. The first figure on current README illustrates the problems with this: the 2 red points in the top left are delaunayed in just coz of edge effects. What would your opinion be regarding the best - or a better - method for generating neighbour lists used for clustering?

mdsumner commented 6 years ago

Not sure I understand really, but what about nabor for identifying k-nearest neighbours?

Or, is it worth tabulating the triangulation index for which vertices are the "most-connected"?

mpadge commented 6 years ago

Yeah, i do think a k-neighbours scheme would be useful here - all the distance data are arma matrices, so that's dead easy to just use armadillo to implement a custom one here.

mpadge commented 6 years ago

The plan: Implement a nbs param with options of "tri", "trin" or numeric. The first is straight Delaunay; the second includes all neighbours with d < max (dist (tri)), and numeric values just get the n nearest.