k-means++
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.
Cite As
Laurent S (2026). k-means++ (https://ch.mathworks.com/matlabcentral/fileexchange/28804-k-means), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.7.0.0 | Fixed bug with 1D datasets (thanks Xiaobo Li). |
||
| 1.6.0.0 | Improved handling of overclustering (thanks Sid S) and added a screenshot. |
||
| 1.5.0.0 | Small bugfix. |
||
| 1.4.0.0 | Removed dependency on randi for R2008a or lower (thanks Cassie). |
||
| 1.3.0.0 | Even faster, even less code and also fixed a few small bugs. |
||
| 1.0.0.0 |
