LMLearning Monitor

Linear Regression from Scratch

Finding the best line

10 min · beginner

A linear model predicts with y = wx + b. w is the slope and b is the starting point.

When the slope grows, the output rises faster as the input increases. Training means finding the slope and intercept that sit closest to the data.

Candidate slopeError
As the slope approaches the target value, the error falls.
In y = 3x + 2, what is the slope?