Registry / ai-ml / powershap

powershap

JSON →
library0.1.0.1pypypiunverified

Powerful feature selection using statistical significance of SHAP values. Current version: 0.1.0.1. Active development, major releases every few months.

pip install powershap
INSTALL
IMPORT
SIG · POWERSHAP
P
powershap
ai-mlpythonv0.1.0.1
Install
30.0s avg
Import
Disk
1061MB
Pass rate
4/ 10
Env Coverage4 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.1.0.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✕ build_error
✓ 29.5s
py 3.11
✕ build_error
✓ 28.3s
py 3.12
✕ build_error
✓ 29.2s
py 3.13
✕ build_error
✕ build_error
py 3.9
✕ build_error
✓ 32.9s
1061MB installed
● package 1061MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

PowerShap
from powershap import PowerShap

Quickstart: fit a PowerShap selector on a classification dataset and get selected features.

from powershap import PowerShap from sklearn.datasets import make_classification from sklearn.ensemble import RandomForestClassifier import pandas as pd X, y = make_classification(n_samples=100, n_features=20, random_state=42) X = pd.DataFrame(X, columns=[f'feature_{i}' for i in range(X.shape[1])]) selector = PowerShap( model=RandomForestClassifier(), power_analysis='auto', # automatic estimation cv=5, random_state=42 ) selector.fit(X, y) print('Selected features:', selector.transform(X).columns.tolist())
Debug
Known issues
gotchaThe 'model' parameter can be a scikit-learn estimator or a pipeline. When using a pipeline, ensure the final step is an estimator.
fix
Use an estimator with .fit() and .predict() or .predict_proba() methods.
affects: >=0.1.0
gotchaPowerShap can be memory-intensive for high-dimensional data because it computes SHAP values for all features.
fix
Reduce the number of features or use a smaller sample size via the 'sample' parameter.
affects: all
deprecatedThe 'power_analysis' parameter previously accepted 'power' or 'min_power'; now 'auto' is recommended as it estimates sample size automatically.
fix
Use power_analysis='auto' to avoid manual tuning.
affects: <0.1.0
Upgrade
Version history
0.1.0.1latest on PyPI · released Sep 25, 2025
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
powershap — pip install powershap · libregistry