April 19th, 2012, 11:28 am
QuoteOriginally posted by: outrunIf all neighbors are to the right, then you move that direction. If you are in the middle of the crowd, then you stop moving.I think if you have n points, you can find their middle in n-1 steps. Start by taking the average position of points j and k. Then find the average of that point and point v, but giving a two-third/one-third weighting. Or if you have an even number of points, pair them off and find the average of each pair. Repeat until you don't have an even number, and then use the weighting.If you want n clusters, then you just average each point with its closest point, and always average lowest-weighted points first, until there are n weighty points left where you want n clusters. Or if you want n to be dictated by the natural clustering, keep averaging the lowest-weight points with their closest neighbors, but only do so if the distance is below a maximum. Or if the distance is below a maximum that is a function of their combined weight.
Last edited by
farmer on April 18th, 2012, 10:00 pm, edited 1 time in total.