RFGBoost: async Random Forest + gradient boosting engine in Rust with CI-based convergence
Project description
rfgboost
Gradient boosting with asynchronous random forests, implemented in Rust with Python bindings.
Installation
pip install rfgboost
From source (requires Rust toolchain):
pip install maturin
maturin develop --release
Quick Start
from rfgboost import RFGBoostClassifier, RFGBoostRegressor
# Classification
clf = RFGBoostClassifier(n_estimators=20, rf_n_estimators=50, rf_max_depth=6)
clf.fit(X_train, y_train)
proba = clf.predict_proba(X_test)
ci = clf.predict_ci(X_test) # Wilson score intervals
# Regression
reg = RFGBoostRegressor(n_estimators=20, rf_n_estimators=50, rf_max_depth=6)
reg.fit(X_train, y_train)
pred = reg.predict(X_test)
ci = reg.predict_ci(X_test) # Split conformal prediction intervals
# Async mode (adaptive early stopping via CI convergence)
clf = RFGBoostClassifier(async_mode=True, tol=0.0)
# Categorical features (WOE encoding via fastwoe-rs)
clf = RFGBoostClassifier(cat_features=[0, 1, 2])
Components
| Class | Description |
|---|---|
RFGBoostClassifier |
Gradient boosting with RF base learners (binary + multiclass) |
RFGBoostRegressor |
Gradient boosting with RF base learners (regression) |
RandomForestClassifier |
Standalone random forest classifier |
RandomForestRegressor |
Standalone random forest regressor |
RandomForestUnsupervised |
Breiman's unsupervised RF (proximity, outliers, MDS) |
DecisionTree |
Single decision tree (exact sklearn match) |
TreeSHAP |
Exact tree-path-dependent SHAP values |
Key Features
- Async tree building: Rayon work-stealing with AtomicBool convergence flag. Unstarted trees skip once the ensemble converges.
- CI-based stopping: Wilson intervals (classification) and normal CI (regression) determine convergence automatically with
tol=0. - Histogram splitting: 256-bin quantile histograms for O(n + bins) split search.
- Conformal prediction: Split conformal CIs for regression with coverage guarantees.
- Unsupervised RF: Proximity matrix, outlier detection, MDS embedding, feature importance from Breiman's original method.
- Exact TreeSHAP: Matches the official SHAP package to machine precision.
License
MIT
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 Distributions
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 rfgboost-0.1.2.tar.gz.
File metadata
- Download URL: rfgboost-0.1.2.tar.gz
- Upload date:
- Size: 820.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e56efcf5eafb4c0ee0e35530926ece4d40b0a3c771cd48230e45edffaa037a4b
|
|
| MD5 |
ed6b41fd2da4e1699ae6ddaef722ac7e
|
|
| BLAKE2b-256 |
4c2dd93d376d0e321dd4d0cb11c9068c9aeb993e2ebbbc441e6d1dfb243c89a9
|
File details
Details for the file rfgboost-0.1.2-cp39-abi3-win_amd64.whl.
File metadata
- Download URL: rfgboost-0.1.2-cp39-abi3-win_amd64.whl
- Upload date:
- Size: 438.5 kB
- Tags: CPython 3.9+, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1729afb10d409b5162efdfac834126c6bd4cc9a6bdaaf1c98da6d3d3742ad4b1
|
|
| MD5 |
90516ceb9d12b057a79764f3b330d939
|
|
| BLAKE2b-256 |
9590471ab9425a3e192388aa79a65e2085e43b7f0e33addf83e4349c526c0467
|
File details
Details for the file rfgboost-0.1.2-cp39-abi3-pyemscripten_2025_0_wasm32.whl.
File metadata
- Download URL: rfgboost-0.1.2-cp39-abi3-pyemscripten_2025_0_wasm32.whl
- Upload date:
- Size: 207.9 kB
- Tags: CPython 3.9+, PyEmscripten 2025.0 wasm32
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7605666b1fa5c48959e4a8c5992ecaf4313c526999965532ce448de87cb48e96
|
|
| MD5 |
64f0ecd7a822436cd4164638d5f19a08
|
|
| BLAKE2b-256 |
eab3ad4a412a5db68e304c0f3faea736e997e359cf2c28bc7afd38cb5ce97154
|
File details
Details for the file rfgboost-0.1.2-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: rfgboost-0.1.2-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 622.0 kB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0f5666f7aa17a11538f664a1e8adcd52521ba41f3b8d1d3e223ce3f5e694581b
|
|
| MD5 |
c08e893eda5d0375eccdafd8e99e3e38
|
|
| BLAKE2b-256 |
fc35491185729d70b59490b5f78c8a268c9e3b4f2cedef61879e419c6243a8cc
|
File details
Details for the file rfgboost-0.1.2-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: rfgboost-0.1.2-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 601.4 kB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a5cc7e8f10a969092c11098c42bce31d4c869bf4ec34777b87e6581901fd3ffa
|
|
| MD5 |
cc21b0457b2e482c3f01ecee8998ac73
|
|
| BLAKE2b-256 |
c6102d6dfa0b98aa5156c2df52d0032a4529b24e5501ae9d77e0e7632171c67d
|
File details
Details for the file rfgboost-0.1.2-cp39-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: rfgboost-0.1.2-cp39-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 542.0 kB
- Tags: CPython 3.9+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f13f95e0677e61e963b061b70f902ac64887761b89076c0576c1b3f0c17b255
|
|
| MD5 |
6ec82cf130b2afe73e64eb512e46a68e
|
|
| BLAKE2b-256 |
7bbeb2e29ba0d3ccdb2ab54af244d5650d03a4352defa89df4dfc1752130f9d2
|
File details
Details for the file rfgboost-0.1.2-cp39-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: rfgboost-0.1.2-cp39-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 553.3 kB
- Tags: CPython 3.9+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
80bdc667d8b582e787b8981db62867f9ab4d90adfb7ba4d91c679c2722837fea
|
|
| MD5 |
80410b4f24eed65b52fa70242b4951e1
|
|
| BLAKE2b-256 |
723106415d837cde30754c887304fd1791f599951cc797691c47bc8a3b4793eb
|