powershap
Feature selection using statistical significance of shap values
What it is and what it does
Powershap is a feature selection method that combines Shapley value analysis with statistical hypothesis testing to identify which features are genuinely informative. It works by training multiple models on different data subsets, each time adding a random uniform feature as a baseline. For each feature, it calculates mean absolute Shapley values across iterations and compares them statistically to the random feature's impact using a percentile-based p-value test. Features with p-values below a threshold (default 0.01) are selected as significant.
The package includes an automatic mode that avoids manual hyperparameter tuning by using effect size and statistical power calculations to determine how many iterations are needed to achieve a target power level (default 0.99). It supports various model types—linear, tree-based, and deep learning—for both classification and regression, and integrates with scikit-learn conventions. The five runtime dependencies (catboost, pandas, scikit-learn, shap, statsmodels) are standard data science libraries.
Use it for:
- Reduce dataset dimensionality before training a production model by identifying statistically significant predictive features.
- Compare feature importance across different model types to find consensus on which features matter most.
- Validate domain expertise by testing whether known important features rank above random noise in a statistical test.
- Automate feature selection in pipelines without manual threshold tuning, using the automatic mode's power-based iteration scheduling.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Powershap performs feature selection by testing whether each feature's Shapley values are statistically significantly larger than a random feature's, using hypothesis testing and automatic power calculations to determine the required iterations.
Yes, with conditions. Powershap is a solid choice if you need statistically grounded feature selection and can tolerate aging maintenance (last update 323 days ago, no recent commits). The automatic mode removes hyperparameter tuning friction, and it integrates well with scikit-learn workflows. However, verify that its power-calculation defaults and statistical assumptions fit your problem domain before relying on it for critical feature selection decisions.
Install
powershap on PyPI
pip
pip install powershapuv
uv add powershappoetry
poetry add powershapInstalling powershap
Before you install
Low install friction with a pure Python wheel. Maintenance status is aging—last commit was 2025-10-07 and the package has not been updated in 323 days, though the repository remains active and not archived.
License in practice
MIT license permits commercial and private use with minimal restrictions, requiring only attribution and inclusion of the license text.
Quickstart
pip install powershap
from powershap import PowerShap
from catboost import CatBoostClassifier
X, y = ... # your classification dataset
selector = PowerShap(model=CatBoostClassifier(n_estimators=250, verbose=0, use_best_model=True))
selector.fit(X, y)
X_selected = selector.transform(X)
Requires Python 3.9 or later (supports up to 3.13). Runtime dependencies include catboost, pandas, scikit-learn, shap, and statsmodels.
Verify before relying
- Whether automatic mode's power requirement default of 0.99 and false positive probability of 0.01 are appropriate for typical use cases.
- Performance and scalability characteristics on datasets with hundreds or thousands of features.
- How the method handles imbalanced classification or regression with heavy-tailed distributions.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (<=3.13,>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 5 — catboost, pandas, scikit-learn, shap, statsmodels |
| Maintenance | aging — 323 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 117,711/month — #12,151 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: powershap-0.1.0.1-py3-none-any.whl
Keywords: data-science, feature selection, machine learning, shap
Tags
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to…
permissive · top 100 on PyPI
huggingface-hubClient library and CLI tool for downloading,…
permissive · top 100 on PyPI
langchainLangChain provides a framework for building…
permissive · top 1,000 on PyPI
hf-xethf-xet provides chunk-based deduplication and…
permissive · top 1,000 on PyPI
tokenizersTokenizers converts raw text into token…
permissive · top 1,000 on PyPI
transformersTransformers provides a unified framework for…
permissive · top 1,000 on PyPI
BorutaBoruta performs all-relevant feature selection…
permissive · top 15,000 on PyPI
diptestComputes Hartigan's dip test statistic and…
copyleft · top 15,000 on PyPI
shapSHAP computes Shapley values to explain…
permissive · top 5,000 on PyPI
powerlawFits heavy-tailed distributions like power laws…
permissive · top 15,000 on PyPI
tsfreshAutomatically extracts hundreds of time-series…
permissive · top 15,000 on PyPI
hyppohyppo provides multivariate hypothesis testing…
permissive · top 15,000 on PyPI
azureml-train-automlAutomatically discovers and trains the best…
unclear · top 15,000 on PyPI
aplrAPLR builds interpretable regression and…
permissive · top 15,000 on PyPI
bootstrappedBuilds confidence intervals from data samples…
unclear · top 15,000 on PyPI
momentchi2Computes the cumulative distribution function…
permissive · top 15,000 on PyPI