SHAP (SHapley Additive exPlanations) is a game-theoretic method for explaining machine learning model predictions by assigning each input feature an importance value for a specific prediction. It provides both global feature importance and local (per-instance) explanations, making complex models like Random Forest interpretable in engineering applications.
SHAP (SHapley Additive exPlanations), introduced by Lundberg and Lee in 2017, is a unified framework for interpreting predictions of complex machine learning models. It is based on Shapley values from cooperative game theory, which provide a principled way to distribute the "payout" (the model's prediction) among the "players" (the input features) based on their marginal contributions.
The core idea is that for any prediction f(x), SHAP assigns each feature j an importance value ฯ_j that represents how much that feature contributed to pushing the prediction away from the average prediction E[f(z)]. These values satisfy a set of desirable properties: local accuracy (the sum of SHAP values equals the prediction), missingness (features that are absent contribute nothing), and consistency (if a feature's contribution increases in a modified model, its SHAP value does not decrease). The framework unifies six existing feature importance methods and provides theoretical guarantees that no other method in the same class can satisfy all these properties simultaneously.
In earthquake engineering, SHAP has become the standard tool for addressing the "black-box" concern that limits ML adoption in engineering practice. A study on rocking-induced settlement prediction used SHAP analysis to identify the slenderness ratio, rocking coefficient, maximum ground acceleration, and Arias intensity as the most influential factors on settlementโproviding transparent engineering insight beyond mere prediction accuracy. Similarly, research on post-earthquake bridge damage classification used SHAP to reveal the dominant influence of seismic intensity measures and structural attributes on damage states. In the context of beam-to-column connections with replaceable U-shaped plates, SHAP was used to interpret RF and XGBoost predictions of seismic performance indicators. This interpretability is essential for engineering decision-making, where understanding why a model predicts a certain outcome is often as important as the prediction itself.