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

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.0.tar.gz (843.2 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.0-cp39-abi3-win_amd64.whl (455.1 kB view details)

Uploaded CPython 3.9+Windows x86-64

rfgboost-0.2.0-cp39-abi3-pyemscripten_2025_0_wasm32.whl (215.3 kB view details)

Uploaded CPython 3.9+PyEmscripten 2025.0 wasm32

rfgboost-0.2.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (634.7 kB view details)

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

rfgboost-0.2.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (619.8 kB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ ARM64

rfgboost-0.2.0-cp39-abi3-macosx_11_0_arm64.whl (557.4 kB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

rfgboost-0.2.0-cp39-abi3-macosx_10_12_x86_64.whl (568.4 kB view details)

Uploaded CPython 3.9+macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: rfgboost-0.2.0.tar.gz
  • Upload date:
  • Size: 843.2 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.0.tar.gz
Algorithm Hash digest
SHA256 dc26cbbcd0f27b8946af026229118dc826ced91fb930559b31d2ef4cac83d8a1
MD5 86859c6c4882d27ab3d8c511db247849
BLAKE2b-256 4156f5c0892852a3f6a64d3919431a2bcb9373703850118f3c8b97fd6f3d040a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rfgboost-0.2.0-cp39-abi3-win_amd64.whl
  • Upload date:
  • Size: 455.1 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.0-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 88f25b8d1720d7e11bad57037349fa87470f96cb2afa20e867be2a171f806a07
MD5 1cef7c4bc3ede0901eed07c966aec545
BLAKE2b-256 6ae739b65f830bd866fa9697b24cf0e2177c82b44ef717074abec6786ab40526

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rfgboost-0.2.0-cp39-abi3-pyemscripten_2025_0_wasm32.whl
Algorithm Hash digest
SHA256 e3a06d63628cec3fb5d8d576259b5801015a0fabb2b16984b6c2c25ab76a7e63
MD5 47134a447f0265b048a091938f22d89c
BLAKE2b-256 3866e09de23e4e2adc81a81c3e50e89f17d16d49ac75aeba88c7f6a0efc21c70

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rfgboost-0.2.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 366c3f9d027591a0db03f608e054f677588c4fdc1e29a334738b41a9009e9cae
MD5 441e4f8a9fb4a6e101ee322452a68153
BLAKE2b-256 d4f44dd507b77511bb5d49ddea1e2110cc448dbd0eec4cc7e390194450c775aa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rfgboost-0.2.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 ff79b1ba23d7b34fcea678d48b6e117f8033c6058024edc0f8b97c282f67ad3d
MD5 21daaebc0fb2183907fe957aa1594d8b
BLAKE2b-256 71bd54e16a75cd33c6cedbf7353008321c30381403a5f88f30c3823c8b4dda56

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rfgboost-0.2.0-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 75970f0c380d4f4a821d752c4b233823d2c301630a39c480f82af649fe693612
MD5 2bfe605d2cccf92a792eadb5f059d266
BLAKE2b-256 c7468956dbc37b33c7567f204fc3bfcbec078bfab68383765df5b4f76a082c94

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rfgboost-0.2.0-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 7527d7a2b32941572349a9d00a4cf217db054165251f48f16785ed171fcf6006
MD5 7cc5a7407b0193d9d0d340ded9bcf932
BLAKE2b-256 a2e63b968d063102c25e113bd18303a52799774286f872de331dde0065f2a969

See more details on using hashes here.

Release history Release notifications | RSS feed

0.2.3

7 files

0.2.2

7 files

This release

0.2.0 This release

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