Artificial intelligence · lesson 2 of 4
Clustering, distances and interpretation
Clustering groups examples according to a representation and similarity rule. The groups are not automatically true natural categories.
Learn the ideas
Prerequisites: Vectors and squared distances.
Unsupervised task
Clustering groups examples according to a representation and similarity rule. The groups are not automatically true natural categories.
K-means
K-means alternates assignments to nearby centres with mean updates and seeks to reduce within-cluster squared distances.
Scaling
Feature units can dominate distance. Standardization choices can change clusters and should be justified.
Validation
Inspect stability, domain usefulness and sensitivity to settings. A visually separated plot is not by itself a universal quality certificate.
Worked examples
Points 2 and 6 belong to one one-dimensional cluster. Find their mean centre.
(2+6)/2=4.
4
Find squared Euclidean distance between (1,2) and (4,6).
(4−1)²+(6−2)²=9+16.
25
Check your understanding
8 questionsDecimals or fractions are accepted for numeric answers. Proofs and written responses use sample answers and require human marking. This is practice, not a protected examination.
Further reading and review references
These are reference links, not copied exercises, institutional endorsement or proof of independent review.