# Teach the machine

> Add examples to two trays, train a small real classifier and watch its boundary; a held-out set shows what a training success does not guarantee.

Canonical: https://shapeofintelligence.com/how/learning/ · The instrument of chapter IV (https://shapeofintelligence.com/read/the-examples/). A small real classifier trained here in the browser; not the capacity or architecture of every system in this chapter.

## The presets

- **Two blobs**: Two clusters, one per tray. A straight wire separates them. 80 training examples, 40 held out.
- **Four quadrants**: Opposite corners share a tray. No straight wire can separate them. 80 training examples, 40 held out.
- **A ring**: One tray inside, the other around it. The wire has to bend. 80 training examples, 40 held out.

## Recorded states (seed 1)

| Preset | Model | Steps | Training accuracy | Held-out accuracy |
|---|---|---|---|---|
| blobs | A (logistic regression) | 50 | 100 % | 88 % |
| blobs | B (2-8-8-1 network) | 100 | 100 % | 90 % |
| quadrants | A (logistic regression) | 100 | 50 % | 50 % |
| quadrants | B (2-8-8-1 network) | 400 | 100 % | 83 % |
| ring | A (logistic regression) | 200 | 36 % | 45 % |
| ring | B (2-8-8-1 network) | 300 | 100 % | 95 % |

Learned: the weights. Fixed: the features, the model's shape and the objective. A model that fits its examples has been fitted, not proved right.
