CatBoost

CatBoost – gradient boosting on decision trees

A gradient boosting library from Yandex known for handling categorical features automatically and for symmetric trees that reduce overfitting.

ActiveMediumv1.2.10Apache-2.0Machine Learning Frameworks & Libraries

Official documentationTry the examples

Basic information

NameCatBoost
Full nameCatBoost – gradient boosting on decision trees
CategoryMachine Learning Frameworks & Libraries
DeveloperYandex
Release year2017
Official websitecatboost.ai
GitHub repositorycatboost/catboost
Official documentationcatboost.ai/docs
Package on PyPIcatboost
LicenseApache-2.0 (PyPI license)
Project statusActive Had a release in the last 12 months
Latest version18 February 2026 (version 1.2.10)
Programming languageC++, Python, R
Operating systemsNot specified
Required Python versionNot specified
Difficulty levelMedium

Data last checked: 21 November 2026 — source: PyPI JSON API (2026-11-21)

Overview

CatBoost handles categorical features with ordered target statistics that reduce target leakage, builds symmetric (oblivious) trees that are fast at prediction, and gives good results with default parameters in many cases.

Suited to tables with many categorical text columns, such as customer data and administrative records.

When to choose it? Choose it when categorical features are many and you want good results without much manual encoding.

Uses

Main uses

  • Tables with many categorical features
  • Classification, regression and ranking

Scientific fields

  • Business
  • Finance
  • Medicine

Suitable project types

  • Predicting customer churn
  • Classifying patient records

Research applications

  • Comparing categorical feature encoding methods

Gradient boosting treesClassical machine learning

Technical features

A feature is shown as "Supported" only if it is documented in the library's official documentation; anything we have not verified is shown as "Not specified".

CPU supportSupported
GPU supportSupported
CUDA compatibilitySupported
Distributed training or computingPartial or through an add-onTraining on several GPUs and on Spark according to the documentation.
Automatic differentiation (Autodiff)Not supported
Model deploymentSupportedExports to formats including ONNX, CoreML and C++ according to the documentation.
Pre-trained modelsNot applicable
Supported data typesNumeric, categorical and text features
Integration with other librariesScikit-learn, Pandas, SHAP
Flexibility (editorial estimate)Medium
Performance (editorial estimate)High
Community (editorial estimate)Large
Documentation quality (editorial estimate)Good documentation

Installation and running

Shell
pip install catboost

Installing inside a virtual environment (venv or conda) is recommended. If you need compatibility with a specific CUDA version or operating system, refer to the official documentation, because this information changes with every release.

Code examples

Examples marked "Run and tested" were actually run, with their output, test date and library versions recorded; the others need a GPU or model downloads, so they were not run in the test environment.

BeginnerCatBoost with categorical text columnsRun and tested

Goal: Passing categorical text columns to the model as they are.

Python — example.py
import numpy as np, pandas as pd
from catboost import CatBoostClassifier

rng = np.random.default_rng(1)
n = 1000
df = pd.DataFrame({"device": rng.choice(["mobile", "desktop", "tablet"], n),
                   "country": rng.choice(["IQ", "EG", "SA", "MA"], n),
                   "minutes": rng.exponential(5, n).round(1)})
y = ((df.device == "mobile") & (df.minutes > 4)).astype(int)
model = CatBoostClassifier(iterations=200, depth=4, verbose=0, random_seed=0)
model.fit(df[:800], y[:800], cat_features=["device", "country"])
print(f"Test accuracy: {(model.predict(df[800:]) == y[800:]).mean():.3f}")
print("Feature importance:", {c: round(float(v), 1) for c, v in zip(df.columns, model.get_feature_importance())})

Code explanation

We list the categorical column names in cat_features, and CatBoost applies ordered target statistics encoding, which reduces target leakage.

Requirements

Shell
pip install catboost pandas

How to run

Save the code in a file example.py then run it:

Shell
python example.py

Output recorded during testing

Test accuracy: 1.000
Feature importance: {'device': 42.4, 'country': 0.9, 'minutes': 56.7}

This example was actually run and tested on 21 November 2026 on a CPU — catboost 1.2.10, pandas 3.1.1, python 3.13.18

Example page

All CatBoost examples in the Code Explorer

Pros

  • Built-in handling of categorical features
  • Good results with default settings
  • Fast prediction

Limitations

  • CPU training can be slower than LightGBM
  • A relatively large package

References and verification

  • Package page on PyPI (source of the version, licence and release date) Checked directly

    https://pypi.org/project/catboost/

    Checked on: 21 November 2026 — version checked: 1.2.10 — reviewed by: the DLArabic team

  • Official website A link the package officially declares on PyPI

    https://catboost.ai

    Checked on: 21 November 2026 — reviewed by: the DLArabic team

  • Official documentation A link the package officially declares on PyPI

    https://catboost.ai/docs/

    Checked on: 21 November 2026 — reviewed by: the DLArabic team

  • Official repository A link the package officially declares on PyPI

    https://github.com/catboost/catboost

    Checked on: 21 November 2026 — reviewed by: the DLArabic team

History of verified versions

VersionRelease dateChecked on
1.2.1018 February 202621 November 2026

Page information last reviewed: 21 November 2026. The description was written originally for the encyclopedia and is not copied from the official websites.

Report information that needs updating