SHAP-Enhanced: Advanced Explainability Toolkit

PyPI version Python Version CI Status Coverage Code style: black Ruff MyPy checked License: AGPL-3.0 Docs: GitHub Pages

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

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

  1. Fork this repository and clone your fork

  2. Set up development environment: pip install -e ".[dev]"

  3. Create a branch for your feature or bugfix

  4. Make changes and add tests

  5. Run quality checks: black src tests && ruff check src tests && mypy src

  6. Run tests: pytest

  7. 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.

API Reference

Indices and tables