Today you train a real image classifier in Python and look inside its brain. You’ll leave saying: “I trained a neural network in code today.”
Begin โBuild an image classifier in Python and report its held-out accuracy.
Change two hyperparameters and explain what happened and why.
Explain features, labels, and loss — and how data shapes behavior.
A confusion matrix is a report card with detail: rows = the truth, columns = what the model said. The green diagonal is where it got things right. Here’s a real one from a digit classifier — tap a row to compute that digit’s recall (of all the true 8s, how many did it catch?).
| true \ said | 1 | 7 | 8 | 9 | tap โ |
|---|---|---|---|---|---|
| 1 | 42 | 3 | 0 | 0 | recall? |
| 7 | 4 | 39 | 0 | 2 | recall? |
| 8 | 1 | 0 | 38 | 6 | recall? |
| 9 | 0 | 1 | 5 | 40 | recall? |
Which pair of digits gets confused most โ and why might that be (think about their SHAPES)?
In your notebook you’ll change these settings and re-train. First guess what happens, then tap to reveal what usually does — and why.
100 examples made a worse model than 1,347. Now connect it: what happens when a face-recognition system is trained mostly on one demographic? (Hold that thought โ it’s Week 2.)
A model can be wrong and sure of itself, or wrong and hesitant. One of those is far more dangerous in the real world.
Which scares you more in a self-driving car’s vision system?
Earn it: digit classifier trained in code; accuracy from a proper split; two knobs tuned and explained; your numbers written down.