**kmeans_test**,
a FORTRAN90 code which
calls kmeans(), which
handles the K-Means problem,
which organizes a set of N points in M dimensions into K clusters;

The computer code and data files described and made available on this web page are distributed under the MIT license

kmeans, a FORTRAN90 code which solves the K-Means problem, which organizes a set of N points in M dimensions into K clusters;

- kmeans_test.f90, a sample problem.
- kmeans_test.sh, runs all the tests.
- kmeans_test.txt, the output file.

There are data files read by the sample code:

- points_100.txt, 100 2D points, used as a case study by the sample problem.
- points_100.png, an image of the points.
- ruspini.txt, 75 points in 2D, with integer coordinates, which might naturally be grouped into 4 sets.
- weights_equal_100.txt, 100 equal weights, for doing equally weighted calculations when a program expects weights.
- weights_unequal_100.txt, 100 weights, not all equal, for testing programs that can use weights.

**TEST01** applies HMEANS_01 to points_100.txt:

- test01_clusters.txt the cluster assignments.
- test01_centers.txt the cluster centers.

**TEST02** applies HMEANS_02 to points_100.txt:

- test02_clusters.txt the cluster assignments.
- test02_centers.txt the cluster centers.

**TEST03** applies KMEANS_01 to points_100.txt:

- test03_clusters.txt the cluster assignments.
- test03_centers.txt the cluster centers.

**TEST04** applies KMEANS_02 to points_100.txt:

- test04_clusters.txt the cluster assignments.
- test04_centers.txt the cluster centers.

**TEST05** applies KMEANS_03 to points_100.txt:

- test05_clusters.txt the cluster assignments.
- test05_centers.txt the cluster centers.

**TEST06** applies HMEANS_01 + KMEANS_01 to points_100.txt:

- test06_clusters.txt the cluster assignments.
- test06_centers.txt the cluster centers.

**TEST07** applies HMEANS_01 + KMEANS_02 to points_100.txt:

- test07_clusters.txt the cluster assignments.
- test07_centers.txt the cluster centers.

**TEST08** applies KMEANS_01 + KMEANS_03 to points_100.txt:

- test08_clusters.txt the cluster assignments.
- test08_centers.txt the cluster centers.

**TEST09** applies HMEANS_W_01 to points_100.txt and weights_equal_100.txt:

- test09_clusters.txt the cluster assignments.
- test09_centers.txt the cluster centers.

**TEST10** applies HMEANS_W_02 to points_100.txt and weights_equal_100.txt:

- test10_clusters.txt the cluster assignments.
- test10_centers.txt the cluster centers.

**TEST11** applies KMEANS_W_01 to points_100.txt and weights_equal_100.txt:

- test11_clusters.txt the cluster assignments.
- test11_centers.txt the cluster centers.

**TEST12** applies KMEANS_W_03 to points_100.txt and weights_equal_100.txt:

- test12_clusters.txt the cluster assignments.
- test12_centers.txt the cluster centers.

**TEST13** applies HMEANS_W_01 to points_100.txt and weights_unequal_100.txt:

- test13_clusters.txt the cluster assignments.
- test13_centers.txt the cluster centers.

**TEST14** applies HMEANS_W_02 to points_100.txt and weights_unequal_100.txt:

- test14_clusters.txt the cluster assignments.
- test14_centers.txt the cluster centers.

**TEST15** applies KMEANS_W_01 to points_100.txt and weights_unequal_100.txt:

- test15_clusters.txt the cluster assignments.
- test15_centers.txt the cluster centers.

**TEST16** applies KMEANS_W_03 to points_100.txt and weights_unequal_100.txt:

- test16_clusters.txt the cluster assignments.
- test16_centers.txt the cluster centers.