CatBoost: Gradient Boosting With Native Categorical Feature Handling
A fast, scalable, high performance Gradient Boosting on Decision Trees library, used for ranking, classification, regression and other machine learning tasks for Python, R, Java, C++. Supports computation on CPU and GPU.
At a glance
- What is it?
- CatBoost is a C++ gradient boosting library from Yandex with Python, R, Java, C++, Spark, CLI and Node interfaces. Its distinguishing mechanism is ordered boosting plus ordered target statistics for categorical features, and the main questions for adopters are whether the model export path and the distributed story fit their serving stack.
- Who is it for?
- Adopt CatBoost when your tables contain high-cardinality categorical columns and you want the model to consume them directly rather than hand-rolling target encoding that leaks across folds, or when training must run on GPU or across a Spark cluster. Do not adopt it if your serving environment cannot host the exported model format and you need a pure Python inference path, or if your team already has tuned XGBoost pipelines and no categorical pain.
- Can I use it commercially?
- Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 1 day ago.
- What is it written in?
- Mainly C++, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on September 15, 2026, and from our analysis. They are not legal advice.
DEEP OPEN-SOURCE ANALYSIS
The categorical feature problem CatBoost was built to answer
Most gradient boosting libraries assume a numeric design matrix. When a column holds categories, the practitioner has to encode it first, and the common encodings leak. Mean target encoding computes a category's average label from the same rows used for training, so the model sees information about the target that it would not have at prediction time. The usual fix, out-of-fold encoding, adds a training-time dependency and makes results sensitive to how folds are drawn. CatBoost's stated aim is to handle categorical features natively, so the encoding happens inside the boosting loop rather than in a preprocessing step the user writes. The audience is anyone with tabular data where categorical columns carry real signal: ranking, classification and regression tasks, including the Kaggle-style competitions the repository's topic list names. If your features are already numeric and dense, the categorical machinery buys you nothing and you are paying for it in build size and dependency weight.
Ordered boosting and ordered target statistics
The README links to an algorithm description page and cites two papers: CatBoost: gradient boosting with categorical features support, presented at the NIPS 2017 Workshop on ML Systems, and Fighting biases with dynamic boosting. The mechanism those papers describe is ordered boosting. Standard gradient boosting fits each new tree on residuals computed from a model trained on the same data, which biases the residual estimates. Ordered boosting instead maintains several supporting models and uses a permutation of the training rows so that the residual for a given example comes from a model that has not seen that example. The same ordering idea is applied to categorical encoding: ordered target statistics compute a category's target average using only rows that precede the current row in the permutation, which removes the target leakage that plain mean encoding introduces. This is the design decision that separates CatBoost from libraries that leave encoding to the user. It also explains the cost: maintaining supporting models during training is more expensive than fitting a single sequence of trees, which is why the default iteration count and learning rate settings matter more here than in a library where each tree is independent of an ordering scheme.
Installation paths and the languages you can call it from
CatBoost ships as a Python package, an R package, a command line tool, and a package for Apache Spark. The README points to separate installation guides for each, and the Python and R packages are also distributed through PyPI and conda-forge, as the badges in the repository header indicate. The command line binary is the route for training jobs that do not live inside a Python or R process, and the Spark package is the route for distributed training. The repository also publishes a Node package, with node-package-v1.27.0 listed among the recent releases, which is a separate release train from the v1.2.x library versions. That version split is worth noting: the Node package and the core library do not advance in lockstep, so pinning one does not pin the other. The README does not give a copy-pasteable pip or conda command in the text supplied here, so the exact install invocation should be taken from the Python installation guide rather than guessed.
Training modes, metrics and the parameters you actually tune
The documentation set linked from the README covers training modes and metrics, cross-validation, parameter tuning, feature importance calculation, and both regular and staged prediction. Staged prediction is the one that changes how you deploy. Instead of applying the whole ensemble at once, it lets you apply the first N trees and inspect the partial result, which is useful when you want a latency or accuracy trade-off curve without retraining. Feature importance calculation is built in, so you do not need a separate permutation-importance implementation. The parameter tuning page is the reference for the knobs, and the README does not enumerate defaults, so any specific value quoted in a tutorial should be checked against that page for the version you install. If you are coming from a library where the main loop is a single fit call with a handful of arguments, the surface here is wider: loss functions, metrics, cross-validation and tuning each have their own documentation page.
Getting a trained model into a serving process
The section titled CatBoost models in production points to the model API documentation in catboost/CatboostModelAPI.md. That is the path for evaluating a trained model inside an application without embedding the full training library. The README also states that prediction speed is a design goal, and the C++ API documentation page is linked as the reference for it. The practical constraint is the export format: a model trained in Python is not automatically loadable by every runtime, and the model API document is the place that defines which languages and platforms are covered. If your serving stack is a language not listed there, you are looking at either running a sidecar process or reimplementing inference, and neither is a small decision. This is the point where a team evaluating CatBoost should stop reading the README and read CatboostModelAPI.md directly, because the answer determines whether the rest of the evaluation is worth doing.
Where CatBoost is the wrong choice
Two cases stand out. The first is sparse, very high-dimensional data, the kind that comes out of text vectorization or one-hot encoded click logs. Tree-based boosting in general struggles there, and CatBoost's categorical handling does not change that: ordered target statistics help when a column has a manageable number of distinct categories with repeated observations, not when almost every row has a unique category value. The second is a serving environment that cannot host the exported model. If your inference path must be pure Python with no compiled extension, or must run in a runtime the model API does not cover, the training-side advantages do not survive contact with production. A third, softer case: if your features are numeric and your existing XGBoost or LightGBM pipeline is tuned and monitored, switching costs are real and the categorical mechanism is not doing any work for you. The README's own comparison link points to a benchmarks repository rather than stating numbers inline, so any claim that CatBoost wins on a given dataset should be checked against that repository rather than assumed.
Alternatives and the actual difference in approach
LightGBM and XGBoost are the obvious comparisons, and the difference is not just speed. Both expect you to encode categorical columns yourself or use a histogram-based split finder on integer-coded categories; neither ships ordered target statistics as the default encoding path. That means the leakage problem is yours to manage, typically with out-of-fold encoding, and the encoding step sits outside the boosting loop where it is harder to reason about. CatBoost's ordered boosting also changes the residual computation itself, not only the encoding, which is a deeper modification than swapping in a different split criterion. The trade-off is training cost and a larger dependency: the core is C++, and the language bindings wrap it. If you want the smallest possible dependency and your data is numeric, a lighter library is the better fit. If your data is categorical-heavy and you have been hand-rolling target encoding with cross-fitting, CatBoost removes a class of bugs you currently have to test for.
Licence, releases and the maintenance you are signing up for
The repository is licensed under Apache License 2.0, copyright YANDEX LLC, 2017-2026, with the terms in the LICENSE file. Apache-2.0 permits commercial use and modification and includes a patent grant, which matters if you redistribute binaries; it also requires that you preserve notices. That is a summary of the licence identifier, not legal advice, and anything about redistribution obligations should go to your own counsel. On releases, the recent list shows v1.2.10 and v1.2.9 in February 2026 and a separate node-package-v1.27.0, so the library and the Node binding are versioned independently and upgrading one does not upgrade the other. The README also links an open problems page and help-wanted issues, which is the maintainers' own statement of where the project is incomplete. For a team adopting this, the upgrade cost is mostly in the binding you use: a Python package upgrade is a dependency bump, while a C++ or CLI deployment means rebuilding and revalidating the binary, and the Node package has its own cadence. Pin the version you validate against and check the release notes for the specific binding before moving.
Editorial conclusion
Adopt CatBoost when your tables contain high-cardinality categorical columns and you want the model to consume them directly rather than hand-rolling target encoding that leaks across folds, or when training must run on GPU or across a Spark cluster. Do not adopt it if your serving environment cannot host the exported model format and you need a pure Python inference path, or if your team already has tuned XGBoost pipelines and no categorical pain. Before committing, verify three things against the documentation: that the CatboostModelAPI supports your target language or platform, that your Spark or CLI version matches the distributed training guide, and that the Apache-2.0 licence terms suit how you redistribute the resulting binaries.
Community notes