{"course":{"slug":"machine-learning-foundations","title":"Machine Learning, Foundations","url":"https://addaly.com/learn/machine-learning-foundations","level":"intermediate","track":"start"},"lesson":{"slug":"supervised-and-unsupervised","title":"With answers, and without","url":"https://addaly.com/learn/machine-learning-foundations/supervised-and-unsupervised","position":2,"of":92,"minutes":7,"answer":"A supervised model learns your labels, not the reality behind them, so who made the labels is part of the model.","keyIdea":"A supervised model learns your labels, not the reality behind them, so who made the labels is part of the model."},"body":{"format":"markdown","text":"## Two different things to have\n\nA 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.\n\nWith 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.\n\nWithout 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.\n\nThe distinction is not about the algorithm. It is about what you have.\n\n## Unsupervised results are questions, not answers\n\nRun 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.\n\nAnd 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.\n\nSo: 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.\n\n## The label defines the task\n\nHere is the part that gets skipped, and it is the most important idea in this lesson.\n\nA 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.\n\nThe bank's label is not \"fraud\". It is \"transactions an investigator looked at and confirmed as fraud\". Those are different things:\n\n- Fraud nobody noticed is labelled `not fraud`.\n- Fraud noticed only because it matched the old rule-based system is over-represented.\n- Fraud in a customer segment nobody audits is invisible.\n\nTrain on that and you get a model that reproduces the investigators' existing reach. It may be useful (it can rank a queue and save time) but it is a model of the detection process, not of fraud.\n\nThe same trap in other clothes:\n\n- 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.\n- A recruiter labels \"good hire\" as \"still employed after two years\". The model learns retention, which is partly about managers.\n- A logistics firm labels \"late delivery\" using customer complaints. The model learns which customers complain.\n\nBefore 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.\n\n## The middle ground, and where modern AI sits\n\nTwo shapes sit between the extremes and are worth knowing by name.\n\n**Semi-supervised**: a small labelled set plus a large unlabelled one. Common in medicine, where labelling means a specialist's time.\n\n**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.\n\nSelf-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."},"check":{"question":"A payments team trains a fraud classifier on a label built from cases their investigators confirmed as fraud. On held-out data it performs well. What has the model most likely learned?","options":[{"text":"Which transactions resemble the ones this team's investigators already catch.","correct":true},{"text":"What fraud looks like in general, since every confirmed case genuinely was fraud.","correct":false,"tempting":"The labels contain no false positives, which feels like the definition of a trustworthy label. The damage is in what the label omits, not in what it asserts."},{"text":"Nothing worth deploying, because the labels are biased.","correct":false,"tempting":"Once bias is named it invites a clean rejection, but a model of the detection process can still rank a review queue usefully as long as everyone knows that is what it is."},{"text":"It would avoid this problem if they used unsupervised clustering instead.","correct":false,"tempting":"No labels sounds like no label bias, but the same features, the same sampled population and the same human interpretation of the clusters carry the bias straight through."}]},"prev":{"slug":"what-learning-means","title":"What a machine actually learns","url":"https://addaly.com/learn/machine-learning-foundations/what-learning-means"},"next":{"slug":"the-shape-of-a-dataset","title":"What a row is, and why that decision is the whole project","url":"https://addaly.com/learn/machine-learning-foundations/the-shape-of-a-dataset"},"authorship":"Founder and series editor: Dr Mustafa Mun. Written by AI models to a written standard. Exam keys checked blind by a second model: 3,665 of 3,666 agreed. Academic review invited.","review":{"status":"Draft, open for academic review"},"cite":"Addaly (2026) 'With answers, and without', in Machine Learning, Foundations. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/machine-learning-foundations/supervised-and-unsupervised (Accessed: 31 October 2026).","licence":{"name":"CC BY-NC-SA 4.0","url":"https://creativecommons.org/licenses/by-nc-sa/4.0/"},"reader":{"schema":1,"title":"With answers, and without","courseTitle":"Machine Learning, Foundations","module":{"index":1,"slug":"what-learning-is","title":"What learning is, and what it is not"},"answer":null,"keyIdea":"A supervised model learns your labels, not the reality behind them, so who made the labels is part of the model.","hero":{"kind":"plate","image":null,"alt":null,"caption":null},"blocks":[{"t":"h2","id":"two-different-things-to-have","runs":[{"text":"Two different things to have"}]},{"t":"p","runs":[{"text":"A bank in Nairobi has ten million past transactions. For 4,000 of them, an investigator looked and wrote down "},{"text":"fraud","code":true},{"text":" or "},{"text":"not fraud","code":true},{"text":". Those 4,000 rows have "},{"text":"labels","b":true},{"text":": recorded answers."}]},{"t":"p","runs":[{"text":"With labels, you can do "},{"text":"supervised learning","b":true},{"text":". 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."}]},{"t":"p","runs":[{"text":"Without labels you can do "},{"text":"unsupervised learning","b":true},{"text":". 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."}]},{"t":"p","runs":[{"text":"The distinction is not about the algorithm. It is about what you have."}]},{"t":"h2","id":"unsupervised-results-are-questions-not-answers","runs":[{"text":"Unsupervised results are questions, not answers"}]},{"t":"p","runs":[{"text":"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."}]},{"t":"p","runs":[{"text":"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."}]},{"t":"p","runs":[{"text":"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."}]},{"t":"h2","id":"the-label-defines-the-task","runs":[{"text":"The label defines the task"}]},{"t":"p","runs":[{"text":"Here is the part that gets skipped, and it is the most important idea in this lesson."}]},{"t":"p","runs":[{"text":"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."}]},{"t":"p","runs":[{"text":"The bank’s label is not “fraud”. It is “transactions an investigator looked at and confirmed as fraud”. Those are different things:"}]},{"t":"ul","items":[[{"text":"Fraud nobody noticed is labelled "},{"text":"not fraud","code":true},{"text":"."}],[{"text":"Fraud noticed only because it matched the old rule-based system is over-represented."}],[{"text":"Fraud in a customer segment nobody audits is invisible."}]]},{"t":"p","runs":[{"text":"Train on that and you get a model that reproduces the investigators’ existing reach. It may be useful (it can rank a queue and save time) but it is a model of the detection process, not of fraud."}]},{"t":"p","runs":[{"text":"The same trap in other clothes:"}]},{"t":"ul","items":[[{"text":"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."}],[{"text":"A recruiter labels “good hire” as “still employed after two years”. The model learns retention, which is partly about managers."}],[{"text":"A logistics firm labels “late delivery” using customer complaints. The model learns which customers complain."}]]},{"t":"p","runs":[{"text":"Before you look at a single metric, write one sentence: "},{"text":"this label was created by ____, and it misses ____.","i":true},{"text":" If you cannot fill in the blanks, you do not yet know what you are building."}]},{"t":"h2","id":"the-middle-ground-and-where-modern-ai-sits","runs":[{"text":"The middle ground, and where modern AI sits"}]},{"t":"p","runs":[{"text":"Two shapes sit between the extremes and are worth knowing by name."}]},{"t":"p","runs":[{"text":"Semi-supervised","b":true},{"text":": a small labelled set plus a large unlabelled one. Common in medicine, where labelling means a specialist’s time."}]},{"t":"p","runs":[{"text":"Self-supervised","b":true},{"text":": 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."}]},{"t":"p","runs":[{"text":"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."}]}],"check":{"question":[{"text":"A payments team trains a fraud classifier on a label built from cases their investigators confirmed as fraud. On held-out data it performs well. What has the model most likely learned?"}],"options":[{"text":[{"text":"Which transactions resemble the ones this team’s investigators already catch."}],"correct":true,"tempting":null},{"text":[{"text":"What fraud looks like in general, since every confirmed case genuinely was fraud."}],"correct":false,"tempting":[{"text":"The labels contain no false positives, which feels like the definition of a trustworthy label. The damage is in what the label omits, not in what it asserts."}]},{"text":[{"text":"Nothing worth deploying, because the labels are biased."}],"correct":false,"tempting":[{"text":"Once bias is named it invites a clean rejection, but a model of the detection process can still rank a review queue usefully as long as everyone knows that is what it is."}]},{"text":[{"text":"It would avoid this problem if they used unsupervised clustering instead."}],"correct":false,"tempting":[{"text":"No labels sounds like no label bias, but the same features, the same sampled population and the same human interpretation of the clusters carry the bias straight through."}]}],"order":[2,1,3,0],"why":null},"prev":{"slug":"what-learning-means","title":"What a machine actually learns","minutes":8},"next":{"slug":"the-shape-of-a-dataset","title":"What a row is, and why that decision is the whole project","minutes":9}}}