Skip to main content

CatBoost-inspired gradient boosting in pure Python with a numba backend

Project description

chimeraboost

What if CatBoost, but way faster, slightly worse, and all in Python?

ChatGPT Image May 26, 2026, 05_12_17 PM
  • What?

    • GBDT library that only depends on common Python libraries
    • Supports regression, binary and multiclass classification, quantile regression
    • Categorical features, sample weights, and automatic early stopping
    • Within ~3% F1 / ~5% RMSE of CatBoost on a 34-dataset OpenML benchmark, at ~18× the speed
  • Why?

    • I want to be able to modify my GBDT library at will
    • I know Python and I don't know C
  • Install

pip install chimeraboost
  • How?
from chimeraboost import ChimeraBoostClassifier, ChimeraBoostRegressor

# classification
clf = ChimeraBoostClassifier(early_stopping=True)
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)
reg.fit(X, y)
  • Some parameters
Param Default What it does
iterations 500 Max boosting rounds (capped earlier by early stopping).
learning_rate auto Per-round shrinkage; auto-picked when None.
depth 6 Oblivious-tree depth (same split applied across each level).
l2_leaf_reg 3.0 L2 regularization on leaf values.
max_bins 128 Quantile bins per numeric feature.
cat_n_permutations 4 Ordered target-statistic permutations for categoricals.
early_stopping False Auto train/validation split; stop when val stops improving.
cat_combinations False Generate pairwise categorical combo features (helps all-cat datasets).
  • Benchmark

Benchmark summary

  • Reproduce the benchmark
python benchmarks/run_benchmarks.py --openml --seeds 5 --save
python benchmarks/make_tables.py benchmarks/results/<stamp>.json

Results land in benchmarks/results/<stamp>.txt (text log) and .json (raw per-seed metrics). Table PNG is written to images/. Competitors are auto-detected; install any of catboost, xgboost, lightgbm to see them.

  • Pre-push hook (optional)

Run the test suite before every git push:

git config core.hooksPath .githooks

Project details


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.6.0.tar.gz (30.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

chimeraboost-0.6.0-py3-none-any.whl (28.4 kB view details)

Uploaded Python 3

File details

Details for the file chimeraboost-0.6.0.tar.gz.

File metadata

  • Download URL: chimeraboost-0.6.0.tar.gz
  • Upload date:
  • Size: 30.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for chimeraboost-0.6.0.tar.gz
Algorithm Hash digest
SHA256 f04ffe480f693cc67c7f10601e24024eda26ac206ec354a588a158866e77ec70
MD5 20e79f64891449992b9baadeaddb35de
BLAKE2b-256 7bd405a7c6d568e9e44067dc7224354ca4370126a544cd30d0ef07007c11f72f

See more details on using hashes here.

File details

Details for the file chimeraboost-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: chimeraboost-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 28.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for chimeraboost-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 422c3b5651be7804cd380b2ea81dddea88169fa34093ebb0a427fc41bd1ee329
MD5 8d8a0853454dc3a256c4677ee96306ac
BLAKE2b-256 e19fa913a9ddb8a2bfacfd6b2427794cda6f8336e2f92443aca048ce3f37b446

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page