Reputation: 4618
I was trying to cluster cities and came up with a problem:
I wanted the centroids to be obligatory in a city and they ended up in a desert area. I want to know if it is possible to "say" that the centroids have to be points in the input data. In order words, I want to find the n points in the input data that minimizes the sum of the distances of all points to this set.
Upvotes: 1
Views: 49
Reputation: 1827
K-medoids (or PAM) is the algorithm you are looking for.
Upvotes: 1