Updated Mon, 11 Feb 2013 20:41:58 +0000
An efficient implementation of the k-means++ algorithm for clustering multivariate data. It has been shown that this algorithm has an upper bound for the expected value of the total intra-cluster distance which is log(k) competitive. Additionally, k-means++ usually converges in far fewer than vanilla k-means.
Laurent S (2023). k-means++ (https://www.mathworks.com/matlabcentral/fileexchange/28804-k-means), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Inspired by: Kmeans Clustering
Inspired: kmeans_varpar(X,k), Sparsified K-Means
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Fixed bug with 1D datasets (thanks Xiaobo Li).
Improved handling of overclustering (thanks Sid S) and added a screenshot.
Removed dependency on randi for R2008a or lower (thanks Cassie).
Even faster, even less code and also fixed a few small bugs.