CatBoost is a gradient boosting library developed by Yandex that handles categorical features natively without manual encoding, making it a strong default choice for tabular data with mixed feature types. Its core innovations β ordered boosting and symmetric oblivious trees β address target leakage and deliver fast, regularized training that often requires minimal hyperparameter tuning. Unlike XGBoost and LightGBM, CatBoost computes target statistics on previous-row permutations to prevent prediction shift, and its symmetric tree structure enables efficient vectorized evaluation on both CPU and GPU. The key mental model: CatBoost trades some flexibility (symmetric splits only by default) for strong out-of-the-box generalization and native handling of high-cardinality categoricals.
What This Cheat Sheet Covers
This topic spans 20 focused tables and 123 indexed concepts, 97 flashcards. Below is a complete table-by-table outline of this topic, spanning foundational concepts through advanced details.
A jump-to index of every table row in this cheat sheet.
An interactive map of every table and concept in this topic.
Table 1: Core Classes and Installation
CatBoost exposes four main Python classes β one per task type β each with a scikit-learn-compatible API. Knowing which class to use and how to install the library correctly is the starting point for any CatBoost workflow.
| Class / Command | Example | Description | |
|---|---|---|---|
from catboost import CatBoostClassifiermodel = CatBoostClassifier(iterations=500, depth=6) | β’ Estimator for binary and multi-class classification β’ default loss is Logloss (binary) or MultiClass (>2 classes). | ||
from catboost import CatBoostRegressormodel = CatBoostRegressor(loss_function='RMSE') | β’ Estimator for regression tasks β’ default loss is RMSE. | ||
from catboost import CatBoostRankermodel = CatBoostRanker(loss_function='YetiRank') | β’ Estimator for learning-to-rank tasks β’ default loss is YetiRank. | ||
from catboost import CatBoostmodel = CatBoost({'loss_function': 'CrossEntropy'}) | β’ Universal estimator β’ loss_function must be set explicitly to determine task type | ||
pip install catboost | β’ Installs the CatBoost Python package β’ GPU support is included in the wheel |