SHAP-style explainability with enhanced methods for sequential and tabular models
Project description
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
- Code Style: We use Black for formatting
- Linting: Ruff for fast Python linting
- Type Checking: MyPy for static type analysis
- Testing: Pytest with coverage reporting
- Documentation: Google-style docstrings with Sphinx
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file shap_enhanced-0.0.1.tar.gz.
File metadata
- Download URL: shap_enhanced-0.0.1.tar.gz
- Upload date:
- Size: 1.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
55d0fafeb960f5cca329fe8c357f7cb304968f712d7ed354678b30d46a1ea696
|
|
| MD5 |
08d4c8cbee26dc278a9dd5ba40377625
|
|
| BLAKE2b-256 |
6d1d1171d0cefba91a59fbdead89a4eb5caf63423acccc1c728cc5e46f362c91
|
File details
Details for the file shap_enhanced-0.0.1-py3-none-any.whl.
File metadata
- Download URL: shap_enhanced-0.0.1-py3-none-any.whl
- Upload date:
- Size: 113.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc01ebc3b66b66a242c928ef71f586904f0270945fa67d6b560748ae4ce0e2d9
|
|
| MD5 |
1eb15b20e19f5803eceade009c4ed482
|
|
| BLAKE2b-256 |
3fae273736601a649a17960efa87566968953d549543b33ddbb698c1666b3baf
|