COMP328 Fundamentals of Machine Learning

Module 4 of 6

Unsupervised Learning

Every module so far has assumed you have labels to learn from. Module 4 removes that assumption entirely. Here you will find structure in data without being told what to look for — grouping, compressing, associating, and flagging the unusual — using methods that underpin much of modern data analysis and signal detection.

4 units 36 tutorials 4 unit quizzes 1 assignment

Module at a glance

Units 4 — the largest module in the course
Tutorials 36 — nine per unit
Quizzes 4 — one at the end of each unit
Assignment 1 — Unsupervised Learning Techniques
Study time ~26 hours plus assignment work

Learning outcomes

What you will be able to do

By the end of Module 4 you will be able to explore an unlabelled dataset, identify its internal structure using four different techniques, and judge whether the structure you found is real or an artefact of your method.

By the end of this module you will be able to

  • Distinguish supervised from unsupervised learning problems and identify which tasks require unlabelled data.
  • Apply K-Means and hierarchical clustering to group data points by similarity, and choose an appropriate number of clusters using the elbow method and silhouette analysis.
  • Explain the curse of dimensionality and why it motivates dimensionality reduction.
  • Apply Principal Component Analysis (PCA) to reduce high-dimensional data to a smaller number of informative components, and interpret the resulting variance explained.
  • Use dimensionality reduction as a tool for visualisation, and read the resulting plots honestly rather than over-interpreting them.
  • Discover associations between items using market basket analysis and the Apriori algorithm, and interpret rules in terms of support, confidence, and lift.
  • Detect anomalies using statistical and distance-based methods, and explain why anomaly detection is fundamentally different from classification.
  • Evaluate unsupervised results when no ground truth is available — and recognise the limitations of that evaluation.

A different kind of module

Unsupervised learning removes the two things you have relied on so far: labels and accuracy. You will not be told the right answer, and no metric will tell you definitively whether you found it. The habits this module builds — sceptical interpretation, multiple methods, honest visualisation — are exactly what working with unlabelled data demands.

Prerequisite reminder

This module assumes you are comfortable with the Python data stack from Module 1, Unit 3 — NumPy, Pandas, Matplotlib, and the Scikit-Learn estimator API. You will be using all four heavily, and increasingly without explicit instruction on how they work.

Units & tutorials

Four units, thirty-six tutorials

Module 4 covers four distinct unsupervised tasks. Units 10 and 11 are the core — grouping and compressing. Units 12 and 13 apply unsupervised ideas to two specific, practically important problems.

Unit 10 9 tutorials · ~7 hours

Clustering

Group data points by similarity, without being told what the groups are. K-Means, hierarchical clustering, and the hard question of how many clusters to keep.

Unit 11 9 tutorials · ~7 hours

Dimensionality Reduction

Too many features makes everything harder. Learn to compress high-dimensional data into fewer, more informative dimensions — and to visualise it honestly.

Unit 12 9 tutorials · ~6 hours

Association Learning

Finding things that occur together. Market basket analysis, the Apriori algorithm, and the rules that power recommendation systems.

Unit 13 9 tutorials · ~6 hours

Anomaly Detection

Finding the rare, the unusual, and the suspicious. Outlier detection, fraud detection, and intrusion monitoring — where the interesting cases are always the ones you have fewest examples of.

Datasets

What you will work with

Each unit uses a dataset that makes the specific unsupervised task concrete. Units 10 and 11 deliberately share a dataset, so you can cluster it and then visualise the same clusters via PCA.

Customer Segmentation Unit 10 · Clustering
Group retail customers by purchase behaviour — the canonical clustering problem.
Digits and Wine Unit 11 · Dimensionality Reduction
Two classic datasets for visualising PCA: one image-based, one tabular.
Online Retail Transactions Unit 12 · Association Learning
A transactional dataset for market basket analysis and rule discovery.
Credit Card Fraud Unit 13 · Anomaly Detection
A heavily imbalanced dataset where the anomalies are the point.

How to work through it

Explore, visualise, and stay sceptical

Unsupervised learning has no test set to tell you whether you got the right answer. The habits this module rewards are different from anything earlier in the course.

  1. Always plot first

    Before clustering or reducing dimensions, visualise the raw data. Patterns your eye can see are patterns worth understanding before an algorithm rediscovers them.

  2. Try at least two methods

    No single unsupervised method tells the whole story. If K-Means and hierarchical clustering disagree on the same data, that disagreement is itself information.

  3. Distrust clean results

    Unsupervised methods will always produce clusters. Always produce components. Always produce rules. The question is never "did it work?" but "is this structure real, or did the method impose it?"

  4. Finish with the unit quiz

    Each unit ends with a short quiz. Score it honestly before looking at the feedback.

Assessment

How this module is assessed

Module 4 carries four unit quizzes — the most of any module — and the unsupervised learning assignment.

  • Quiz 10 Clustering — 15 questions, counts toward your quiz grade Unit 10
  • Quiz 11 Dimensionality Reduction — 15 questions, counts toward your quiz grade Unit 11
  • Quiz 12 Association Learning — 15 questions, counts toward your quiz grade Unit 12
  • Quiz 13 Anomaly Detection — 15 questions, counts toward your quiz grade Unit 13
  • Assignment 4 Unsupervised Learning Techniques Open

Assignment 4 spans the whole module

Assignment 4: Unsupervised Learning Techniques asks you to apply at least two of this module's four techniques to a single dataset of your choosing and to interpret the results without the benefit of ground-truth labels. Its deadline falls in week 10, roughly the midpoint of Module 4. Plan to begin it as soon as you have completed Unit 11, rather than waiting until the end of the module.

Looking ahead

Module 5 returns to supervised learning — but with a dramatic increase in model capacity. Everything you have built so far has been limited to models with a few dozen parameters. Neural networks have thousands, sometimes millions. The evaluation tools from Module 2 carry over unchanged; the intuitions about how models behave need rebuilding.

👤