NumPy allowed · plain Python earns 10 bonus points
θ ← θ − 0.14 · ∂L/∂θ
Optimize linear regression weights using batch gradient descent.
Implement batch_gradient_descent_linear(X, y, lr, epochs): start with zero weights, iteratively compute predictions X*w, errors pred - y, and gradient (2/n) * X^T * err, updating weights each epoch.
batch_gradient_descent_linear(X: list[list[float]], y: list[float], lr: float, epochs: int) -> list[float]