Learning with a teacher
How a machine learns from labelled examples.
How did you learn?
When you were small, how did you learn which foods are sweets?
What this lesson covers
The idea
A machine can learn from examples that a person has already labelled, and then give a label to something new.
How did you learn?
When you were small, how did you learn which foods are sweets?
- Someone showed me examples and told me their names
- I worked it out alone, with nobody telling me
- I was born knowing
You are the teacher
At first the machine has seen no examples. You will teach it to tell sweet from savoury. Tap the right label for each food, then watch the table fill up.
Labels are the teacher
Every food you labelled was an example with its answer. The machine counted which clues came with which label. For a new food, it picked the label that fitted the clues best.
It got chaat wrong. It had no example of a savoury food with sugar in it, so one clue misled it. A machine can only use the examples it was given.
Learning with a teacher means a machine learns from examples that a person has already labelled.
Scientists call this supervised learning.
Notes
Learning with a teacher: a machine learns from examples that a person has already labelled.
Good labels and varied examples make a better learner. Wrong labels teach wrong things.
Check yourself
A phone app will learn to sort photos into cats and dogs. What must it be given first?
A cat-and-dog app was taught only with daytime photos. It fails on a night photo. What helps most?
By mistake, a teacher labels a samosa as sweet. What will a machine do with that label?
- Photos that a person has labelled cat or dog — correct. Yes. The labels are the teacher. Without them the machine has no answers to learn from.
- Photos with no labels, left for it to sort alone. With no labels there is no teacher. That is a different kind of learning, which comes in the next lesson.
- A list of the names of all the cats and dogs in India. Names do not help. The machine needs pictures, each with the right label.
- Give it more labelled daytime photos of the same kind. More photos of the same kind teach nothing new. The gap is night, not the number of daytime photos.
- Add labelled night photos to its examples — correct. Yes. A machine can only use the examples it was given. Labelled night photos show it what a cat or dog looks like in the dark.
- Ask the phone to try harder on night photos. A machine cannot try harder. It can only use the examples it was given, so it needs new ones.
- Spot the mistake and quietly correct the label. A machine cannot tell that the label is wrong. It has no other way to check.
- Count it like any other label and learn from it — correct. Yes. The machine counts every label and cannot tell a wrong one. Wrong labels teach wrong things, so people must check them.
- Stop learning and refuse any later examples. It keeps learning. That is the problem: it learns the mistake too.