Show how an oversized step overshoots
Check signs and decimal points before moving to the next value. · 169 words
A bookstore predicts weekly book sales from the number of shelf displays. Let x be the number of displays, y the actual sales, and f(w)=w*x the prediction. For one training example, x=1 and y=3, so the ideal value of w is 3. We minimize squared error, L(w)=(w*x-y)^2. A parameter is a value adjusted during training; here, w is that parameter. The gradient is the slope of L: dL/dw=2(w*x-y)*x. At w=1, the gradient is 2(1-3)*1=-4. A negative gradient means increasing w lowers the loss.
The learning rate, written eta, is the size of each update. It is chosen by the designer rather than learned from the gradient. Gradient descent uses w_new=w-eta*gradient. With a modest eta=0.25, the update is 1-0.25*(-4)=2, so the model moves toward the best value, 3. With an oversized eta=1.5, the update is 1-1.5*(-4)=7. The step crosses over the optimum w=3 and lands on its far side. This is an overshoot. The loss confirms it: L(1)=4, but L(7)=16. Oversized steps can repeatedly cross the minimum instead of settling.
Check your recall
Starting at w=1 with x=1 and y=3, what happens if the learning rate is 1.5?
Check your answer
The gradient is -4, so the new value is w=1-1.5*(-4)=7. This crosses the optimum w=3, and the squared loss rises from 4 to 16.
Sources and credits
Original KeyTouch lesson. Background reading · Google · Linear regression.