Three ways to learn to cook — and the three kinds of machine learning, in the same order. What separates them is not how clever they are or when they were invented. It is one question: when you try something, what comes back?
Do not start with definitions. Start here, because it carries all three and you will keep coming back to it. Step into each kitchen.
Chef is supervised. Recipe box is unsupervised. Restaurant is reinforcement.
| The teacher | What the machine gets | |
|---|---|---|
| Supervised | A teacher with an answer key | Every example comes with the right answer attached |
| Unsupervised | No teacher at all | Just a pile of data. “Here — tell me something about this.” |
| Reinforcement | No answer key, but a scoreboard | Nobody says what is right. You find out afterwards whether it went well. |
You have a pile of examples where the right answer is already known, and the machine learns to reproduce it on cases it has not seen. The most important word here is labelled. A label is the right answer, sitting next to the example. Forty cars and what each sold for. Ten customers and whether each one cancelled.
Where those labels come from is a business problem, not a technical one. Pick a source and look at what it costs.
That single question splits supervised learning in two, and it is far more useful than the textbook vocabulary. Here is the test: could you write all the possible answers on a menu? Try it on a few.
Ask it another way: is there anything in between two answers? Between ten lakh and eleven lakh there is 10.5, and 10.51, and 10.513, infinitely many. So that is a number. Between “spam” and “not spam” there is nothing at all — you cannot be 40% of the way from spam to not-spam. So that is a word.
One piece of vocabulary worth being blunt about: the formal name for predicting a number is regression, which is a historical accident from 19th-century statistics and has nothing to do with going backwards. It just means predicting a number.
Take one customer and one set of data. Watch what happens when you change nothing except how you phrase the question.
Same customer. Same data. Same information available. Different types of machine learning — because you chose how to ask.
Two things follow. The type is chosen by the question, not by the data. Anyone who tells you “our data is a classification problem” has skipped a decision that was theirs to make. And turning a number into a band throws information away — sometimes on purpose. The band is easier to act on, easier to explain, and easier to get right.
You have data and no answers at all, and you are asking the machine to find structure that nobody labelled. There is no cancelled column. No price column. No answer of any kind, anywhere.
Supervised learning answers a question you asked. Unsupervised learning tells you something you did not know to ask.
Think of sorting laundry. Nobody gives you the categories. You just start putting like with like, and piles emerge. Different people would make slightly different piles, and none of them is wrong. Here are ten shoppers, with no labels of any kind. Ask for however many groups you like.
Clustering has no right answer. Ask for two groups and you get two. Ask for five and you get five. The machine will always oblige. Whether the groups are useful is a human judgement, and it is yours.
The punchline is worth sitting with. A group like “visits twice a year, spends a fortune” is completely invisible on a visits-per-month report. Nobody would have defined that segment in a meeting. The data had it all along — clustering just made somebody look.
A different job: not sorting into groups, but looking for the single thing that should not be there. The red sock in the white wash. A transaction that does not look like you. A machine vibrating slightly wrong before it fails.
Here is the puzzle. Fraud is just yes or no — so why not take past frauds, label them, and learn what fraud looks like? Two reasons, and both are deep. You do not have examples of what you are looking for — the fraud that will hurt you next year has not happened yet, and a classifier can only recognise patterns it has already been shown. And the classes are hopelessly lopsided. Drag this.
Move it right and fraud gets rarer. The model below does nothing at all — it answers “not fraud” every single time, for every transaction, forever.
Accuracy is a broken measure when one answer is overwhelmingly common. So anomaly detection flips the question entirely:
You need no examples of fraud at all. You only need lots of examples of normal — which you have, by the million, for free. The cost of that flip, and it is worth being honest about: anomaly detection finds things that are unusual, and unusual is not the same as wrong. Your first-ever trip abroad is genuinely anomalous and entirely legitimate. That is why these systems generate so many false alarms, and why a human sits at the end of almost all of them.
Nobody tells you the right answer; you try things, and you find out later how it went. Reward and punishment is the whole vocabulary you need.
Training a dog is the clearest version. You never explain anything. The dog sits and gets a treat. Jumps on the sofa and gets none. Nobody has ever described the rule, and the dog could not state it — but within weeks the behaviour is exactly what you wanted.
You win a chess game on move sixty. Which of your sixty moves won it? The reward arrives at the end, attached to everything you did. Try to assign the credit.
Every executive recognises the business version: a large deal closes after eight meetings, three emails and a dinner. Which one closed it? Nobody knows. That is not a failure of record-keeping — the credit genuinely cannot be assigned from a single outcome.
Friday night. Your favourite restaurant, which you know is good — or the new place, which might be better and might be terrible? Go to the favourite every time and you will never find anything better. Try somewhere new every time and you will eat a lot of bad dinners.
Set how often you gamble. Twenty Fridays, averaged over a thousand runs.
Never gambling is not the best strategy, and neither is always gambling. Every reinforcement learning system faces this at every single step, and so does every business: keep running the ad that works, or test a new one? Sell to the segment we understand, or try the one we don’t?
Be straight about this or the idea oversells itself. Reinforcement learning needs somewhere safe to fail thousands of times. A simulated robot can fall over a million times before lunch. A pricing algorithm cannot destroy a million real transactions to find out what works.
| Works brilliantly | Struggles |
|---|---|
| Games, where the rules are known and failure is free | Anything where each mistake costs real money |
| Robotics and logistics — you can simulate first | Anything a regulator must approve |
| Ad and offer selection — millions of cheap, fast, reversible decisions | Anything where feedback takes months |
The pattern: it thrives where mistakes are cheap, fast and reversible. Most business decisions are none of those three.
A raw language model, trained on a mountain of text, is good at predicting the next word and not naturally good at being helpful, safe or willing to follow an instruction. What fixed that was reinforcement learning. Step through it.
Predicting the next word made it knowledgeable. Reinforcement made it useful.
Two things worth adding. The ranking is labour: thousands of people reading answers and choosing between them. That is the hidden human cost inside every polished AI product. And you get what you reward — a model rewarded for answers that look good learns to produce answers that look good, which is one honest explanation of why these systems sometimes sound confident about things they have invented.
Three situations, but five things you will actually meet, because supervised splits in two and unsupervised splits in two. Pick one.
Or in three lines: supervised — I show you the answers, learn to reproduce them. Unsupervised — I show you nothing, tell me what is in here. Reinforcement — I show you the score, work out what to do.
Work down and stop at the first yes.
Twelve jobs. Five possible answers. The last one is deliberately unfair, and that is the point.
The two loan questions are the whole exercise: identical data, identical customer, and the type changed because the question changed. If you keep one thing from this page, keep that.
And the star rating is genuinely ambiguous. Treat one-to-five stars as five labels and you cannot express 4.5. Treat it as a number and the model may output 3.7 stars, which nobody ever gave. Both choices are defensible and both lose something.
Two limits worth carrying away, and the first is best seen rather than read. Real systems rarely sit in one box. Pick a real product and see how many types it chains together.
The neat five-box table hides how often real problems straddle boxes. The star rating earlier is not a trick — it is typical. The table is a way to think, not a filing system.
And picking the right type does not make the problem solvable. You can identify correctly that you have a supervised classification problem and still fail, because nobody recorded the labels, or the labels that exist encode a decision you would not want repeated. Which kind of problem you have and whether you can act on it are separate questions, and this page only answers the first.