Observe the red higlighted in red.
The '1' is not the bias itself, but it's a clever trick—often called data augmentation or adding a bias feature—that allows the bias term to be handled neatly for computational convenience.
Here’s the breakdown:
The goal is to estimate the fish's weight () using its features (like length and girth ). A simple linear model for this looks like:
This equation involves a vector multiplication and a separate addition, which can be a bit clumsy.
To simplify the computation, we can combine the bias term into the main weight vector.
Augment the Feature Vector (): We add a '1' to the beginning of every feature vector.
Augment the Weight Vector (): We add the bias term to the beginning of our weight vector.
Now, let's see what happens when we compute the dot product of these new, augmented vectors:
This gives us our original equation, , but now it's expressed as a single, clean dot product operation.
Excellent question. The two terms sound similar but refer to very different concepts in machine learning.
The bias term is a part of your model, while actual bias (or statistical bias) is a way to describe how your model is wrong.
The bias term ( or ) is a learnable parameter in models like linear and logistic regression. It's simply the intercept of the model.
Its job is to allow the model to fit the data better. Without a bias term, a linear regression model would always have to pass through the origin (0,0), which is a huge and often incorrect limitation. The bias term allows the line or plane to be shifted up or down to find the best fit for the data.
💡 Think of it like this: Imagine you're trying to draw a line through a cluster of data points. The weights determine the slope of the line, while the bias term determines where the line crosses the y-axis. You need both to position the line correctly.
Actual bias, often just called "bias" in the context of the bias-variance tradeoff, is a type of prediction error. It represents the difference between your model's average prediction and the correct value you are trying to predict.
High bias means your model is making overly simple assumptions about the data. This causes the model to underfit—it fails to capture the underlying patterns. For example, trying to model a complex, curvy relationship with a simple straight line will result in high bias. The model is "biased" towards being a straight line and therefore can't capture the true shape of the data.
Bias Term | Actual Bias (Statistical Bias) |
---|---|
What it is: A parameter in the model (the intercept). | What it is: A type of prediction error. |
Purpose: To give the model more flexibility. | Meaning: It indicates the model is too simple (underfitting). |
How you get it: The model learns it during training. | How you get it: It arises from incorrect model assumptions. |
Is it bad? No, it's a necessary and helpful part of the model. | Is it bad? Yes, high bias is a sign of a poor model fit. |
© 2025 James Yap
Personal Website and Knowledge Base