CatBoost-inspired gradient boosting in pure Python with a numba backend
Project description
chimeraboost
What if CatBoost was slightly worse, 12× faster, and all in Python?
📖 Documentation: bbstats.github.io/chimeraboost
- Installation
pip install chimeraboost
-
Cold start
The first
fit()in a fresh environment JIT-compiles the numba kernels — a few seconds, machine-dependent. The compiled kernels are cached on disk (cache=True), so every later session in the same environment skips this and starts fast. -
Sample code:
from chimeraboost import ChimeraBoostClassifier, ChimeraBoostRegressor
# classification
clf = ChimeraBoostClassifier(early_stopping=True, n_ensembles=2)
clf.fit(X, y, cat_features=[0, 1], sample_weight=w)
proba = clf.predict_proba(X_test)
# regression (RMSE, MAE, or Quantile)
reg = ChimeraBoostRegressor(loss="Quantile", alpha=0.9, early_stopping=True, n_ensembles=10)
reg.fit(X, y)
-
What?
- Exceedingly opinionated GBDT library that only depends on common Python libraries
- Categorical features (catboost-like processing) and sample weights
- Bagging as a first-class feature (
n_ensembles) - Automatic early stopping, with optional grouped splitting for the validation set
- Supports regression, quantile regression, binary and multiclass classification
- Exact SHAP explanations (
model.shap_values(X)) — interventional TreeSHAP computed exactly (not sampled) thanks to the oblivious tree structure, with the linear-leaf slopes included
- Exceedingly opinionated GBDT library that only depends on common Python libraries
-
Tuning tips
- Interaction-heavy regression: raise
depthto 8–10 (default 6 is conservative to protect small data).
- Interaction-heavy regression: raise
-
Inspirations / Citations
- XGBoost — Chen & Guestrin, KDD 2016 — regularized objective, Newton leaf estimation, column subsampling
- LightGBM — Ke et al., NeurIPS 2017 — histogram-based split finding
- CatBoost — Prokhorenkova et al., NeurIPS 2018 — ordered boosting, ordered target statistics, oblivious trees
- Linear-leaf trees — Shi et al., IJCAI 2019 (arXiv:1802.05640) — piece-wise-linear regression trees (
linear_leaves) - TreeSHAP — Lundberg et al., Nature Machine Intelligence 2020 (orig. SHAP, NeurIPS 2017) — exact additive feature attributions (
shap_values) - Hierarchical shrinkage — Agarwal et al., ICML 2022 (arXiv:2202.00858) — leaf regularization (
hs_lambda) - TabArena — Erickson et al., NeurIPS 2025 (arXiv:2506.16791) — tabular benchmark used for evaluation
-
Why?
- I want to be able to modify my GBDT library at will
- I know Python and I don't know C
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file chimeraboost-0.14.0.tar.gz.
File metadata
- Download URL: chimeraboost-0.14.0.tar.gz
- Upload date:
- Size: 73.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c9f3aeb49c0d9d8fbb46cb8707e64bd62effb4d89733f33fd5899f56241a42f0
|
|
| MD5 |
0ba2a08b608b6f244710a39410bc0474
|
|
| BLAKE2b-256 |
8be6c3557013b56b117991030a62b068b613e499cc3a3a483cc2c29a465842f8
|
File details
Details for the file chimeraboost-0.14.0-py3-none-any.whl.
File metadata
- Download URL: chimeraboost-0.14.0-py3-none-any.whl
- Upload date:
- Size: 54.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9670212cd19a3765a620e038d5ada28a9ce6cced492ff78cc5e5d447ca9673aa
|
|
| MD5 |
081200cd3403e81a498d1472b1e97d40
|
|
| BLAKE2b-256 |
af4e55f8575b37ec72de5c522ebb3ae836cac1b47b30b6ab5663bcf65e789539
|