Linear regression
Draw the best straight line through data, and pin down exactly what “best” means — squared residuals, a loss surface shaped like a bowl, and the probability model hiding underneath.
35 min
After this lesson you can
- Write the linear model and absorb the bias into the weights with a column of ones
- Explain three separate reasons for squaring the residuals, including the Gaussian-noise likelihood argument
- Show that the squared-error loss is a convex bowl over the parameters, and read its contour plot
- Say precisely what the “linear” in linear regression refers to
In this lesson
- Two mathematicians and a priority dispute
- The problem, stated precisely
- Residuals, and why we square them
- Where the square comes from: Gaussian noise
- The loss surface is a bowl
- “Linear” means linear in the parameters
- In code
This lesson is part of Descent Pro
Descent Pro unlocks every lesson on the route, from base camp to the summit. Every plan starts with a free trial.