An optimized general purpose gradient boosting library. The library is parallelized, and also provides an optimized distributed version. It implements machine learning algorithm under gradient boosting framework, including generalized linear model and gradient boosted regression tree (GBDT). XGBoost can also also distributed and scale to even larger data.
Contributors: https://github.com/dmlc/xgboost/graphs/contributors
Turorial and Documentation: https://github.com/dmlc/xgboost/wiki
Issues Tracker: https://github.com/dmlc/xgboost/issues
Please join XGBoost User Group to ask questions and share your experience on xgboost.
Examples Code: Learning to use xgboost by examples
Video tutorial: Better Optimization with Repeated Cross Validation and the XGBoost model - Machine Learning with R
Distributed Version: Distributed XGBoost
Notes on the Code: Code Guide
Learning about the model: Introduction to Boosted Trees
- This slide is made by Tianqi Chen to introduce gradient boosting in a statistical view.
- It present boosted tree learning as formal functional space optimization of defined objective.
- The model presented is used by xgboost for boosted trees
- Distributed XGBoost now runs on YARN!
- xgboost user group for tracking changes, sharing your experience on xgboost
- Distributed XGBoost is now available!!
- New features in the lastest changes :)
- Distributed version that scale xgboost to even larger problems with cluster
- Feature importance visualization in R module, thanks to Michael Benesty
- Predict leaf index, see demo/guide-python/predict_leaf_indices.py
- XGBoost wins Tradeshift Text Classification
- XGBoost wins HEP meets ML Award in Higgs Boson Challenge
- Thanks to Bing Xu, XGBoost.jl allows you to use xgboost from Julia
- Thanks to Tong He, the new R package is available
- Sparse feature format:
- Sparse feature format allows easy handling of missing values, and improve computation efficiency.
- Push the limit on single machine:
- Efficient implementation that optimizes memory and computation.
- Speed: XGBoost is very fast
- IN demo/higgs/speedtest.py, kaggle higgs data it is faster(on our machine 20 times faster using 4 threads) than sklearn.ensemble.GradientBoostingClassifier
- Layout of gradient boosting algorithm to support user defined objective
- Distributed and portable
- The distributed version of xgboost is highly portable and can be used in different platforms
- It inheritates all the optimizations made in single machine mode, maximumly utilize the resources using both multi-threading and distributed computing.
-
Run
bash build.sh
(you can also type make) -
If you have C++11 compiler, it is recommended to type
make cxx11=1
- C++11 is not used by default
-
If your compiler does not come with OpenMP support, it will fire an warning telling you that the code will compile into single thread mode, and you will get single thread xgboost
-
You may get a error: -lgomp is not found
- You can type
make no_omp=1
, this will get you single thread xgboost - Alternatively, you can upgrade your compiler to compile multi-thread version
- You can type
-
Windows(VS 2010): see windows folder
- In principle, you put all the cpp files in the Makefile to the project, and build
-
OS X:
- For users who want OpenMP support using Homebrew, run
brew update
(ensures that you install gcc-4.9 or above) andbrew install gcc
. Once it is installed, edit Makefile by replacing:
export CC = gcc export CXX = g++
with
export CC = gcc-4.9 export CXX = g++-4.9
Then run
bash build.sh
normally.- For users who want to use High Performance Computing for Mac OS X, download the GCC 4.9 binary tar ball and follow the installation guidance to install them under
/usr/local
. Then edit Makefile by replacing:
export CC = gcc export CXX = g++
with
export CC = /usr/local/bin/gcc export CXX = /usr/local/bin/g++
Then run
bash build.sh
normally. This solution is given by Phil Culliton. - For users who want OpenMP support using Homebrew, run
- This version xgboost-0.3, the code has been refactored from 0.2x to be cleaner and more flexibility
- This version of xgboost is not compatible with 0.2x, due to huge amount of changes in code structure
- This means the model and buffer file of previous version can not be loaded in xgboost-3.0
- For legacy 0.2x code, refer to Here
- Change log in CHANGES.md
- XGBoost is adopted as part of boosted tree toolkit in Graphlab Create (GLC). Graphlab Create is a powerful python toolkit that allows you to data manipulation, graph processing, hyper-parameter search, and visualization of TeraBytes scale data in one framework. Try the Graphlab Create in http://graphlab.com/products/create/quick-start-guide.html
- Nice blogpost by Jay Gu using GLC boosted tree to solve kaggle bike sharing challenge: http://blog.graphlab.com/using-gradient-boosted-trees-to-predict-bike-sharing-demand