SHAP-Enhanced: Advanced Explainability Toolkit¶
Overview¶
SHAP-Enhanced is a research-focused Python library providing a unified, extensible platform for developing, benchmarking, and analyzing advanced SHAP (SHapley Additive exPlanations) variants for tabular, sequential, and sparse data.
Implements state-of-the-art and experimental SHAP explainers with a clean, consistent interface.
Supports time series, LSTM, attention models, sparse (binary/one-hot) data, hierarchical and multi-baseline explainers, and more.
Built for scientific benchmarking, model debugging, and real-world explainability studies.
This framework is created following PEP8 standards, Sphinx documentation format, and is released under the GNU Affero General Public License v3.0.
Official documentation is hosted on GitHub Pages:
This site provides comprehensive API reference, tutorials, and examples. Documentation is automatically generated from the source code and kept up to date with the latest release.
Installation¶
PyPI Installation (Recommended)¶
Install the latest stable version from PyPI:
pip install shap-enhanced
Optional Dependencies¶
Install with additional features:
# Development dependencies (testing, linting, type checking)
pip install "shap-enhanced[dev]"
# Documentation dependencies
pip install "shap-enhanced[docs]"
# Example dependencies (Jupyter, visualization tools)
pip install "shap-enhanced[examples]"
# All dependencies
pip install "shap-enhanced[dev,docs,examples]"
Development Installation¶
For contributing or local development:
git clone https://github.com/niyangbai/enhanced_shap.git
cd enhanced_shap
pip install -e ".[dev]"
Contributing¶
We welcome contributions to SHAP-Enhanced! Whether you’re fixing bugs, adding features, or improving documentation, your help is appreciated.
Quick Start for Contributors¶
Fork this repository and clone your fork
Set up development environment:
pip install -e ".[dev]"
Create a branch for your feature or bugfix
Make changes and add tests
Run quality checks:
black src tests && ruff check src tests && mypy src
Run tests:
pytest
Submit a pull request
For detailed contribution guidelines, please see CONTRIBUTING.md.
Code Quality Standards¶
License¶
This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0). See the LICENSE file for details.
Note: Any modified versions must also be made publicly available under the same license if deployed.
About¶
- Master Thesis — Enhanced SHAP for Sequential and Sparse Data in Predictive Process Monitoring
- University: Friedrich-Alexander-Universität Erlangen-Nürnberg
Contact¶
For inquiries, please reach out via GitHub Issues.