kmedioids

Performs kmedioids clustering, requires only a nxn distance matrix D and number of clusters, k.

You are now following this Submission

Performs k-mediods clustering; only requires a distance matrix D and number of clusters k. Finds cluster assignments "inds" to minimize the following cost function:

sum(D(inds==i,inds==i),2), summed over i=1:k

Determining cluster assignments and cluster centers are both done in an efficient, vectorized way. Cluster assignment is O(nk) and cluster centering is O(k*(max cluster size)^2)

Cite As

Benjamin Sapp (2026). kmedioids (https://uk.mathworks.com/matlabcentral/fileexchange/28860-kmedioids), MATLAB Central File Exchange. Retrieved .

Categories

Find more on Statistics and Machine Learning Toolbox in Help Center and MATLAB Answers

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.0.0