It earns a place when
- Use it for a fast, interpretable baseline when additive effects are plausible and the target is continuous.
- You can evaluate it against a credible baseline.
- Its output fits the decision and data constraints.
Machine learning models · Phase 2 · Lesson 9
Understand linear regression as a weighted additive model and a baseline for continuous targets.
Understand linear regression as a weighted additive model and a baseline for continuous targets.
Each feature contributes a signed amount. The model is a spreadsheet of weights plus an intercept.
The prediction is y_hat = beta_0 + beta_1 x_1 + ... + beta_p x_p. Ordinary least squares chooses coefficients that minimise squared residuals.
Predict rent from floor area, bedrooms and distance to a station. Each coefficient describes an average change while the other included features are held constant in the model.
When a result looks surprisingly good, inspect the split, target timing, error slices and data-generating process before celebrating.
Use this as a small experiment rather than a recipe to copy blindly. Change one thing, record the result and explain the change.
Answer from memory first. The buttons reveal feedback, but the durable step is explaining why.
1. What does a linear coefficient represent?
2. What does ordinary least squares minimise?
3. What can residual curvature suggest?
An Introduction to Statistical Learning. Use the source for the deeper treatment after you can explain the lesson's core idea without looking.