Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ksharma67/partial-dependent-plots-individual-conditional-expectation-plots-with-shap
The goal of SHAP is to explain the prediction of an instance x by computing the contribution of each feature to the prediction. The SHAP explanation method computes Shapley values from coalitional game theory. The feature values of a data instance act as players in a coalition.
https://github.com/ksharma67/partial-dependent-plots-individual-conditional-expectation-plots-with-shap
eda individual-conditional-expectation matplotlib numpy pandas partial-dependence-plot python seaborn shap shapley-additive-explanations sklearn xgboost
Last synced: about 2 months ago
JSON representation
The goal of SHAP is to explain the prediction of an instance x by computing the contribution of each feature to the prediction. The SHAP explanation method computes Shapley values from coalitional game theory. The feature values of a data instance act as players in a coalition.
- Host: GitHub
- URL: https://github.com/ksharma67/partial-dependent-plots-individual-conditional-expectation-plots-with-shap
- Owner: ksharma67
- Created: 2022-12-03T17:59:57.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-12-03T18:07:05.000Z (about 2 years ago)
- Last Synced: 2024-11-06T12:48:59.171Z (3 months ago)
- Topics: eda, individual-conditional-expectation, matplotlib, numpy, pandas, partial-dependence-plot, python, seaborn, shap, shapley-additive-explanations, sklearn, xgboost
- Language: Jupyter Notebook
- Homepage:
- Size: 1.07 MB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Partial-Dependent-Plots-Individual-Conditional-Expectation-Plots-With-SHAP
SHAP (SHapley Additive exPlanations) is a method to explain individual predictions. SHAP is based on the game theoretically optimal Shapley values.
The goal of SHAP is to explain the prediction of an instance x by computing the contribution of each feature to the prediction.
The SHAP explanation method computes Shapley values from coalitional game theory.
The feature values of a data instance act as players in a coalition.
Shapley values tell us how to fairly distribute the “payout” (= the prediction) among the features. A player can be an individual feature value, e.g. for tabular data.
A player can also be a group of feature values.1. Modeling
Training an advanced Gradient Boosting (XGBoost) Regression model Evaluate the model on the Validation Root Mean Squared Error metric.
2. SHAP Values
Creating a shap explainer from gradient boosting model
Explaining individual train (or test) data points on their contribution to the outcome.
The visualization shows features each contributing to push the model output from the base value (the average model output over the training dataset we passed) to the model output. Features pushing the prediction higher are shown in red, those pushing the prediction lower are in blue.