Skip to main content

GeoRF — Geometry-Aware Random Forest

GeoRF replaces bootstrap resampling with HVRT-powered generative diversity. Each tree trains on a completely unique synthetic dataset drawn from learned per-partition kernel density estimates. No tree ever sees a real sample. No two trees share a single training point.

Why?

Bootstrap bagging has a diversity ceiling. With n = 250 samples, each bootstrap draw contains ≈158 unique samples. GeoRF removes this ceiling: 100 trees × 500 samples = 50 000 unique synthetic training points.

See benchmark/results/ for full benchmark results comparing GeoRF against Random Forest, Gradient Boosting, XGBoost, LightGBM, and MLP (sklearn + PyTorch) on standard datasets. Run the benchmarks yourself:

cd benchmark
pip install -r requirements.txt
python run_classification.py
python run_regression.py

Install

pip install -e .          # editable
# or
pip install georf

Requirements: Python ≥ 3.10, hvrt >= 2.3.0, scikit-learn, numpy, joblib

Quick start

from georf import GeoRFClassifier, GeoRFRegressor

# Classification
clf = GeoRFClassifier(n_estimators=100, n_samples_per_tree=500, n_jobs=-1)
clf.fit(X_train, y_train)
y_pred  = clf.predict(X_test)
y_proba = clf.predict_proba(X_test)   # (n_samples, n_classes)

# Regression
reg = GeoRFRegressor(n_estimators=100, n_samples_per_tree=500, n_jobs=-1)
reg.fit(X_train, y_train)
y_pred = reg.predict(X_test)

# Interpretability
clf.feature_importances(feature_names=cols)  # dict, sorted descending
clf.tree_quality_scores()                    # per-tree AUC array
clf.diversity_score()                        # float: pairwise disagreement rate
clf.provenance()                             # dataset / expansion metadata

Parameters

Parameter Default Description
n_estimators 100 Number of trees
n_samples_per_tree 500 Synthetic samples per tree
max_depth 6 Max tree depth
min_samples_leaf 5 Min samples per leaf
max_features None Feature subsampling (None = all)
bandwidth 'auto' HVRT KDE bandwidth ('auto' = per-partition auto-selection)
n_jobs None Workers (-1 = all cores)
random_state 42 Reproducibility seed

Running tests

pip install pytest
pytest tests/
# exclude slow timing test:
pytest tests/ -m "not slow"

License

AGPL-3.0-or-later

Metadata

Release files for georf 0.1.0

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

Source distribution (sdist)

Source distribution for georf 0.1.0
File Size Uploaded Provenance
georf-0.1.0.tar.gz 37.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for georf 0.1.0
File Interpreter ABI Platform
georf-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 75.1 kB

Release files / georf-0.1.0.tar.gz

Download URL georf-0.1.0.tar.gz
Size 37.3 kB
Tags Source
SHA-256 checksum
How to use checksums
d88015df22eabb6db1b837d2cea0a67e1a052acaf4bd4db4d57c27d2498a6e06
BLAKE2b-256 checksum
How to use checksums
e7781424952f3c81ba1bd3b773c82952b6098873215a0bbff203209d3a632e42
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release files / georf-0.1.0-py3-none-any.whl

Download URL georf-0.1.0-py3-none-any.whl
Size 37.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
abd2ba5bf5ef0281e8980186b0ae55357314a9819f36f50769387b417900c329
BLAKE2b-256 checksum
How to use checksums
ef5673f23acaad3a66c7a6f0c51436a2c8fcac0eba8e41a9fa6354afe30ed743
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Security for georf 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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