Skip to main content

Robust Graph-Grouped Permutation Importance (R-GGPI)

License: MIT Python 3.8+ Scikit-Learn Compatible

R-GGPI is a fast, collinearity-resilient feature attribution and selection package designed for complex tabular machine learning models.

Traditional Permutation Feature Importance (PFI) breaks down under multi-collinearity because independent shuffling destroys joint feature distributions, while game-theoretic alternatives like TreeSHAP suffer from severe combinatorial computational explosion on large datasets. R-GGPI bridges this gap by combining Minimum Spanning Tree (MST) graph partitioning, Target-Aware Branch Anchoring, and an Adaptive Complexity Cost Gate for intelligent multi-core parallelization.


Key Features

  • Collinearity Resilience: Groups redundant features into disconnected MST coalition branches and permutes them jointly, preserving real-world data manifolds.
  • Target-Aware Branch Anchoring: Prevents low-importance "hitchhiker" variables from draining attribution credit away from primary predictive features within a shared cluster.
  • Extreme Scalability: Achieves up to an 84x speedup over TreeSHAP and 5.6x over standard PFI on large datasets ($N = 20,000$).
  • Smart Complexity Gating: Automatically detects runtime workload dimensionality ($\mathcal{K} = N \cdot M \cdot R$) to bypass Python multiprocessing overhead on light tasks and scale seamlessly on heavy enterprise tables.
  • Scikit-Learn API Integration: Fully compatible with Scikit-Learn pipelines via BaseEstimator and TransformerMixin.

Installation

After the package has been published, install it from PyPI:

pip install r-ggpi

Or install the repository in editable mode, including the test dependencies:

git clone https://github.com/deepnovus/r-ggpi.git
cd r-ggpi
pip install -e ".[test]"

Run the test suite with:

pytest

Example

The basic usage example generates synthetic data, fits a model, reports R-GGPI feature importance, and demonstrates selecting features before fitting a second model. Run it from the project root after installing the package:

python examples/basic_usage.py

Build the source distribution and wheel with:

python -m pip install build
python -m build

Metadata

Release files for r-ggpi 1.0.1

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

Source distribution (sdist)

Source distribution for r-ggpi 1.0.1
File Size Uploaded
r_ggpi-1.0.1.tar.gz 8.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for r-ggpi 1.0.1
File Interpreter ABI Platform
r_ggpi-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 15.2 kB

Release files / r_ggpi-1.0.1.tar.gz

Download URL r_ggpi-1.0.1.tar.gz
Size 8.0 kB
Tags Source
SHA-256 checksum
How to use checksums
872f1c13101cbb6a95fe26a005309ef5ae0ddd76c529c7a54ba6dffe32ec9ccf
BLAKE2b-256 checksum
How to use checksums
6f8f48ae43ebcc0aa6d82a0d7481b54c5471011e6fc601d7d82862a59813a2fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.0

Release files / r_ggpi-1.0.1-py3-none-any.whl

Download URL r_ggpi-1.0.1-py3-none-any.whl
Size 7.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ef7b1c0140a9c3f7d97db415ee9f4f3d1a302bd921f0372ac46f6bd72ab68c20
BLAKE2b-256 checksum
How to use checksums
f931634efce43bc17704e2a6817a26e8a1b0da8c6d473b37785e1af440f7cb87
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.0

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

0.1.0

2 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