NumPy allowed · plain Python earns 10 bonus points
θ ← θ − 0.14 · ∂L/∂θ
Execute an explicit analytical gradient descent parameter update on weights and intercept for linear regression with Mean Squared Error loss.
Implement linear_regression_gd_step(X, y, weights, bias, lr): compute predictions y_hat_i = w^T x_i + b, gradients grad_w = (1/N) X^T (y_hat - y) and grad_b = (1/N) sum(y_hat - y). Return [*new_w, new_b] where param_new = param - lr * grad.
linear_regression_gd_step(X: list[list[float]], y: list[float], weights: list[float], bias: float, lr: float) -> list[float]