Two layers, one yes-or-no guess
This network learns a yes-or-no answer from two clues. The clues are a revision score and a practice score for Mei, Ali, Sam, and Noor. Pass and fail are the two classes. A problem with two classes is called binary classification.
Scores start in the input layer and travel along connections to one output. The weight on a connection says how strongly that clue counts. The output also has a bias, one number added at the output. A forward pass turns the clues into a guess between 0 and 1. Near 1 means pass. Near 0 means fail.
The error is the gap between a guess and the correct class. The curve shows the average gap for the four students. The network reduces that error by changing the weights, one step at a time.
| Student | Revision | Practice | Class |
|---|---|---|---|
| Mei | 0.10 | 0.20 | fail |
| Ali | 0.20 | 0.30 | fail |
| Sam | 0.80 | 0.90 | pass |
| Noor | 0.90 | 0.80 | pass |
A score near 0 is low. A score near 1 is high. These four rows are used in every step.
Run the simulation
Look at the row of guesses, then at the curve on the side. The curve moves when the weights change.
Three moves, in order
Forward, then back, then a change to the weights.
Forward pass
Clues move from the input layer to the output. The output makes a guess between 0 and 1.
Backpropagation
The error travels back along each connection. Every weight learns whether it should go up or down.
Gradient descent
Each update is one step that reduces the average error. The curve on the side is those steps.