kmeans_mt

Efficient Kmeans using Multiple Threads

You are now following this Submission

This code implements the basic kmeans algorithm using Euclidean distance, and its computation speed is optimized using C/C++ and multiple threads.
When the number of samples and feature dimensions are large, this code would be significantly faster than the one in the Matlab toolbox and other efficient implementations such as litekmeans(http://www.cad.zju.edu.cn/home/dengcai/Data/code/litekmeans.m)
For example, for data with 17 dimensions and 154401 samples, the following is the speeds of different codes to generate the same result after 100 iterations in a PC with 3.4GHz i7 Intel CPU:
Matlab toolbox: 10.32 sec
litekmeans: 7.50 sec
This code: 2.92 sec

Cite As

Haw-Shiuan Chang (2026). kmeans_mt (https://www.mathworks.com/matlabcentral/fileexchange/47737-kmeans_mt), 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.3.0.0

update the readme file

1.2.0.0

update the readme file

1.1.0.0

update the readme document

1.0.0.0