【集成學(xué)習(xí)方法通俗入門】《Basics of Ensemble Learning Explained in Simple English》by Tavish Srivastava

Basics of Ensemble Learning Explained in Simple English

Introduction

Ensemble modeling is a powerful way to improve performance of your model. It usually pays off to apply ensemble learning over and above various models you might be building. Time and again, people have used ensemble models in competitions like Kaggle and benefited from it.

Ensemble learning is a broad topic and is only confined by your own imagination. For the purpose of this article, I will cover the basic concepts and ideas of ensemble modeling. This should be enough for you to start building ensembles at your own end. As usual, we have tried to keep things as simple as possible.

Let’s quickly start with an example to understand the basics of Ensemble learning. This example will bring out, how we use ensemble model every day without realizing that we are using ensemble modeling.

Example:I want to invest in a company XYZ. I am not sure about its performance though. So, I look for?advice on whether the stock price will increase more than 6% per annum or not? I decide to approach various?experts having?diverse?domain experience:

1.Employee of Company XYZ: This person knows the internal functionality of the company and have the insider information about the functionality of the firm. But he lacks a broader perspective on how are competitors innovating, how is the technology evolving and what will be the impact of this evolution on Company XYZ’s product.In the past, he has been?right 70% times.

2.Financial Advisor of Company XYZ:This person has a broader perspective on how companies strategy will fair of in this competitive environment. However, he lacks a view?on how the company’s internal policies are fairing off.In the past, he has been?right 75% times.

3.Stock Market Trader:This person has observed the company’s stock price over past 3 years. He knows the seasonality trends and how the overall market is performing. He also has developed a strong intuition on how stocks might vary over time.In the past, he has been?right 70% times.

4.Employee of a competitor:This person knows the internal functionality of the competitor firms and is aware of certain changes which are yet to be brought. He lacks a sight of company in focus and the external factors which can relate the growth of competitor with the company of subject.In the past, he has been right ?60% of times.

5.Market Research team in same segment:This team analyzes the customer preference of company XYZ’s product over others and how is this changing with time. Because he deals with customer side, he is unaware of the changes company XYZ will bring because of alignment to its own goals.In the past, they have been right 75% of times.

6.Social Media Expert:This person can help us understand how has company XYZ has positioned its products in the market. And how are the sentiment of customers changing over time towards?company. He is unaware of any kind of details beyond digital marketing.In the past, he has been right 65% of times.

Given the broad spectrum of access we have, we can probably combine all the information and make an informed decision.

In a scenario when all the 6 experts/teams verify that?it’s a good decision(assuming all the predictions are independent of each other), we will get a combined accuracy rate of

1 - 30%*25%*30%*40%*25%*35%

= 1 - 0.07875 =99.92125%

Assumption:The assumption used here that all the predictions are completely independent is slightly extreme as they are expected?to be correlated. However, we see how we can be so sure by combining various predictions together.

Let us now change the scenario slightly. This time we?have 6 experts, all of them are employee of company XYZ working in the same division. Everyone has a propensity of 70% to advocate correctly.

What if we combine all these advice together, can we still raise up our confidence to >99% ?

Obviously not, as all the predictions are based on very similar set of information. They are certain to be influenced by similar set of information and the only variation in their?advice would be?due to their personal opinions &?collected facts?about the firm.

Halt & Think: What did you learn from this example? Was it?abstruse ??Mention your arguments in the comment box.

What is Ensemble Learning?

Ensemble is the art of combining diverse set of learners (individual models) together to improvise on the stability and predictive power of the model. In the above example, the way we combine all the predictions together will be termed as Ensemble Learning.

In this article, we will talk about a few ensemble techniques widely used in the industry. Before we get into techniques, let’s first understand how do we actually get different set of learners. Models can be different from each other for a variety of reasons, starting from the population they are built upon to the modeling used for building the model.

Here are the top 4 reasons for?a model to be different. They can be different because of a mix of these factors as well:

1. Difference in population

2. Difference in hypothesis

3. Difference in modeling technique

4. Difference in initial seed

Error in Ensemble Learning (Variance vs. Bias)

The error emerging from?any model can be broken down into three components mathematically. Following are these component :

Why is this important in the current context? To understand what really goes behind an ensemble model, we need to first understand what causes error in the model. We will briefly introduce you to these errors and give an insight to each ensemble learner in this regards.

Bias erroris useful to quantify how much on an average are the predicted values different from the actual value. A high bias error means we have a under-performing model which keeps on missing important trends.

Varianceon the other side quantifies how are the prediction made on same observation different from each other. A high variance model will over-fit on your training population and perform badly on any observation beyond training. Following diagram will give you more clarity (Assume that red spot is the real value and blue dots are predictions) :

Credit : Scott Fortman

Normally, as you increase the complexity of your model, you will see a reduction in error due to lower bias in the model. However, this only happens till a particular point. As you continue to make your model more complex, you end up over-fitting your model and hence your model will start suffering from high variance.

A champion model should maintain a balance between these two types of errors. This is known as thetrade-off managementof bias-variance errors.?Ensemble learning is one way to execute this trade off analysis.

Credit : Scott Fortman

Some Commonly used Ensemble learning techniques

1.Bagging: Bagging tries to implement similar learners on small sample populations and then takes a mean of all the predictions. In generalized bagging, you can use different learners on different population. ?As you can expect this helps us to reduce the variance error.

2.Boosting: Boosting is an iterative technique which adjust the weight of an observation based on the last classification. If an observation was classified incorrectly, it tries to increase the weight of this observation and vice versa. Boosting in general decreases the bias error and builds strong predictive models. However, they may sometimes over fit on the training data.

