Regression & the Supervised Setup

Linear regression derived, implemented and diagnosed — the template every supervised model follows.

Module 03.1 · Beginner
Free

10h · 8 lessons · 1 challenge

Before this: Calculus & Optimization, NumPy & Vectorization

About this module

Linear regression is the smallest complete example of supervised learning: a hypothesis, a loss, a gradient, an update, a diagnosis. Learn it properly and every model after it is a variation on parts you already know.

You derive the normal equation, implement gradient descent against it, and then spend as much time on residual analysis as on fitting -- because reading a model is the part interviews probe.

After this module you can

8 lessons

Lesson 1
The supervised setup: hypothesis, loss, update
Kind
Concept
Length
45 min
Lesson 2
Least squares, derived two ways
Kind
Concept
Length
55 min
Lesson 3
Gradient descent on a real dataset
Kind
Lab
Length
70 min
Lesson 4
Residuals, diagnostics and what they reveal
Kind
Concept
Length
50 min
Lesson 5
Bias, variance and the decomposition
Kind
Concept
Length
50 min
Lesson 6
Fit Forensics: read the residual plot
Kind
Interactive
Length
30 min
Lesson 7
Polynomial features and the first overfit
Kind
Lab
Length
60 min
Lesson 8
Checkpoint: diagnose the model
Kind
Checkpoint
Length
25 min

The challenge: Fit Forensics

A residual plot appears; name the defect — heteroscedasticity, missing interaction, outlier leverage, wrong link. Twelve rounds, increasing subtlety.

Worth 350 XP.

Related modules

All modules