Interview Guides
Given two integer arrays x and y of equal length, implement batch gradient descent for univariate linear regression. Write a function that runs a fixed number of iterations to learn parameters w and b for the model y_pred = w * x + b, and return the final [w, b] as floats.
1 <= len(x) == len(y) <= 10^4-10^3 <= x[i], y[i] <= 10^30 < learning_rate <= 11 <= iterations <= 10^5