Core ML Models · Module 5

K-Means Clustering

No labels. Group similar rows by distance to cluster centers.

Problem

Segment students into study-style groups using hours studied and practice tests taken — without pass/fail labels.

Diagram — Clusters and centroids

black dots = centroids (means)
1Pick K

Number of groups.

2Assign

Nearest centroid.

3Update

Move centroids.

4Repeat

Until stable.

Remember: K-Means needs scaled numeric features and a sensible K.