Two different things to have
A bank in Nairobi has ten million past transactions. For 4,000 of them, an investigator looked and wrote down fraud or not fraud. Those 4,000 rows have labels: recorded answers.
With labels, you can do supervised learning. You show the model an input and the answer, it adjusts, and eventually it maps new inputs to answers. Almost everything with commercial value is supervised: spam filters, credit scoring, delivery-time estimates, medical triage, machine translation.
Without labels you can do unsupervised learning. You give the model ten million transactions and no answers, and ask what structure is in there. Clustering groups similar rows. Dimensionality reduction compresses 200 columns into 2 you can plot. Anomaly detection finds rows unlike the rest.
The distinction is not about the algorithm. It is about what you have.
Unsupervised results are questions, not answers
Run k-means on those transactions asking for six clusters, and you will get six clusters. You will get six clusters if the data is pure random noise, too. The algorithm has no way to tell you that the structure it found is not there.
And the clusters arrive unnamed. Cluster 4 is "rows 88,201, 88,540, 91,003 and 402,884 others". Someone has to look at them and say "these are salary deposits on the 25th" or "these are top-ups from a single agent network". That naming is human work, and it is where the mistakes live.
So: unsupervised methods are good at generating hypotheses and terrible at confirming them. If a cluster looks like a fraud ring, that is a lead for an investigator, not a finding.
The label defines the task
Here is the part that gets skipped, and it is the most important idea in this lesson.
A supervised model does not learn the truth. It learns your label. If your label is imperfect, the model learns the imperfection with the same enthusiasm it learns everything else.
The bank's label is not "fraud". It is "transactions an investigator looked at and confirmed as fraud". Those are different things:
- Fraud nobody noticed is labelled
not fraud. - Fraud noticed only because it matched the old rule-based system is over-represented.
- Fraud in a customer segment nobody audits is invisible.
Train on that and you get a model that reproduces the investigators' existing reach. It may be genuinely useful — it can rank a queue and save time — but it is a model of the detection process, not of fraud.
The same trap in other clothes:
- A hospital labels "patients with condition X" using billing codes. The model learns which patients get coded, which depends on the clinic, the insurer and the country.
- A recruiter labels "good hire" as "still employed after two years". The model learns retention, which is partly about managers.
- A logistics firm labels "late delivery" using customer complaints. The model learns which customers complain.
Before you look at a single metric, write one sentence: *this label was created by ____, and it misses ____.* If you cannot fill in the blanks, you do not yet know what you are building.
The middle ground, and where modern AI sits
Two shapes sit between the extremes and are worth knowing by name.
Semi-supervised: a small labelled set plus a large unlabelled one. Common in medicine, where labelling means a specialist's time.
Self-supervised: labels manufactured from the data's own structure. Hide a word in a sentence and predict it. Hide a patch of an image and predict it. No human labelled anything, yet the task is supervised in mechanism, and there is an unlimited supply of it.
Self-supervision is how large language models are trained, and it is the main reason they exist at all. The bottleneck on supervised learning was always labels. Self-supervision removed the bottleneck by inventing a task where the answer is already sitting in the data.
Before you move on