Scikit-Learn

XGBoost 與 Python Sklearn 梯度提升樹

  • May 30, 2017

我試圖了解 XGBoost 的工作原理。我已經了解梯度提升樹如何在 Python sklearn 上工作。我不清楚 XGBoost 是否以相同的方式工作,但速度更快,或者它與 python 實現之間是否存在根本差異。

當我讀到這篇論文

http://learningsys.org/papers/LearningSys_2015_paper_32.pdf

在我看來,XGboost 的最終結果與 Python 實現中的相同,但主要區別在於 XGboost 如何在每個回歸樹中找到最佳分割。

基本上,XGBoost 給出了相同的結果,但速度更快。

這是正確的,還是我還缺少其他東西?

你是對的,XGBoost(‘eXtreme Gradient Boosting’)和 sklearn 的 GradientBoost 本質上是一樣的,因為它們都是梯度提升的實現。

但是,在實際意義上,引擎蓋下存在非常顯著的差異。XGBoost 比 sklearn 快得多(參見http://machinelearningmastery.com/gentle-introduction-xgboost-applied-machine-learning/)。XGBoost 非常節省內存並且可以並行化(我認為 sklearn 默認不能這樣做,我不完全了解 sklearn 的內存效率,但我非常有信心它低於 XGBoost)。

兩者都使用後,XGBoost 的速度相當可觀,其性能優於 sklearn 的 GradientBoosting。

引用自:https://stats.stackexchange.com/questions/282459

comments powered by Disqus