Module 13: Unsupervised Learning

Every model so far has learned from labeled examples. This module removes the labels. Clustering asks whether natural groups exist in the data without anyone specifying what to look for — the technique behind customer segmentation. Dimension reduction asks a complementary question: when a dataset has dozens of columns, can a handful of constructed features capture most of what matters? Both are exploratory tools, and both require judgment, because there is no accuracy score to tell you when you are right.

Learning Objectives

By the end of this module, you will:

  • Explain the difference between supervised and unsupervised learning and when each applies
  • Describe how K-Means groups observations through iterative centroid updates
  • Implement K-Means with scikit-learn and engineer behavioral features for segmentation
  • Use the elbow method and silhouette scores to choose k — and recognize ambiguous results
  • Scale features and encode categorical variables so all features contribute fairly
  • Interpret cluster profiles in behavioral and demographic terms
  • Explain how PCA finds directions of maximum variance, and how extraction differs from selection
  • Run the full PCA workflow — standardize, fit, choose components via a scree plot, and read loadings

Module Resources

Lecture

Resource Link
📊 Week 13 Slides View slides

Chapters & Notebooks

Each chapter has a companion Colab notebook with all the code from the chapter — ready to run, no installation required.

Chapter Topic Colab Notebook
31 Unsupervised Learning and Clustering Open in Colab
32 Dimension Reduction with PCA Open in Colab

Lab

Resource Link
🧪 Lab 13: Clustering Open in Colab

Reference

Resource Link
📋 Module 13 Cheat Sheet View cheat sheet