cluster2
cluster2,
given 4 sets of data, use the K-means algorithm to identify clusters.
-
exercise1.py,
plots the student medical records, with red rings at 1, 2 and
3 standard deviations from the mean.
-
hw_data.txt,
a dataset of student medical records. Each record is a student
index number, a height, and a weight.
-
exercise2.py,
uses kmeans2() to sort the Old Faithful data into 1, 2 or 3 clusters.
-
faithful_data.txt,
the original 272 pairs of eruption and wait times for a geyser.
-
exercise3.py,
uses kmeans2() to cluster the Ruspini data into 1 through 10 clusters,
and plots the resulting "energy" of each clustering.
-
ruspini_data.txt,
a set of 2D data.
-
exercise4.py,
uses kmean2() to cluster the colors used in a JPEG image,
reducing the number of colors from almost 300,000 to 10 or 15.
-
swim.jpg,
an image of a swimmer.
Last revised on 28 March 2025.