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
Our Free Plans just got better! | Auth0 Icon
Our Free Plans just got better! | Auth0

With up to 25k MAUs and unlimited Okta connections, our Free Plan lets you focus on what you do best—building great apps.

You asked, we delivered! Auth0 is excited to expand our Free and Paid plans to include more options so you can focus on building, deploying, and scaling applications without having to worry about your security. Auth0 now, thank yourself later.
Try free now
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