k-medoids vs k-means — the difference.
mediumAnswer
- k-medoids uses actual data points as cluster representatives (medoids) instead of arithmetic means.
- Robust to outliers (the median is more robust than the mean).
- Works with any distance/dissimilarity — not just Euclidean (categorical, custom).
- Cost: per iteration (PAM algorithm) — slower than k-means.
- Use for outlier-heavy data or non-Euclidean distances.
Check yourself — multiple choice
- Same as k-means
- Medoids = actual data points → robust to outliers + supports any distance; slower (PAM: )
- Only Euclidean
- Random
k-medoids: robust to outliers, arbitrary distance; slower than k-means.
#clustering
Practise Unsupervised Learning
214 interview questions in this topic.