Gradient descent.
Gradient descent finds the best line by starting somewhere and taking small steps downhill on the error. The data are twelve students’ study hours and exam scores. Every point on the error map is one possible line.
From Chapter 3: Gradient Descent and Chapter 18: Optimizers, which explain these figures step by step.
Figure
Gradient descent, seen two ways
- Current line / position
- Best line
- Equal error
- Step
- 0
- Slope w
- 0.00
- Bias b
- 50.0
- Error
- 466.8
Each step looks at
Before the first step you can drag the orange dot on the map to start somewhere else.
Figure
Three learning rates
- Your learning rate
- Small (0.005)
- Well chosen (0.08)
- Your η
- 0.050
- Error after 40 steps
- 6.2
- Verdict
- Reaches the bottom
- Breaks above
- 0.164
Figure
Four ways down the same valley
- Plain SGD (rate 0.1)
- Momentum (rate 0.1, momentum 0.9)
- RMSProp (rate 0.3)
- Adam (rate 0.5)
- Plain SGD
- height 13.050
- Momentum
- height 13.050
- RMSProp
- height 13.050
- Adam
- height 13.050
Step 0 of 100
Learn the ideas behind it
- Chapter 3Gradient Descent
If there were no formula for the best line, how could a computer still find it?
- Chapter 18Optimizers
Backpropagation gives exact gradients. Why was training still so slow?