A stochastic step uses one chosen sample gradient instead of the full average.
Choose one sample first
A stochastic step uses one selected row. Here the selected row is sample s2, chosen before the update.
chosen sample=s2
Its gradient
For sample s2, the residual is -1, so the sample gradient is (-1, -1).
gs2=(−1,−1)
The stochastic update
With eta=1/2, the sample update changes (a,b) to (1/2, 3/2).
(a,b)sample=(1/2,3/2)