Linear regression predicts a continuous target by combining input features with learned weights and an intercept. Ordinary least squares chooses these parameters by minimizing mean squared error. section 7.1.1
Synthetic regression
Generate noisy data from f(x) = −2.5x + 3.2, split it into training and test sets, fit regressors, and compare mean squared and absolute errors.





















