随机森林
维基百科,自由的百科全书
在機器學習中,隨機森林是一個包含多個決策樹的分類器, 並且其輸出的類別是由個別樹輸出的類別的眾數而定。 Leo Breiman和Adele Cutler發展出推論出隨機森林的演算法。 而 "Random Forests" 是他們的商標。 這個術語是1995年由貝爾實驗室的Tin Kam Ho所提出的隨機決策森林(random decision forests)而來的。這個方法則是結合 Breimans 的 "Bootstrap aggregating" 想法和 Ho 的"random subspace method"" 以建造決策樹的集合。
學習演算法 [编辑]
根據下列演算法而建造每棵樹:
- 用 N 來表示訓練例子的個數,M表示變數的數目。
- 我們會被告知一個數 m ,被用來決定當在一個節點上做決定時,會使用到多少個變數。m應小於M
- 從N個訓練案例中以可重複取樣的方式,取樣N次,形成一組訓練集(即bootstrap取樣。)。並使用這棵樹來對剩餘預測其類別,並評估其誤差。
- 對於每一個節點,隨機選擇m個基於此點上的變數。根據這 m 個變數,計算其最佳的分割方式。
- 每棵樹都會完整成長而不會剪枝(Pruning)(這有可能在建完一棵正常樹狀分類器後會被採用)。
優點 [编辑]
隨機森林的優點有:
- 對於很多種資料,它可以產生高準確度的分類器。
- 它可以處理大量的輸入變數。
- 它可以在決定類別時,評估變數的重要性。
- 在建造森林時,它可以在內部對於一般化後的誤差產生不偏差的估計。
- 它包含一個好方法可以估計遺失的資料,並且,如果有很大一部分的資料遺失,仍可以維持準確度。
- 它提供一個實驗方法,可以去偵測 variable interactions 。
- 對於不平衡的分類資料集來說,它可以平衡誤差。
- 它計算各例中的親近度,對於数据挖掘、偵測偏離者(outlier)和將資料視覺化非常有用。
- 使用上述。它可被延伸應用在未標記的資料上,這類資料通常是使用非監督式聚類。也可偵測偏離者和觀看資料。
- 學習過程是很快速的。
外部連結 [编辑]
- Ho, Tin Kam (1995). "Random Decision Forest". Proc. of the 3rd Int'l Conf. on Document Analysis and Recognition, Montreal, Canada, August 14-18, 1995, 278-282 (Preceding Work)
- Ho, Tin Kam (1998). "The Random Subspace Method for Constructing Decision Forests". IEEE Trans. on Pattern Analysis and Machine Intelligence 20 (8), 832-844 (Preceding Work)
- Deng, H; Runger, G; Tuv, Eugene (2011). Bias of importance measures for multi-valued attributes and solutions, Proceedings of the 21st International Conference on Artificial Neural Networks (ICANN2011)
- Amit, Yali and Geman, Donald (1997) "Shape quantization and recognition with randomized trees". Neural Computation 9, 1545-1588. (Preceding work)
- Breiman, Leo "Looking Inside The Black Box". Wald Lecture II (Lecture)
- Breiman, Leo (2001). "Random Forests". Machine Learning 45 (1), 5-32 (Original Article)
- Random Forest classifier description (Site of Leo Breiman)
- Liaw, Andy & Wiener, Matthew "Classification and Regression by randomForest" R News (2002) Vol. 2/3 p. 18 (Discussion of the use of the random forest package for R)
- Ho, Tin Kam (2002). "A Data Complexity Analysis of Comparative Advantages of Decision Forest Constructors". Pattern Analysis and Applications 5, p. 102-112 (Comparison of bagging and random subspace method)