Rocket and Raven race to sort the photo pile. Rocket uses his rule list. Raven studies example photos.
"My rules are fast and clear!" Rocket says.
"But what do you notice?" Raven asks. "Your rules keep missing the metal ruler."
Nova hovers between them. "Each way has strengths," she hints. "Which fits this job best?"
| Rules | Learning from examples | |
|---|---|---|
| Who does the main work? | A person writes every rule | The computer finds patterns in data |
| What does it need? | A rule for every case | A huge number of examples, usually from people |
| In our lab | Part A: you followed a rule you were given | Part B: you found the pattern yourself |
| In our photo story | Rocket's rules kept breaking on tricky photos | The crew will try this next week |
Rules are clear. You can read each rule and see why the computer chose.
Learning from examples finds patterns in data. It needs a huge number of examples.
Those examples are usually given by people.
If a job has too many cases to write rules for, examples may fit better.
Programmers compare both ways and pick the one that fits the job.
To compare two ways, test them on the same job.
Count how many each one gets right.
Then think about what each one needs.
| Way | Photos tested | Sorted right |
|---|---|---|
| Rocket's rules | 10 | 7 |
| Raven's examples | 10 | 9 |
These are made-up practice numbers for our story.
| Statement | True or false? |
|---|---|
| Rules are easy to read. | ? |
| Learning from examples needs only one example. | ? |
| Examples are usually given by people. | ? |
| A fair comparison tests both ways on the same job. | ? |
You compared like a real programmer! Tomorrow we review and look ahead to training data.