Search⌘ K
AI Features

Add a Bias

Explore how adding a bias parameter to a linear regression model improves its ability to predict data more accurately. Understand the role of bias alongside weights in supervised learning and how this affects training and prediction in machine learning systems.

We'll cover the following...

Look at the chart we just plotted. Is our line not quite the best approximation of the examples? The perfect line would have less slope and not pass by the origin. Give or take, it would cross the Pizzas axis around the value of 10.

The bias factor

So far, we forced the line to pass by the origin to keep our model as simple as possible. 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:

y^=xw+b\large{\hat{y} = x * w + b}

This equation is the classic ...