Stacking 就像是 Bagging的升級版,Bagging中的融合各個基礎分類器是相同權重,而Stacking中則不同,Stacking中第二層學習的過程就是為了尋找合適的權重或者合適的組合方式。
值得注意的是,在Stacking的架構下,有一些經常出現的說法如Stacking, Blending , Stacked Generalization 很多文章也沒有明確說明他們之間的關係。
如果不嚴格來區分的話,可以認為堆疊(Stacking),混合(Blending)和層疊泛化(Stacked Generalization)其實是同一種算法的不同名字罷了。在傳統的集成學習中,我們有多個分類器試圖適應訓練集來近似目標函數。 由於每個分類器都有自己的輸出,我們需要找到一個組合結果的組合機制,可以通過投票(大多數勝利),加權投票(一些分類器具有比其他權力更多的權威),平均結果等。
在堆疊中,組合機制是分類器(0級分類器)的輸出將被用作另一個分類器(1級分類器)的訓練數據,以近似相同的目標函數。基本上,讓1級分類器找出合併機制。
Stacking, Blending and and Stacked Generalization are all the same thing with different names. It is a kind of ensemble learning. In traditional ensemble learning, we have multiple classifiers trying to fit to a training set to approximate the target function. Since each classifier will have its own output, we will need to find a combining mechanism to combine the results. This can be through voting (majority wins), weighted voting (some classifier has more authority than the others), averaging the results, etc.
關於Stacking與Blending更多的細節可以參考 KAGGLE ENSEMBLING GUIDE,中文 kaggle比賽集成指南@qjgods(http://blog.csdn.net/a358463121/article/details/53054686)
另眼觀世界
最後我們也可以按照林軒田老師課程中的講述來對機器學習集成算法做一個歸納。集成模型主要分為兩條主線,一條Blending 線,一條 Learning線。Blending 假設我們已經得到了各個基礎分類器 ,learning 主要指我們面對的是一堆數據,需要一邊獲得基礎分類器 ,同時一邊學習融合它們的方法。