Clustering I
k-means and cluster evaluation
k-means and Lloyd’s algorithm; hierarchical clustering and linkage; choosing the number of clusters with the elbow, the silhouette, and the gap statistic.
📖 Assigned reading: ISLR §10.3
📊 Slides
- 🖥️ Clean slides
- ✏️ Annotated slides (in-class version)
🧪 Labs
Live, in-browser R lab — runs entirely in your browser via webR, no local R install needed.
- 🧪 Lab: Thyroid patients (live R) — edit and re-run any code cell: k-means and hierarchical clustering on five thyroid lab tests, with the silhouette and gap statistic for choosing K. A “Download my code” button captures whatever you’ve written before you leave.