How can a model improve without measuring every training example at once? Stochastic gradient descent answers by updating the model with one point per iteration, nudging its parameters to reduce that point’s error. It contrasts with mini-batch gradient descent, which uses several points, and batch gradient descent, which uses the entire dataset. section 3.4
The basic pattern is:
- Start with a model, such as a line or a perceptron separator. section 3.4 section 5.3
- Choose one training point and inspect how well the current model fits or classifies it. section 3.4 section 5.3
- Move the model slightly in the direction that improves its fit, repeating the process many times. section 3.4 section 5.3
A line that learns from individual points
Imagine a line separating cats from dogs. A correctly classified point leaves the line where it is; a misclassified point moves the line slightly toward that point. Repeating this with randomly selected points can produce a separator that classifies most examples correctly. For regression, the same point-by-point idea moves a line toward individual data points while reducing error. section 5.3 section 3.4
Figure 5.23 If we apply the perceptron trick many times, each time picking a random point, we can imagine that we’ll obtain a classifier that classifies most points correctly.
Visualizes repeated point-by-point updates and the gradual improvement of a classifier. section 5.3