3.Stacking: This is a very interesting way of combining models. Here we use a learner to combine output from different learners. This can lead to decrease in either bias or variance error depending on the combining learner we use.

End Notes

Ensemble techniques are being?used in everyKaggle Problem. Choosing the right ensembles is more of an art than straight forward science. With experience, you will develop?a knack of which ensemble learner to use in different kinds of scenario and base learners.

Did you enjoy reading this article? Have you built an Ensemble learner before? How did you go about choosing the right ensemble technique?

If you like what you just read & want to continue your analytics learning,subscribe to our emails,follow us on twitteror like ourfacebook?page.

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末愕够,一起剝皮案震驚了整個濱河市赂蕴,隨后出現(xiàn)的幾起案子,更是在濱河造成了極大的恐慌翰舌,老刑警劉巖盅安,帶你破解...
    沈念sama閱讀 217,657評論 6 505
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件唤锉,死亡現(xiàn)場離奇詭異,居然都是意外死亡别瞭,警方通過查閱死者的電腦和手機(jī)窿祥,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 92,889評論 3 394
  • 文/潘曉璐 我一進(jìn)店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來畜隶,“玉大人壁肋,你說我怎么就攤上這事号胚∽崖” “怎么了?”我有些...
    開封第一講書人閱讀 164,057評論 0 354
  • 文/不壞的土叔 我叫張陵猫胁,是天一觀的道長箱亿。 經(jīng)常有香客問我,道長弃秆,這世上最難降的妖魔是什么届惋? 我笑而不...
    開封第一講書人閱讀 58,509評論 1 293
  • 正文 為了忘掉前任,我火速辦了婚禮菠赚,結(jié)果婚禮上脑豹,老公的妹妹穿的比我還像新娘。我一直安慰自己衡查,他們只是感情好瘩欺,可當(dāng)我...
    茶點故事閱讀 67,562評論 6 392
  • 文/花漫 我一把揭開白布。 她就那樣靜靜地躺著,像睡著了一般俱饿。 火紅的嫁衣襯著肌膚如雪歌粥。 梳的紋絲不亂的頭發(fā)上,一...
    開封第一講書人閱讀 51,443評論 1 302
  • 那天拍埠,我揣著相機(jī)與錄音失驶,去河邊找鬼。 笑死枣购,一個胖子當(dāng)著我的面吹牛嬉探,可吹牛的內(nèi)容都是我干的。 我是一名探鬼主播棉圈,決...
    沈念sama閱讀 40,251評論 3 418
  • 文/蒼蘭香墨 我猛地睜開眼甲馋,長吁一口氣:“原來是場噩夢啊……” “哼!你這毒婦竟也來了迄损?” 一聲冷哼從身側(cè)響起定躏,我...
    開封第一講書人閱讀 39,129評論 0 276
  • 序言:老撾萬榮一對情侶失蹤,失蹤者是張志新(化名)和其女友劉穎芹敌,沒想到半個月后痊远,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體,經(jīng)...
    沈念sama閱讀 45,561評論 1 314
  • 正文 獨居荒郊野嶺守林人離奇死亡氏捞,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點故事閱讀 37,779評論 3 335
  • 正文 我和宋清朗相戀三年碧聪,在試婚紗的時候發(fā)現(xiàn)自己被綠了。 大學(xué)時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片液茎。...
    茶點故事閱讀 39,902評論 1 348
  • 序言:一個原本活蹦亂跳的男人離奇死亡逞姿,死狀恐怖,靈堂內(nèi)的尸體忽然破棺而出捆等,到底是詐尸還是另有隱情滞造,我是刑警寧澤,帶...
    沈念sama閱讀 35,621評論 5 345
  • 正文 年R本政府宣布栋烤,位于F島的核電站谒养,受9級特大地震影響,放射性物質(zhì)發(fā)生泄漏明郭。R本人自食惡果不足惜买窟,卻給世界環(huán)境...
    茶點故事閱讀 41,220評論 3 328
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望薯定。 院中可真熱鬧始绍,春花似錦、人聲如沸话侄。這莊子的主人今日做“春日...
    開封第一講書人閱讀 31,838評論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽。三九已至径簿,卻和暖如春罢屈,著一層夾襖步出監(jiān)牢的瞬間,已是汗流浹背篇亭。 一陣腳步聲響...
    開封第一講書人閱讀 32,971評論 1 269
  • 我被黑心中介騙來泰國打工缠捌, 沒想到剛下飛機(jī)就差點兒被人妖公主榨干…… 1. 我叫王不留,地道東北人译蒂。 一個月前我還...
    沈念sama閱讀 48,025評論 2 370
  • 正文 我出身青樓曼月,卻偏偏與公主長得像,于是被迫代替她去往敵國和親柔昼。 傳聞我的和親對象是個殘疾皇子哑芹,可洞房花燭夜當(dāng)晚...
    茶點故事閱讀 44,843評論 2 354

推薦閱讀更多精彩內(nèi)容

  • 檢視閱讀五步法》》簡記,包拯細(xì)判粗◆看包裝捕透,1分鐘完成》》書名》》》》主副標(biāo)題》》建議上架類》》作者》》可參考豆瓣...
    沉思的熊貓閱讀 463評論 0 49
  • 1.感恩室友請我們吃火鍋聪姿,在冬日里胃暖暖的,謝謝乙嘀,謝謝末购,謝謝。 2.感恩昨晚的夢虎谢,時刻提醒著我你也是個小女人盟榴,遠(yuǎn)沒...
    諾諾521閱讀 169評論 0 0