Returns a clustering that is within 2 times the cost of the optimal k-medians clustering.
Returns a clustering that is within 2 times the cost of the optimal k-medians clustering.
The algorithm is fairly simple. It starts with a ranomd seed cluster. It then adds a new
cluster by finding the point that is farthest away from its nearest cluster. This point is
the seed for a new cluster. We repeat until we have k
clusters.
Clustering to Minimize the Maximum Intercluster Distance, Gonzalez 1984
This returns a 2-tuple of an array of distances of each point to their nearest center and an array of cluster indexes each point belongs to.
This returns the cost of the k-medians clustering given by centers
.
This returns the cost of the k-medians clustering given by centers
. The
points must also be associated with a set of weights.