Martin Vickers

Researcher and former SysAdmin

CUDA k-Means clustering

Clustering algorithms have been a big part of the research I have conducted over the last four years.

The k-Means clustering algorithm works as follows;

Randomly select k centre points from the population X

Assign each point in the population to the cluster where the centre is closest

Calculate a new centre for each cluster

Repeat 2 and 3 until there is no movement in the centre values

This is implemented in C using CUDA kernels for the assignment, calculating new cluster centers and checking for movement. It is important to note that this was written for a purpose so may not be robust when used for other things. It is published here as it may be useful for others.