--- id: powershap version: "0.1.0.1" license: MIT license_treatment: permissive maintenance: aging --- # powershap — Feature selection using statistical significance of shap values License: permissive · Maintenance: aging · Downloads: 117.7K/mo ## 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 above — 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 pip install powershap uv add powershap poetry add powershap ## Installing 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_current - Install friction: low - Maintenance: aging - Downloads: 117.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags feature selection shapley values, statistical feature importance, wrapper feature selection, shap-based feature ranking, automatic feature selection machine learning, feature-selection, interpretability, statistical-testing [View on SkillFed](https://skillfed.io/packages/powershap) · [View on PyPI](https://pypi.org/project/powershap/)