Closed
Description
Following discussion in #44 (comment) it could be useful to add partitioning around medoids (PAM) algorithm to KMedoids
,
From wikipedia:
- Initialize: greedily select k of the n data points as the medoids to minimize the cost
- Associate each data point to the closest medoid.
- While the cost of the configuration decreases:
- For each medoid m, and or each non-medoid data point o:
- Consider the swap of m and o, and compute the cost change
- If the cost change is the current best, remember this m and o combination
- Perform the best swap of m_best and o_best, if it decreases the cost function. Otherwise, the algorithm terminates.
- For each medoid m, and or each non-medoid data point o:
See "Clustering by Means of Medoids' Kaufman & Rousseeuw for more details. Also ESL book section 14.4.10 is worth reading.
Metadata
Metadata
Assignees
Labels
No labels