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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rfgboost-0.2.3.tar.gz (850.4 kB view details)

Uploaded Source

Built Distributions

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

rfgboost-0.2.3-cp39-abi3-win_amd64.whl (458.4 kB view details)

Uploaded CPython 3.9+Windows x86-64

rfgboost-0.2.3-cp39-abi3-pyemscripten_2025_0_wasm32.whl (218.6 kB view details)

Uploaded CPython 3.9+PyEmscripten 2025.0 wasm32

rfgboost-0.2.3-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (637.3 kB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ x86-64

rfgboost-0.2.3-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (623.6 kB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ ARM64

rfgboost-0.2.3-cp39-abi3-macosx_11_0_arm64.whl (556.1 kB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

rfgboost-0.2.3-cp39-abi3-macosx_10_12_x86_64.whl (569.5 kB view details)

Uploaded CPython 3.9+macOS 10.12+ x86-64

File details

Details for the file rfgboost-0.2.3.tar.gz.

File metadata

  • Download URL: rfgboost-0.2.3.tar.gz
  • Upload date:
  • Size: 850.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for rfgboost-0.2.3.tar.gz
Algorithm Hash digest
SHA256 bfc9b38a2300cb4449a907b9ed245f1c4b553144aaa4e3ef94bb7c6e129a240c
MD5 213429847a3ba7a71f86f083e8624a36
BLAKE2b-256 430988ff8e6b9c0fae7b07a23724e6d2e2a7cc7e968d01789bb86f98f2197997

See more details on using hashes here.

File details

Details for the file rfgboost-0.2.3-cp39-abi3-win_amd64.whl.

File metadata

  • Download URL: rfgboost-0.2.3-cp39-abi3-win_amd64.whl
  • Upload date:
  • Size: 458.4 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

Hashes for rfgboost-0.2.3-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 00f6a9fd38b31e7244a344400948b80c341911f1e7de975c697dfcb64a9a35d9
MD5 211674aa1e9171ce65a4aff204169a9b
BLAKE2b-256 7a8d699f4766a15246d81893cda4be37f675733037e17d6bf92a9e83a5f97353

See more details on using hashes here.

File details

Details for the file rfgboost-0.2.3-cp39-abi3-pyemscripten_2025_0_wasm32.whl.

File metadata

File hashes

Hashes for rfgboost-0.2.3-cp39-abi3-pyemscripten_2025_0_wasm32.whl
Algorithm Hash digest
SHA256 5bb462285eba762171973a49d4878cc0035353afce5df9352b17fbc8a4e3adcf
MD5 a5aa8ecfa50188617274e96ba4684eea
BLAKE2b-256 320da2b701afd2204d64cc96c3102af9fb6071f1848869a026f3c4b8a6eb7c74

See more details on using hashes here.

File details

Details for the file rfgboost-0.2.3-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for rfgboost-0.2.3-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d31601a589949a269e3b4fa145ab994bff2aab9900910cd5fb6277e0c19feac1
MD5 8f52408bde040312e42e6eff1216abce
BLAKE2b-256 1f48cd054130f246902612c11deba5c100a18e0dbd196e25df83dbd4a0c6ecb0

See more details on using hashes here.

File details

Details for the file rfgboost-0.2.3-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for rfgboost-0.2.3-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 c7551cf253bcdb77d42a926cd97c66622c746c360efca9997cdc2513e99014ad
MD5 e819e687325c13689ade9c9b5aed0410
BLAKE2b-256 c30f8fdcb10c84e1003a92c6a9012c5fa593fdff8aade5734db0bed1e1e72b8e

See more details on using hashes here.

File details

Details for the file rfgboost-0.2.3-cp39-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for rfgboost-0.2.3-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9720f540259bae1bc0ef0a1b929d1b1e87f98768ba6053e7a4fb9619688fd767
MD5 a6d374436875f68fa097841a1cf395c9
BLAKE2b-256 809892ebc9434b2ce96a7f15d473419310646cf220932b6490bbf78bb0bcd983

See more details on using hashes here.

File details

Details for the file rfgboost-0.2.3-cp39-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for rfgboost-0.2.3-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 d10d568510850f4b77751366b5ca6cf283885b52a2adb38e4a4d183b8b302dcd
MD5 e60381a89dd0b073f957a20ba998e473
BLAKE2b-256 5036ca00317b162c20dde153f492d5f8f761e0b921e2bd82e876641c6e25accd

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.3 This release

7 files

0.2.2

7 files

0.2.0

7 files

0.1.2

7 files

0.1.1

7 files

0.1.0

30 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