Skip to content

An independent study reference written by Dr Phuc V. Nguyen. It is not official subject material — for assessment requirements always follow your subject outline and vUWS.

Supervised and unsupervised learning

The split turns on one question: do you already have the answer for past cases? Supervised learning starts from examples carrying a known outcome, called a label, and learns a rule mapping inputs to that outcome so it can be applied to new cases. Unsupervised learning has no labels. It searches the inputs themselves for structure, grouping similar records or compressing many variables into a few. The practical difference is how you check the work. Supervised results can be scored against withheld labels, while unsupervised results have no answer sheet and must be judged on stability and usefulness.

Why it matters

Supervised learning is a student with a marked practice exam. Every question comes with the right answer, so the student can test the rule they invented and correct it. Unsupervised learning is being handed a box of unlabelled photographs and asked to sort them into piles. There is no answer sheet. Someone has to look at the piles afterwards and say whether they mean anything.

Before you read on — recall

A fraud team holds 2,000 confirmed fraudulent transactions among 4 million records and wants to flag new ones. The strongest objection to reporting accuracy as the headline measure is

Formulas

What supervised learning is fitting
f^=argminf  1ni=1nL(yi,f(xi))\hat{f} = \arg\min_{f} \; \frac{1}{n} \sum_{i=1}^{n} L\big(y_i,\, f(x_i)\big)
Each training record has inputs xix_i and a known outcome yiy_i. The loss LL scores how wrong a prediction is, using squared error for a number or a penalty for a wrong class. The algorithm searches for the rule ff with the lowest average loss. That average is measured on the training records, which is exactly why performance must then be rechecked on data the rule never saw.
What k-means clustering is minimising
J=k=1KiCkxiμk2J = \sum_{k=1}^{K} \sum_{i \in C_k} \lVert x_i - \mu_k \rVert^2
A common unsupervised method. Pick KK centres, assign every record to its nearest centre, move each centre to the mean of the records assigned to it, and repeat until nothing moves. The quantity JJ is the total squared distance from records to their own centre. Its best attainable value cannot increase as KK rises, so it cannot tell you the right number of groups, and that choice stays a judgement.

Worked examples

Scenario

A telecommunications retailer wants to reduce churn. It holds 24 months of account records and knows which customers left. Which kind of learning applies, and what is the first trap?

Solution

The known outcome makes this supervised. Define the label precisely first: left within 90 days of the observation date, not left at any point ever, or the rule will quietly learn from the future. Then split the data, fit on one part and score on the withheld part. The trap is accuracy. If 3 in every 100 customers churn, a rule predicting that nobody churns scores 97 per cent and is worthless. Judge it instead on how many genuine leavers land in the top slice the retention team can afford to contact.

Scenario

The same retailer asks for customer segments to guide its marketing. No list of correct segments exists anywhere in the business.

Solution

This is unsupervised. A clustering run will always return groups, however many you ask for, and the algorithm cannot tell you whether they are real. Judge them on use instead. Do the groups differ in ways the marketing team can act on, do they survive refitting on a different half of the customers, and can a person describe each one in a sentence. Groups that fail those three tests are arithmetic rather than segments, and campaigns built on them are aimed at nobody in particular.

Common mistakes

  • Unsupervised learning is easier because there is no label to prepare. It is harder to trust. Without labels there is no independent score, so the only available checks are stability under refitting, interpretability, and whether acting on the output works.
  • A high accuracy figure means a good model. Accuracy misleads whenever the classes are unbalanced. Predicting the majority class every time scores well and helps nobody, so report measures that show how well the rare class is found.
  • The label is an objective fact about the customer. Someone defined it. Whether a customer counts as churned after 30, 90 or 180 days of inactivity is a business decision, and changing it changes what the model learns and how useful it is.
  • Clustering discovers the true segments hidden in the data. It partitions whatever you give it into however many groups you request. The structure returned depends on the variables included, how they were scaled, and the number of clusters chosen.

Revision bullets

  • Supervised needs labelled outcomes, unsupervised has none
  • Supervised splits into classification (a category) and regression (a number)
  • Unsupervised covers clustering, association and dimension reduction
  • Only supervised work can be scored against withheld labels
  • Accuracy misleads under class imbalance, so check the rare class
  • The label definition is a business choice that shapes everything downstream

Quick check

A fraud team holds 2,000 confirmed fraudulent transactions among 4 million records and wants to flag new ones. The strongest objection to reporting accuracy as the headline measure is

A clustering run on customer data returns five neat groups. Before presenting them, the most informative check is

Connected topics

More in Decisions and Models

Sources

  1. James, G., Witten, D., Hastie, T., & Tibshirani, R. An Introduction to Statistical Learning. 2nd ed., Springer, 2021.
    Introductory treatment of the supervised and unsupervised split, of splitting data into training and test sets, and of why fit to training data overstates real performance.
  2. Hastie, Tibshirani & Friedman (2009)
    Hastie, T., Tibshirani, R., & Friedman, J. The Elements of Statistical Learning. 2nd ed., Springer, 2009.
    Fuller technical account, including the point that unsupervised results lack any external criterion for correctness.
How to cite this page
Dr. Phil's Quant Lab. (2026). Supervised and unsupervised learning. Derivatives Atlas. https://phucnguyenvan.com/concept/ba-supervised-unsupervised
Next concept
Models as deliberate abstraction
Built by Dr. Phuc V. Nguyen ·Follow on LinkedInWork with PhilEmail