Skip to content
Financial Machine Learning / Foundations: The Learning Problem and Linear Regression

Locally Weighted Regression and a First Look at Bias and Variance

Every lesson so far in this topic has fit one global linear model to the entire dataset. Locally weighted regression (LWR) breaks that assumption: instead of one θ\theta for all xx, it fits a different weighted least-squares problem for every query point, giving the hypothesis class the flexibility to follow curvature a single hyperplane cannot. That flexibility is a double-edged sword — it can fit the training data essentially perfectly while generalising worse than the simpler global model — which gives this topic its first, informal encounter with the bias-variance trade-off that Topic 8 treats formally.

In this lesson

  1. Learning objectives
  2. The locally weighted objective
  3. The bandwidth and the bias-variance trade-off
  4. Worked example: fitting curvature no straight line can capture

Before you start

The full lesson, with worked examples and exercise solutions, is for members.

Read the full lesson

New to SelfMadeQuant.com? See membership options or browse the Financial Machine Learning syllabus.