xgboost Documentation

Scalable, Portable and Distributed Gradient Boosting (GBDT, GBRT or GBM) Library, for Python, R, Java, Scala, C and more.

28,647 stars C++ C++ 1 file ยท ~1,708 tokens #distributed-systems#gbdt#gbm#gbrt#machine-learning#xgboost
RAW Doc

File: README.md

eXtreme Gradient Boosting










Community |
Documentation |
Resources |
Contributors |
Release Notes

XGBoost is an optimized distributed gradient boosting library designed to be highly efficient, flexible and portable.
It implements machine learning algorithms under the Gradient Boosting framework.
XGBoost provides a parallel tree boosting (also known as GBDT, GBM) that solve many data science problems in a fast and accurate way.
The same code runs on major distributed environment (Kubernetes, Hadoop, SGE, Dask, Spark, PySpark) and can solve problems beyond billions of examples.

License

ยฉ Contributors, 2021. Licensed under an Apache-2 license.

Contribute to XGBoost

XGBoost has been developed and used by a group of active community members. Your help is very valuable to make the package better for everyone.
Checkout the Community Page.

Reference

  • Tianqi Chen and Carlos Guestrin. XGBoost: A Scalable Tree Boosting System. In 22nd SIGKDD Conference on Knowledge Discovery and Data Mining, 2016
  • XGBoost originates from research project at University of Washington.

Sponsors

Become a sponsor and get a logo here. See details at Sponsoring the XGBoost Project. The funds are used to defray the cost of continuous integration and testing infrastructure (https://xgboost-ci.net).

Open Source Collective sponsors

Sponsors

[Become a sponsor]





Backers

[Become a backer]


File: demo/c-api/basic/README.md

C-APIs

XGBoost implements a C API originally designed for various language
bindings. For detailed reference, please check xgboost/c_api.h. Here is a
demonstration of using the API.

CMake

If you use CMake for your project, you can either install XGBoost
somewhere in your system and tell CMake to find it by calling
find_package(xgboost), or put XGBoost inside your project's source tree
and call CMake command: add_subdirectory(xgboost). To use
find_package(), put the following in your CMakeLists.txt:

cmake
find_package(xgboost REQUIRED)
add_executable(api-demo c-api-demo.c)
target_link_libraries(api-demo xgboost::xgboost)

If you want to put XGBoost inside your project (like git submodule), use this
instead:

cmake
add_subdirectory(xgboost)
add_executable(api-demo c-api-demo.c)
target_link_libraries(api-demo xgboost)

make

You can start by modifying the makefile in this directory to fit your need.


File: demo/c-api/external-memory/README.md

Defining a Custom Data Iterator to Load Data from External Memory

A simple demo for using custom data iterator with XGBoost. The feature is still
experimental and not ready for production use. If you are not familiar with C API,
please read its introduction in our tutorials and visit the basic demo first.

Defining Data Iterator

In the example, we define a custom data iterator with 2 methods: reset and next. The
next method passes data into XGBoost and tells XGBoost whether the iterator has reached
its end, and the reset method resets iterations. One important detail when using the C
API for data iterator is users need to make sure that the data passed into next method
must be kept in memory until the next iteration or reset is called. The external memory
DMatrix is not limited to training, but also valid for other features like prediction.


File: demo/data/README.md

This folder contains processed example dataset used by the demos.
Copyright of the dataset belongs to the original copyright holder


File: demo/kaggle-higgs/README.md

Highlights

Higgs challenge ends recently, xgboost is being used by many users. This list highlights the xgboost solutions of players

Guide for Kaggle Higgs Challenge

This is the folder giving example of how to use XGBoost Python Module to run Kaggle Higgs competition

This script will achieve about 3.600 AMS score in public leaderboard. To get start, you need do following step:

  1. Compile the XGBoost python lib
bash
cd ../..
make
  1. Put training.csv test.csv on folder './data' (you can create a symbolic link)

  2. Run ./run.sh

Speed

speedtest.py compares xgboost's speed on this dataset with sklearn.GBM

Using R module

  • Alternatively, you can run using R, higgs-train.R and higgs-pred.R.

File: demo/kaggle-otto/README.MD

Benchmark for Otto Group Competition

This is a folder containing the benchmark for the Otto Group Competition on Kaggle.

Getting started

  1. Put train.csv and test.csv under the data folder
  2. Run the script
  3. Submit the submission.csv

The parameter nthread controls the number of cores to run on, please set it to suit your machine.

R-package

To install the R-package of xgboost, please run

r
install.packages("xgboost", repos = "https://cran.r-project.org")

Windows users may need to install RTools first.