A step size that is too big makes gradient descent leap past the bottom, and the error grows instead of shrinking. You want to watch that happen.
Write error_after_each_step(xs, ys, rate, steps). It fits the line with the same loop as the lesson:
w = 0 and b = 0.w * x + b - y, then grad_w (the mean of 2 * x * error) and grad_b (the mean of 2 * error) from those same errors, then update w = w - rate * grad_w and b = b - rate * grad_b.After each step, measure the mean squared error of the new line: the mean of (w * x + b - y) ** 2.
Return a list with one number per step, in order, each rounded to 3 decimal places. Its length is steps. The starting error (before any step) is not included.