The SGD comparison starts with one tiny rational linear-regression dataset and a fixed starting line.
Tiny linear model
The model is y_hat = a + b x. The start is a=0 and b=1, before either update is applied.
y^=a+bx,a=0,b=1
The three data rows
The displayed points are (0, 1), (1, 2), and (2, 2). Every prediction and residual in the table is recomputed from those rows.
(x,y)∈{(0,1),(1,2),(2,2)}
Residuals at the start
At the start, the residuals are -1, -1, and 0. The residual convention is prediction minus y.
r=(y^−y)=(−1,−1,0)