Thiago Duvanel
163 words
1 minutes
SHAP and its uses!
2025-05-17

SHAP (SHapley Additive exPlanations)#

SHAP Values are a way to explain the output of any machine learning model, using a game theoretic approach, showing how each feature affects each final prediction. SHAP is model-agnostic, meaning that it can be used to interpret any model.

SHAP works in a very simple way: it calculates the contribution of each feature to the final prediction comparing the specific result with the average prediction. It does this by considering all possible combinations of features and their contributions to the final prediction.

Between its good points, we can highlight:

  • Debugging for finding errors in the model
  • Human friendly explanations
  • Data exploration

SHAP meaning#

SHAP comes from Shapley values, a concept from cooperative game theory. The idea is to assign a value to each player (feature) based on their contribution to the total value of the game (prediction). The Shapley value is a way to fairly distribute the total value among the players based on their contributions.

The Values#

  • Additivity
  • Local accuracy
  • Missingness
  • Consistency

References#

SHAP and its uses!
https://th-duvanel.github.io/posts/shap/
Author
Thiago Duvanel Fereira
Published at
2025-05-17