Solved – XGBoost vs Python Sklearn gradient boosted trees

boostingscikit learn

I am trying to understand how XGBoost works. I already understand how gradient boosted trees work on Python sklearn. What is not clear to me is if XGBoost works the same way, but faster, or if there are fundamental differences between it and the python implementation.

When I read this paper

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

It looks to me like the end result coming out of XGboost is the same as in the Python implementation, however the main difference is how XGboost finds the best split to make in each regression tree.

Basically, XGBoost gives the same result, but it is faster.

Is this correct, or is there something else I am missing ?

Best Answer

You are correct, XGBoost ('eXtreme Gradient Boosting') and sklearn's GradientBoost are fundamentally the same as they are both gradient boosting implementations.

However, there are very significant differences under the hood in a practical sense. XGBoost is a lot faster (see http://machinelearningmastery.com/gentle-introduction-xgboost-applied-machine-learning/) than sklearn's. XGBoost is quite memory-efficient and can be parallelized (I think sklearn's cannot do so by default, I don't know exactly about sklearn's memory-efficiency but I am pretty confident it is below XGBoost's).

Having used both, XGBoost's speed is quite impressive and its performance is superior to sklearn's GradientBoosting.