kmedioids

Performs kmedioids clustering, requires only a nxn distance matrix D and number of clusters, k.
1.7K Downloads
Updated 27 Sep 2010

View License

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 (2025). kmedioids (https://in.mathworks.com/matlabcentral/fileexchange/28860-kmedioids), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2010a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Statistics and Machine Learning Toolbox in Help Center and MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0.0