Given a set of points (x,y), I would like to create K clusters of these points similar to the k-means algorithm. The difference is that I would like to define the number of points contained in a cluster, in my situation I would like them to all be equal. For example, take 30 points and put them into 3 sets of 10 points so that the total distance between points in all clusters is minimized. Ideally I would like to implement the solution using R. Thanks for your help!
Tell me more
×
Cross Validated is a question and answer site for
statisticians, data analysts, data miners and data visualization experts. It's 100% free, no registration required.
|
|
|||||||
|
migrated from gis.stackexchange.com Aug 19 '11 at 20:08
|
Give the spatstat package a go - the package was designed by CSIRO for spatial point pattern analysis. There's a very extensive paper going over the use of the package on the CSIRO website. |
|||
|
|
|
How different are your cluster sizes with plain k-means ? Take a look at k-means-algorithm-variation-with-equal-cluster-size (Python, not R). |
|||
|
|