EasyDeepLearn

k-medoids vs k-means — the difference.

medium

Answer

  • 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: O(k(nk)2)O(k(n - k)^{2}) 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: O(k(nk)2)O(k(n - k)^{2}))
  • Only Euclidean
  • Random

k-medoids: robust to outliers, arbitrary distance; slower than k-means.

#clustering

Practise Unsupervised Learning

214 interview questions in this topic.

Related questions