Skip to main content

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.

chimeraboost logo
  • 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)

Benchmark summary

Blended strength vs slowdown Pareto

Slowdown distribution

  • 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
  • Tuning tips

    • Interaction-heavy regression (many features with strong cross-terms — e.g. the pol dataset): raise depth to 8–10. The depth=6 default is deliberately conservative to keep small datasets from overfitting; on large, interaction-heavy tasks a deeper oblivious tree is decisively better. On pol (n≈15k), depth=10 cuts RMSE ~11% below depth=6 and beats CatBoost, LightGBM and sklearn HGB by ~12%. Keep depth=6 for small (≲4k-row) data, where deeper trees overfit.
  • Why?

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

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.9.2.tar.gz (39.9 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.9.2-py3-none-any.whl (34.9 kB view details)

Uploaded Python 3

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

Hashes for chimeraboost-0.9.2.tar.gz
Algorithm Hash digest
SHA256 d38e8c4617d151f8a6181158d155f8e38bfd5018619ceef15c27f59c6f84d4ce
MD5 1cba211151828c55de80a12a7713da51
BLAKE2b-256 ed8fbd1c4f586ea0d0deea6bc3db91877a88bab867f652167db48fd760142c35

See more details on using hashes here.

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

Hashes for chimeraboost-0.9.2-py3-none-any.whl
Algorithm Hash digest
SHA256 87bbbd6be6b5f82217ed69c390fcb20d354c57dd269a4c0c9e6c86612e1bc03d
MD5 588d2821d2d5e0b7dc5df62fbee12b4c
BLAKE2b-256 bda344213a5bd345d70d0e4e2867734a39d6bb96e5302d384c77378d8edd21f6

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