I am pretty new to clustering, so please be patient.
I have a set of points, and each point has a weight. I need to group these points into N clusters (N is defined).
I need these clusters to satisfy two conditions:
- The points of a cluster must be spatially connected.
- If a cluster has points with high weights, it must be smaller (less points). On the contrary, if the sum of the weights is small, it must have more points.
I have read another post that did something very similar.
It defined the distance between points, inserting the weight as a forth dimension. Then it defined several parameters to give more importance to the distance or to the weights. I cannot define these parameters (I think this would change for each example I try).
Also, this other post did not recommend any clustering algorithm...and I don't know where to start.
Thanks for the help!
PS: By the way, it would help if the algorithm is very fast.
kmeans
, but only allows sum-of-squares distances: look for others vialibrary(sos); findFn("k-means")
orfindFn("k-means distance")
then you might be able to hack your distance metric so that (say) distance was proportional towt1*wt2
so that more strongly weighted points count as farther apart. (I hope you get better advice than this.) (I'm recommending k-means because it's simple and definesN
a priori.) $\endgroup$