Skip to main content

chimeraboost

pronounced kai-MEER-uh-boost

Lightning-fast Gradient Boosting, near-Catboost quality, all in Python

📖 Documentation: bbstats.github.io/chimeraboost

image

#2 On TabArena GBDT Elo (Defaults) image

Installation

pip install chimeraboost

Quickstart

from chimeraboost import ChimeraBoostClassifier, ChimeraBoostRegressor

# quality picks the speed/accuracy trade-off: 1 is fastest - 5 is strongest,
# default is 3.
clf = ChimeraBoostClassifier(quality=4)
clf.fit(X, y, cat_features=[0, 1], sample_weight=w)
proba = clf.predict_proba(X_test)

reg = ChimeraBoostRegressor()
reg.fit(X, y)

What?

  • Regression, quantile regression, binary and multiclass classification
  • Fast training and inference, all in python
  • Extremely high quality predictions

How?

  • Bagging as a first-class feature (using n_ensembles)
  • Automatic early stopping
  • Automatic linear-leaf auditioning
  • Replay mechanism for faster refitting after early stopping
  • Gradient-matrix free multi-quantile split search
  • numba is very fast

Why?

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

Documentation

Benchmarking

Want to help? Run either one, then open an issue or PR with the JSON.

pip install -e ".[bench,competitors]"

python benchmarks/run_benchmarks.py --synth --seeds 3 --save     # quick, synthetic
python benchmarks/run_benchmarks.py --decide --seeds 3 --save    # slower, 103 real datasets

Each writes benchmarks/results/<timestamp>.json:

{
  "provenance": {"chimeraboost": "0.30.0", "platform": "Linux-6.1", "cpu_count": 12,
                 "libraries": {"catboost": "1.2.10", "lightgbm": "4.6.0"}},
  "records": [
    {"dataset": "diabetes", "model": "ChimeraBoost", "seed": 0,
     "metrics": {"primary": -59.82, "rmse": 59.82}, "fit_time": 0.23}
  ]
}

Inspirations / Citations

Most ideas in ChimeraBoost were someone else's.

  • CatBoost, Prokhorenkova et al., NeurIPS 2018. Oblivious trees (the tree type itself from Kohavi & Li, IJCAI 1995), ordered target statistics, feature combinations, ordered boosting, and the size-dependent automatic learning rate (adaptive_learning_rate).
  • XGBoost, Chen & Guestrin, KDD 2016. Regularized objective, second-order split gain, Newton leaf estimation, min_child_weight.
  • LightGBM, Ke et al., NeurIPS 2017. Histogram-based split finding, which that paper itself treats as prior art (McRank, Li et al. 2007; pGBRT, Tyree et al. 2011).
  • Minimum Variance Sampling, Ibragimov & Gusev, NeurIPS 2019. Gradient-weighted row sampling (subsample).
  • Quantized GBDT training, Shi, Ke et al., NeurIPS 2022. Integer gradient histograms (quantize_gradients).
  • SketchBoost, Iosipoi & Vakhrushev, NeurIPS 2022, and GBDT-MO, Zhang & Jung. Vector leaves and the projected gradient used for multiclass and multi-quantile splits.
  • Linear-leaf trees, Shi, Li & Li, IJCAI 2019 (arXiv:1802.05640). Piece-wise-linear regression trees (linear_leaves); model trees back to Quinlan's M5, 1992.
  • TreeSHAP, Lundberg et al., Nature Machine Intelligence 2020 (orig. SHAP, NeurIPS 2017). Exact additive feature attributions (shap_values).
  • OpenFE, Zhang et al., ICML 2023 (arXiv:2211.12507). Automated pairwise feature generation (cross_features).

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.31.0.tar.gz (259.6 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.31.0-py3-none-any.whl (152.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for chimeraboost-0.31.0.tar.gz
Algorithm Hash digest
SHA256 3ec910442293af0d05f46effde04214760e990df35f044241b4d358a506545a1
MD5 c70e25a5a5a741223ec5c5fd249c831c
BLAKE2b-256 9e6a14d6d501a2bedadfa121dd73b8b378e4bb0479bd26c9df00b12552f46b7f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chimeraboost-0.31.0-py3-none-any.whl
  • Upload date:
  • Size: 152.0 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.31.0-py3-none-any.whl
Algorithm Hash digest
SHA256 65eaf603a5f9078f6320a7f464ef3e26a65c972c543f15d47581f652cb23f6e9
MD5 31ff99341082fd86971d829cb3a50ecd
BLAKE2b-256 080bd4e80fa482e33cf5564168c9182f33a5155dc7f9999b9ac32aae573f3da1

See more details on using hashes here.

Release history Release notifications | RSS feed

0.32.0

2 files

This release

0.31.0 This release

2 files

0.30.0

2 files

0.29.0

2 files

0.28.0

2 files

0.27.0

2 files

0.26.0

2 files

0.25.0

2 files

0.24.0

2 files

0.23.0

2 files

0.22.0

2 files

0.21.0

2 files

0.20.0

2 files

0.19.0

2 files

0.18.1

2 files

0.18.0

2 files

0.17.0

2 files

0.16.1

2 files

0.16.0

2 files

0.15.0

2 files

0.14.2

2 files

0.14.1

2 files

0.14.0

2 files

0.13.1

2 files

0.13.0

2 files

0.12.0

2 files

0.11.0

2 files

0.9.2

2 files

0.9.1

2 files

0.8.0

2 files

0.7.1

2 files

0.7.0

2 files

0.6.0

2 files

0.5.2

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page