The game of cards
Imagine cards with drawings of cats and dogs. On each one, someone wrote the correct answer: “cat” or “dog”. This answer is a label. The program is given the drawings and their labels to train it.
During training, the program adjusts numbers in a model. Here, “model” does not mean a miniature replica: it is a calculation tool built from data. It will be used to suggest a category for another image.
The little trap of the blue background
In our imaginary game, all the cat cards have a blue background. All the dog cards have a yellow background. What easy clue could mislead the program? The background colour! In our examples, it goes with the right answer, but it does not describe the animal.
Now let’s try a cat on a yellow background. A model that mainly relies on the background might classify it as a dog. We have not run this experiment here: it is an invented example to understand how a bad shortcut can arise.
To prepare better examples, we vary the backgrounds and the animals. We also check the labels. Adding cards is not enough if they all repeat the same trap.
Training is not the same as passing the test
Other cards are kept aside to evaluate the model. They are not used for this training. The goal is to see how he responds to new examples, not just those he has already met.
If the program passes eight out of ten cards in an imaginary test, it would be 80% on those ten cards. This calculation does not mean that it will succeed 80% of all the images in the world. The result describes this precise test.