SHAP (SHapley Additive exPlanations) is a game theoretic approach to explain the output of any machine learning model. It connects optimal credit allocation with local explanations using the classic Shapley values from game theory and their related extensions. While SHAP can explain the output of any machine learning model, we have developed a high-speed exact algorithm for tree ensemble methods. Fast C++ implementations are supported for XGBoost, LightGBM, CatBoost, scikit-learn and pyspark tree models. To understand how a single feature effects the output of the model we can plot the SHAP value of that feature vs. the value of the feature for all the examples in a dataset. Since SHAP values represent a feature's responsibility for a change in the model output, the plot below represents the change in predicted house price as RM (the average number of rooms per house in an area) changes.

Features

  • SHAP can be installed from either PyPI or conda-forge
  • Take the mean absolute value of the SHAP values for each feature to get a standard bar plot
  • Natural language examples (transformers)
  • SHAP has specific support for natural language models
  • Deep learning examples with DeepExplainer
  • Deep SHAP is a high-speed approximation algorithm for SHAP values in deep learning models

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow SHAP

SHAP Web Site

Other Useful Business Software
Auth0 for AI Agents now in GA Icon
Auth0 for AI Agents now in GA

Ready to implement AI with confidence (without sacrificing security)?

Connect your AI agents to apps and data more securely, give users control over the actions AI agents can perform and the data they can access, and enable human confirmation for critical agent actions.
Start building today
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of SHAP!

Additional Project Details

Programming Language

Python

Related Categories

Python Machine Learning Software, Python Deep Learning Frameworks

Registered

2022-07-29