three situations, not three technologies

a chef“too much salt”
a recipe box— nothing —
a restauranttable booked again
nothing sent yet

The three types ofmachine learning

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?

Three ways to learn to cook

Do not start with definitions. Start here, because it carries all three and you will keep coming back to it. Step into each kitchen.

same learner, three kitchens

what happens

what made it possible

Chef is supervised. Recipe box is unsupervised. Restaurant is reinforcement.

The teacherWhat the machine gets
SupervisedA teacher with an answer keyEvery example comes with the right answer attached
UnsupervisedNo teacher at allJust a pile of data. “Here — tell me something about this.”
ReinforcementNo answer key, but a scoreboardNobody says what is right. You find out afterwards whether it went well.
These are not three different technologies. They are three different situations you can be in, defined entirely by what kind of feedback is available to you. The situation picks the approach — you don’t.
worth trying on yourselfIf you wanted to teach someone your job, which of the three would it be? Most people say “I’d sit with them and correct their work” — supervised. Then ask: what about the parts of your job where you cannot say why you do it that way, only whether it worked? That is the other two.

When somebody already knows the answer

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.

where do the answers come from?
Having data is not the requirement. Having data with the answers attached is the requirement. Twenty years of invoices with no record of which customers turned out to be trouble gives you nothing to learn from.

Does the answer come out as a word, or as a number?

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.

could you put every possible answer on a menu?0 of 6 tried

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.

The part almost nobody teaches

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 — you choose 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.

When nobody knows the answer

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.

ten shoppers, no answer column anywhere
how many groups shall I find?

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.

What does not belong?

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.

a model that never catches anything
fraud happens in 1 in 10,000 transactions

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.

99.99%
accurate
and completely worthless

Accuracy is a broken measure when one answer is overwhelmingly common. So anomaly detection flips the question entirely:

Classification learns what the thing looks like. Anomaly detection learns what everything else looks like, and points at whatever is left over.

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.

When you only find out afterwards

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.

Which move was the good one?

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.

you won. now say which move did it.

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.

The known-good, or the untried?

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.

twenty Fridays

how often you try somewhere new

20%

total enjoyment over 20 Fridays

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?

a board-level question long before it is a technical oneWhat share of your budget goes to trying things that might not work? For most organisations the honest answer is “almost none, and we call that discipline.”

Why you rarely see it in business

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 brilliantlyStruggles
Games, where the rules are known and failure is freeAnything where each mistake costs real money
Robotics and logistics — you can simulate firstAnything a regulator must approve
Ad and offer selection — millions of cheap, fast, reversible decisionsAnything where feedback takes months

The pattern: it thrives where mistakes are cheap, fast and reversible. Most business decisions are none of those three.

Where you have already met it

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.

how a raw model was made useful

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.

All five, on one page

Three situations, but five things you will actually meet, because supervised splits in two and unsupervised splits in two. Pick one.

five kinds of problem

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.

Which one is your problem?

Work down and stop at the first yes.

stop at the first yes
That very first question is the one that stops most real projects. Not “do we have data” but do we have the answers, written down, for past cases? Organisations routinely discover at exactly this point that nobody ever recorded what happened next.

Name the type

Twelve jobs. Five possible answers. The last one is deliberately unfair, and that is the point.

which kind of problem is this?0 of 12 named

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.

What this does not settle

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.

how many of the five does one product use?

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.

Three sentences to keep. These are three situations, not three technologies — the feedback available to you picks the approach. The type is chosen by the question you ask, not by the data you hold. And having data is not the requirement; having data with the answers attached is the requirement.