CatBoost-inspired gradient boosting in pure Python with a numba backend
Project description
chimeraboost
What if CatBoost, but ~5× faster with bagging built in, and all in Python?
⚠️ Project is in active development: breaking changes should be expected.
- Installation
pip install chimeraboost
- Sample code:
from chimeraboost import ChimeraBoostClassifier, ChimeraBoostRegressor
# classification
clf = ChimeraBoostClassifier(early_stopping=True)
clf.fit(X, y, cat_features=[0, 1], sample_weight=w, n_ensembles=2)
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)
- Reproduce the benchmark
python benchmarks/run_benchmarks.py --grinsztajn --save
-
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
- Matches CatBoost within ~0.5% F1, ~0.5% Brier, and ~2% RMSE (% of best) on the 59-dataset Grinsztajn (2022) tabular benchmark, at ~5× the speed
- Exceedingly opinionated GBDT library that only depends on common Python libraries
-
Tuning tips
- Interaction-heavy regression (many features with strong cross-terms — e.g. the
poldataset): raisedepthto 8–10. Thedepth=6default is deliberately conservative to keep small datasets from overfitting; on large, interaction-heavy tasks a deeper oblivious tree is decisively better. Onpol(n≈15k),depth=10cuts RMSE ~11% belowdepth=6and beats CatBoost, LightGBM and sklearn HGB by ~12%. Keepdepth=6for small (≲4k-row) data, where deeper trees overfit.
- Interaction-heavy regression (many features with strong cross-terms — e.g. the
-
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
chimeraboost-0.9.2.tar.gz
(39.9 kB
view details)
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.9.2.tar.gz.
File metadata
- Download URL: chimeraboost-0.9.2.tar.gz
- Upload date:
- Size: 39.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d38e8c4617d151f8a6181158d155f8e38bfd5018619ceef15c27f59c6f84d4ce
|
|
| MD5 |
1cba211151828c55de80a12a7713da51
|
|
| BLAKE2b-256 |
ed8fbd1c4f586ea0d0deea6bc3db91877a88bab867f652167db48fd760142c35
|
File details
Details for the file chimeraboost-0.9.2-py3-none-any.whl.
File metadata
- Download URL: chimeraboost-0.9.2-py3-none-any.whl
- Upload date:
- Size: 34.9 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 |
87bbbd6be6b5f82217ed69c390fcb20d354c57dd269a4c0c9e6c86612e1bc03d
|
|
| MD5 |
588d2821d2d5e0b7dc5df62fbee12b4c
|
|
| BLAKE2b-256 |
bda344213a5bd345d70d0e4e2867734a39d6bb96e5302d384c77378d8edd21f6
|