dmlc

xgboost

XGBoost is an optimized distributed gradient boosting library (C++ core with Python, R, Java, and other bindings) that solves classification and regression on tabular data with efficient parallel tree boosting, scaling to billions of examples.

v3.3.1
Published at
Sep 15, 2026
28,892
Stars
19,761
Download
Synced at
8d ago

Latest release

v3.3.1Sep 15, 2026, 08:48 AM
Downloads slow? Switch the source anytime above

README

Project Overview

XGBoost (eXtreme Gradient Boosting) is an efficient, flexible, and portable distributed gradient boosting library implementing tree boosting algorithms such as GBDT. It is one of the most widely used machine learning libraries for tabular data competitions and industrial modeling. The same code runs on a single machine or distributed environments including Kubernetes, Hadoop, Spark, and Dask, handling training beyond billions of examples. Language bindings cover Python, R, Java, Scala, and C++.

The evergreen of tabular modeling: one codebase from a laptop to a cluster.

Item Value
Platform Linux, macOS, Windows
Language C++ core, Python/R/Java/Scala/C++ bindings
License Apache-2.0
Environments Single machine, Hadoop, Spark, Dask, Kubernetes

Key Features

  • Gradient boosting: parallel tree boosting (GBDT/GBM) covering classification, regression, and ranking
  • Distributed training: the same code runs on Spark, Dask, Hadoop, and other clusters
  • GPU acceleration: markedly faster training and inference on NVIDIA GPUs
  • Sparsity aware: handles missing values and sparse features automatically
  • Regularization: built-in L1/L2 regularization and pruning to curb overfitting
  • CV and tuning: built-in cross-validation, integrated with tuning libraries like Optuna
  • Multi-language: Python, R, JVM, and C++ bindings share one core

Target Audience

  • Data scientists modeling tabular data
  • Machine learning competition participants
  • Engineers training tree models on large datasets
  • Teams deploying models in production

Quick Start

  1. Install the Python package:
pip install xgboost
  1. Train with the scikit-learn style interface:
from xgboost import XGBClassifier

model = XGBClassifier(n_estimators=300, max_depth=6)
model.fit(X_train, y_train)
  1. Switch to the Dask or Spark interface for very large datasets; cluster code stays almost identical

Core Advantages

  • High accuracy: tree boosting remains one of the strongest baselines on tabular tasks
  • Scalability: the same API from a laptop to thousands of nodes
  • Mature engineering: a decade of polish with complete docs, tutorials, and production cases

System Requirements

Item Requirement
OS Linux, macOS, Windows
Hardware CPU primary, optional GPU acceleration
Runtime Python 3.x / R / JVM

Notes

  • Data types: convert input to DMatrix or numeric matrices; encode categorical features first
  • GPU setup: the GPU build requires a matching CUDA environment

Release history

Sort