Using SHAP to explain regression models
In the previous section, we learned about different visualizations and explainers in SHAP for explaining ML models. Now, I will give you practical exposure to using SHAP for providing model explainability. The framework is available as an open source project on GitHub: https://github.com/slundberg/shap. You can get the API documentation at https://shap-lrjball.readthedocs.io/en/docs_update/index.html. The complete tutorial is provided in the GitHub repository at https://github.com/PacktPublishing/Applied-Machine-Learning-Explainability-Techniques/blob/main/Chapter06/Intro_to_SHAP.ipynb. I strongly recommend that you read this section and execute the code side by side.
Setting up SHAP
Installing SHAP in Python can be done easily using the pip installer by using the following command in your console:
pip install shap
Since the tutorial requires you to have other Python frameworks installed, you can also try the following command to...