What Exactly a Bias Term is?

栏目: IT技术 · 发布时间: 5年前

内容简介:What Exactly a Bias Term is?Hey folksIn this post, I’ll talk about the Intuition behind the bias term in linear regression.

What Exactly a Bias Term is?

Hey folks

Photo by Drew Hays on Unsplash

In this post, I’ll talk about the Intuition behind the bias term in linear regression.

As you already know a linear regression is all about finding the best line which fits our data, and those who don’t know about it don’t worry, let’s take it another way.

You probably learned about the equation of a line in your High school i.e y=m*x+c

So here c is a constant term while in Machine Learning it’s called the Bias Term.

Alright, let’s take an example to make it intuitive but please don’t get irritated as I’ll going to take the most common examples in the history of Machine Learning and that is Housing Price Prediction.

So for simplicity let’s only consider 2 features.

Let’s consider our hypothesis function or the prediction function for this problem.

H(theta)= theta0+ x1*theta1+ x2*theta2

Where x1 and x2 are the features, while theta0, theta1, and theta2 are the weights or the learnable parameters. So here theta0 is a bias term, but exactly what it conveys?

So before moving forward just look at the small example. Suppose you have a list of heights of your batchmates and you have a missing value so what you will be going to do. So the most common approach is to fill that missing height value with the average of other heights. Okay then, let’s keep this example in your mind.

Here comes the intuitive part.

Photo by Chris Geirman on Unsplash

Just think about this way, consider a scenario when you don’t any information about the house like you know nothing about it, so in that case, what will you do? (Hint: Remember the missing height example)

You’ll consider the price as the average of all house prices for that house.

Mathematically put x1 and x2 as 0 and it gives us the price value as theta0.

So by the above result theta0 should be the average of all the house prices, that’s the significance of Bias term, as it gives the average of output when we don’t have prior knowledge of inputs.

You can prove it mathematically also.

Consider the equation of a line for a single variable i.e y=m*x+c

So my hypothesis is c= average(y)

Let’s calculate the average of y for -a to a (where, i!=0)

Let’s expand this above equation.

So it’s mathematically proven that the constant term is nothing but the average of the other output terms.

I hope now the bias term makes sense to you and it’s not only useful in Linear Regression, but it’s also a part of deep learning and other fields of engineering like Instrumentation and Control. As in the PID controller, there’s also a Bias term and that’s what its significance is.


以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

疯狂的独角兽

疯狂的独角兽

丹·莱昂斯 / 王天任 / 海南出版社 / 2017-10 / 42

★商业与文学的有机结合,真实与虚幻间嬉笑怒骂,幽默风趣、引人入胜、发人深省的商业小说。 ★《纽约时报》《华尔街日报》《旧金山纪事报》Amazon畅销书,《财富》《纽约邮报》《新闻周刊》《华盛顿邮报》、畅销书《硅谷钢铁侠》作者阿什利·万斯、畅销书《一网打尽》作者布拉德·斯通联袂推荐。 ★作者丹·莱昂斯集小说家、记者、编剧为一身——HBO经典热门剧、豆瓣高分美剧《硅谷》作者;畅销书《乔布斯......一起来看看 《疯狂的独角兽》 这本书的介绍吧!

Markdown 在线编辑器
Markdown 在线编辑器

Markdown 在线编辑器

RGB HSV 转换
RGB HSV 转换

RGB HSV 互转工具

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具