Why do we include an extra columns feature['bias']

Hello Guys,

I was wondering if somebody could explain something to me.
I am working on the deep learning fundamentals course of the data science path.

In most of the assignments, we create a dataset using the sklearn library by using for example.
make_regression(), Make_moons(), etc.

Example code:

data = make_moons(100, random_state=3, noise=0.04)
features = pd.DataFrame(data[0])
labels = pd.Series(data[1])
features[“bias”] = 1

However, we always create an additional column called ‘bias’. Is the reason for this because the features created by classes would otherwise explain all the variation in target column? Or is there another reason?

Thank you in advance.

Hi @RaphalSchols

If you are still searching for an answer to this, can you please attach a screen link/ mission page.

Usually, DQ content will have it explained on the previous content page or even previous missions. But still, maybe a screen link can help us identify a better explanation for this.