--- id: Compare and Contrast aliases: - clustering algorithms tags: - Compare-and-Contrast --- ## [[clustering algorithms]] - [[K-Means]] vs [[K-Medoids]] - In _K-means_ algorithm, they choose means as the centroids but in the _K-medoids_, data points are chosen to be the medoids[^1]. - [[K-Means]] vs [[K-Medians]] | K-Means | K-Medians | | ---------------------------------------------------------- | --------------------------------------------- | | The center is not necessarily one of the input data points | Centers will be chosen from data points | | Not flexible | More flexible | | Not immune to noise and outliers | More robust to noise and outliers | | Minimize the sum of squared Euclidian distance | Minimize a sum of pairwise of dissimilarities | [^1]: Medoids areĀ **representative objects of a data set or a cluster within a data set whose sum of dissimilarities to all the objects in the cluster is minimal**. Medoids are similar in concept to means or centroids, but medoids are always restricted to be members of the data set.