matlab_kmeans_test, a MATLAB code which illustrates how MATLAB's kmeans() command can be used to handle the K-Means problem, which organizes a set of N points in M dimensions into K clusters.
Because kmeans() is a built-in function in MATLAB, you can examine its source code by starting MATLAB and then typing
edit kmeans
The computer code and data files described and made available on this web page are distributed under the MIT license
matlab_kmeans_test is available in a MATLAB version.
asa058, a MATLAB code which implements the K-means algorithm of Sparks.
asa136, a MATLAB code which implements the Hartigan and Wong clustering algorithm.
cities, a MATLAB code which handles various problems associated with a set of "cities" on a map.
cities, a dataset directory which contains sets of data defining groups of cities.
image_quantization, a MATLAB code which demonstrates how the KMEANS algorithm can be used to reduce the number of colors or shades of gray in an image.
kmeans, a MATLAB code which contains several different algorithms for the K-Means problem, which organizes a set of N points in M dimensions into K clusters;
kmeans_fast, a MATLAB code which contains several different algorithms for the K-Means problem, which organizes a set of N points in M dimensions into K clusters, by Charles Elkan.
lorenz_ode_cluster_test, a MATLAB code which takes a set of N points on a trajectory of solutions to the Lorenz equations, and applies the K-means algorithm to organize the data into K clusters.
sammon_data, a MATLAB code which generates six sets of M-dimensional data for cluster analysis.
spaeth, a dataset directory which contains a set of test data.
spaeth2, a dataset directory which contains a set of test data.
There are data files read by the sample code: