Skip to main content

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

In the browser (Pyodide / JupyterLite)

import micropip
await micropip.install("rfgboost")

Requires Pyodide/JupyterLite ≥ 0.29. rfgboost ships a WASM wheel tagged pyemscripten_2025_0_wasm32 (the only wasm platform tag PyPI accepts); micropip gained support for that tag in Pyodide 0.29, so on older runtimes (0.28.x) micropip.install("rfgboost") fails with "Can't find a pure Python 3 wheel." The categorical/WOE path (WoeEncoder) is unavailable in-browser — fastwoe-rs has no WASM wheel — but the numeric RFGBoost* estimators work.

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

Metadata

Release files for rfgboost 0.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rfgboost 0.2.3
File Size Uploaded
rfgboost-0.2.3.tar.gz 850.4 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for rfgboost 0.2.3
File
rfgboost-0.2.3-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details
rfgboost-0.2.3-cp39-abi3-pyemscripten_2025_0_wasm32.whl CPython 3.9 abi3 PyEmscripten 2025.0+ WebAssembly Details
rfgboost-0.2.3-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 abi3 Linux glibc 2.17+ x86-64 Details
rfgboost-0.2.3-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.9 abi3 Linux glibc 2.17+ ARM64 Details
rfgboost-0.2.3-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details
rfgboost-0.2.3-cp39-abi3-macosx_10_12_x86_64.whl CPython 3.9 abi3 macOS 10.12+ x86-64 Details

Total release size: 3.9 MB

Release files / rfgboost-0.2.3.tar.gz

Download URL rfgboost-0.2.3.tar.gz
Size 850.4 kB
Tags Source
SHA-256 checksum
How to use checksums
bfc9b38a2300cb4449a907b9ed245f1c4b553144aaa4e3ef94bb7c6e129a240c
BLAKE2b-256 checksum
How to use checksums
430988ff8e6b9c0fae7b07a23724e6d2e2a7cc7e968d01789bb86f98f2197997
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release files / rfgboost-0.2.3-cp39-abi3-win_amd64.whl

Download URL rfgboost-0.2.3-cp39-abi3-win_amd64.whl
Size 458.4 kB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
00f6a9fd38b31e7244a344400948b80c341911f1e7de975c697dfcb64a9a35d9
BLAKE2b-256 checksum
How to use checksums
7a8d699f4766a15246d81893cda4be37f675733037e17d6bf92a9e83a5f97353
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release files / rfgboost-0.2.3-cp39-abi3-pyemscripten_2025_0_wasm32.whl

Download URL rfgboost-0.2.3-cp39-abi3-pyemscripten_2025_0_wasm32.whl
Size 218.6 kB
Tags CPython 3.9 PyEmscripten 2025.0+ WebAssembly abi3
SHA-256 checksum
How to use checksums
5bb462285eba762171973a49d4878cc0035353afce5df9352b17fbc8a4e3adcf
BLAKE2b-256 checksum
How to use checksums
320da2b701afd2204d64cc96c3102af9fb6071f1848869a026f3c4b8a6eb7c74
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release files / rfgboost-0.2.3-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL rfgboost-0.2.3-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 637.3 kB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
d31601a589949a269e3b4fa145ab994bff2aab9900910cd5fb6277e0c19feac1
BLAKE2b-256 checksum
How to use checksums
1f48cd054130f246902612c11deba5c100a18e0dbd196e25df83dbd4a0c6ecb0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release files / rfgboost-0.2.3-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL rfgboost-0.2.3-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 623.6 kB
Tags CPython 3.9 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
c7551cf253bcdb77d42a926cd97c66622c746c360efca9997cdc2513e99014ad
BLAKE2b-256 checksum
How to use checksums
c30f8fdcb10c84e1003a92c6a9012c5fa593fdff8aade5734db0bed1e1e72b8e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release files / rfgboost-0.2.3-cp39-abi3-macosx_11_0_arm64.whl

Download URL rfgboost-0.2.3-cp39-abi3-macosx_11_0_arm64.whl
Size 556.1 kB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
9720f540259bae1bc0ef0a1b929d1b1e87f98768ba6053e7a4fb9619688fd767
BLAKE2b-256 checksum
How to use checksums
809892ebc9434b2ce96a7f15d473419310646cf220932b6490bbf78bb0bcd983
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release files / rfgboost-0.2.3-cp39-abi3-macosx_10_12_x86_64.whl

Download URL rfgboost-0.2.3-cp39-abi3-macosx_10_12_x86_64.whl
Size 569.5 kB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
d10d568510850f4b77751366b5ca6cf283885b52a2adb38e4a4d183b8b302dcd
BLAKE2b-256 checksum
How to use checksums
5036ca00317b162c20dde153f492d5f8f761e0b921e2bd82e876641c6e25accd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release history Release notifications | RSS feed

This release

0.2.3 This release

7 release files

0.2.2

7 release files

0.2.0

7 release files

0.1.2

7 release files

0.1.1

7 release files

0.1.0

30 release 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