Member-only story
SHAP: Explain Any Machine Learning Model in Python
Your Comprehensive Guide to SHAP, TreeSHAP, and DeepSHAP
Motivation
Story Time!
Imagine you have trained a machine learning model to predict the default risk of mortgage applicants. All is good, and the performance is excellent too. But how does the model work? How does the model come to the predicted value?
We stood there and said that the model considers several variables and the multi-dimensional relationship and pattern are too complex to be explained in plain words.
That’s where model explainability could save the day. Among the algorithms that can dissect machine learning models, SHAP is one of the more agnostic players in the field. In this blog, we will dive deep into the following items:
- What are Shapley values?
- How to calculate them?
- How to use it in Python?
- How does SHAP support local and global explanability?
- What visualizations are available in the SHAP library?
- How do the common variants of SHAP work? — TreeSHAP & DeepSHAP
- How does LIME compare against SHAP?