Sort it into a group
Picking one group, and saying how sure.
How can a machine sort mangoes?
A packing house wants a machine to sort mangoes into three boxes: Ready to eat, Not yet and Too ripe. How could a machine learn to do that?
What this lesson covers
The idea
Classification puts a new item into a group the machine learned from labelled examples, and the machine can say how sure it is.
How can a machine sort mangoes?
A packing house wants a machine to sort mangoes into three boxes: Ready to eat, Not yet and Too ripe. How could a machine learn to do that?
- By studying many mangoes that people have already sorted
- By following a rule written for every kind of mango
- By tasting a few mangoes itself
You against the machine
The machine has already studied nine mangoes that people sorted into three boxes. Now new mangoes arrive. Guess first, then see what the machine says.
Watch the percentages. They show how strongly the clues point to each box.
A group, and how sure
The machine counted which clues went with which box in the nine labelled mangoes. For a new mango, it chose the box whose clues fitted best.
It was very sure about the easy mangoes. It was only just over half sure about two odd ones, and it got one of them wrong.
Classification means putting a new item into one of the groups a machine learned from labelled examples.
Learning from labelled examples is called supervised learning.
Notes
Classification means putting a new item into one of the groups a machine learned from labelled examples.
A percentage is not a promise. A low one means: check this answer yourself.
Check yourself
Which of these jobs is classification?
A photo app says a picture shows a dog, but it is only 52% sure. How should we treat that answer?
A tomato machine uses one clue only, skin colour. It was taught with red ripe tomatoes and green unripe ones. It is shown a ripe tomato of a kind that stays green. What will it most likely say?
- Guessing how many mm of rain will fall tomorrow. The answer is a number, so this is regression, the job from the last lesson.
- Sorting a new email into Spam or Not spam — correct. Yes. There are set groups, and the machine learned them from emails that people had already labelled.
- Guessing the price of a used bicycle. A price is a number, so this is regression too. Classification picks a group.
- As a guess that needs a second look — correct. Yes. About half sure is not very sure, so the answer is only a hint. Check it before relying on it.
- As a sure fact, because the machine said it. The percentage is there for a reason. At 52% the machine is only just ahead, so it could easily be wrong.
- As useless, so ignore all answers from a machine. A higher percentage is a stronger sign, but even that can be wrong. Look at the number each time and decide how much checking is needed.
- Ripe, because machines can tell what is inside. This machine only uses the one clue it was given, and that clue is colour. It cannot look inside the tomato.
- It will refuse to answer, because this tomato is new to it. A simple machine like this always picks one of its groups. It does not refuse, and it can pick the wrong one.
- Unripe, because its one clue says green means not ready — correct. Yes. Its examples taught it that green goes with unripe tomatoes, so it follows that pattern. Examples must cover the odd cases too.