Following rules vs learning from examples
The two ways to make computers smart, why some tasks need learning, and what a model is.
Two ways to make a computer smart: give it rules, or let it learn from examples.
Two ways to make computers smart
One way is to write rules. A person writes every step, like, add these numbers, or, if it's seven o'clock, ring the alarm. That's how a calculator works. The other way is learning. Instead of rules, you give the computer lots of examples, and it finds the patterns by itself. That's machine learning. Here's why learning matters. Try writing rules for spotting a cat in a photo. Four legs? So do dogs. Pointy ears? Not in every photo. It's almost impossible to write rules for everything. But show a computer thousands of cat photos, and it can learn.
Learning from examples
First, examples. Thousands of photos, each labelled cat or not cat. Second, training. The computer looks for patterns that separate cats from everything else. What it learns is called a model. And then the model can make predictions about new photos it has never seen.
New word: Model
A model is what a computer has learned from examples. For example, a model trained on photos of mangoes could look at a new photo and say whether the mango is ripe.
Quick check
Quick check. Which task suits learning from examples better than writing rules? Recognising handwriting. Everyone writes differently, so it's much easier to learn from examples. Options: Recognising different people's handwriting; Adding two numbers; Turning on a light at 7pm; Counting to ten.
Recap
With rules, people write every step. With learning, the computer finds patterns in examples. Messy tasks, like recognising faces, need learning. And a model is what's learned, used to make predictions.
Key points
- Computers can follow rules that people write, or learn patterns from examples (machine learning).
- Rules work for clear tasks like adding numbers. Learning works for messy tasks like recognising faces, voices or handwriting.
- Learning has four parts: examples, training, a model, and predictions.
- A model is what the computer learned, used to make predictions about new things.
Try it: Rules or learning?
Which approach fits each task best?