Adding a Bias
Look at the chart we just plotted. Our line is not quite the best approximation of the examples, is it? The perfect line would have less slope, and it wouldn’t pass by the origin. Give or take, it would cross the “Pizzas” axis around the value of 10.
So far, we forced the line to pass by the origin to keep our model as simple as we could. It’s time to remove that constraint. To draw a line that is not constrained to pass by the origin, we need one more parameter in our model:
| | ŷ = x * w + b |
You might experience déjà vu here. This equation is the classic linear function which you may have studied in 8th grade. Most people would remember it as y = m * x + b, where m is called the “slope” and b is called the “y-intercept.” Here, we’ll ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access