File Exchange

image thumbnail

Kmeans

version 1.0.0.0 (1.62 KB) by Wei LI
Kmeans implemented using accumarray

3 Downloads

Updated 28 Aug 2012

View License

Kmeans implemetation using accumarry, inspired by Mo Chen (http://www.mathworks.com/matlabcentral/fileexchange/24616). Performance much better than build-in kmeans, worse than Mo's original work. Mainly used for demostrate the use of accumarray.

Cite As

Wei LI (2020). Kmeans (https://www.mathworks.com/matlabcentral/fileexchange/37940-kmeans), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (8)

Dani

i have the same errors

shawin

please i have error when i run the code , it is :

Undefined function or variable 'dn'.

Error in kmeans (line 6)
label = ceil(rand(1, dn(D)) * k);

Error in Main (line 18)
[label, means] = kmeans(Data, k, maxIter)

shawin

please i have error when i run the code , it is :

Undefined function or variable 'dn'.

Error in kmeans (line 6)
label = ceil(rand(1, dn(D)) * k);

Error in Main (line 18)
[label, means] = kmeans(Data, k, maxIter

Mo Chen

Mo Chen

Carry on

MATLAB Release Compatibility
Created with R2012a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Acknowledgements

Inspired by: Kmeans Clustering