Skip to contentScholarGate
LibraryBookshelfDeskReview StudioAssistant
Sign in
On this page
IntuitionHow it worksWhen to use itStrengths & limitationsCommon pitfallsApplicationsFrequently asked🔒 Read the full methodSourcesRelated methods
Cite this pageSpotted an issue on this page? Report or suggest a fix →
Home›Machine learning›SHAP (SHapley Additive exPlanations)
Machine learning

SHAP (SHapley Additive exPlanations)

Also known as: SHAP Değerleri (Model Açıklanabilirlik), Shapley additive explanations, SHAP values, model explainability

SHAP is a model-explanation method, introduced by Scott Lundberg and Su-In Lee in 2017, that uses Shapley values from cooperative game theory to measure how much each feature contributes to an individual prediction, making the output of black-box machine-learning models interpretable. It supports both global explanations (overall feature importance) and local explanations (why one specific prediction came out the way it did).

ScholarGate
  1. Machine learning
  2. v1
  3. 1 Sources
  4. PUBLISHED
Cite this page →
Tools & resources
Download slides
Learn & explore

Read the full method

Members only

Sign in with a free account to read this section.

Sign in

Method map

The neighbourhood of related methods — select a node to explore.

SHAP
Decision TreeGaussian Mixture ModelLogistic RegressionRandom ForestXGBoostExplainable LightGBMExplainable Voting Ensem…t-SNE

When to use it

Use SHAP when you already have a trained black-box model (such as XGBoost, random forest, or deep learning) on cross-sectional or panel data with continuous, categorical, or binary features, and you need to explain its predictions rather than just report accuracy. It works at both the global level (which features matter overall) and the local level (why one case was predicted as it was). At least about 30 observations are needed; below that, SHAP values become unstable and a directly interpretable model such as a decision tree is safer.

Strengths & limitations

Strengths
  • Turns black-box models into interpretable ones by attributing each prediction to its features.
  • Provides both global feature importance and local single-prediction explanations from one framework.
  • Grounded in Shapley values from game theory, giving the attributions a principled, additive fairness basis.
  • TreeSHAP gives fast, exact explanations for tree-based models such as random forest and XGBoost.
  • KernelSHAP is model-agnostic, so the same approach applies to almost any trained model.
Limitations
  • Requires an already-trained ML model; SHAP explains a model, it does not build one.
  • On small samples (n below about 30) SHAP values are unstable and feature contributions become unreliable.
  • KernelSHAP is model-agnostic but computationally slow, especially on large datasets or many features.
  • Attributions describe the model's behaviour, not the true causal effect of a feature in the world.

Frequently asked

Do I need to retrain my model to use SHAP?

No. SHAP explains a model you have already trained — such as XGBoost, a random forest, or a deep network — by attributing its existing predictions to the input features. It does not refit or change the model.

What is the difference between TreeSHAP and KernelSHAP?

TreeSHAP computes exact SHAP values quickly for tree-based models like random forest and XGBoost. KernelSHAP is model-agnostic and works for any model, but it is an approximation and is considerably slower, especially on large data.

Can SHAP explain a single prediction?

Yes. That is its local mode: for one case it shows how much each feature pushed the prediction above or below the baseline, with the contributions adding up exactly to the prediction. Aggregating these across the dataset gives global feature importance.

How much data do I need?

At least about 30 observations. Below that, SHAP values become unstable and feature contributions unreliable, so a directly interpretable model such as a decision tree is the safer choice.

Sources

  1. Lundberg, S.M. & Lee, S.-I. (2017). A Unified Approach to Interpreting Model Predictions. Advances in Neural Information Processing Systems, 30, 4766–4777. link ↗

How to cite this page

ScholarGate. (2026, June 1). SHAP (SHapley Additive exPlanations). ScholarGate. https://scholargate.app/en/machine-learning/shap-analysis

Related methods

Decision TreeGaussian Mixture ModelLogistic RegressionRandom ForestXGBoost

Which method?

Set this method beside its closest kin and read them side by side — the library lays the books on the table; the choice is yours.

  • Decision TreeMachine learning↔ compare
  • Gaussian Mixture ModelMachine learning↔ compare
  • Logistic RegressionResearch Statistics↔ compare
  • Random ForestMachine learning↔ compare
  • XGBoostMachine learning↔ compare
Compare side by side →

Referenced by

Explainable LightGBMExplainable Voting Ensemblet-SNE

Similar methods

Explainable Random ForestExplainable XGBoostExplainable Gradient BoostingExplainable LightGBMExplainable Extra TreesExplainable Support Vector MachineExplainable Multilayer PerceptronExplainable Isolation Forest

Related reference concepts

Ensemble MethodsMachine LearningSupervised LearningModel Evaluation and SelectionHyperparameter OptimizationSupport Vector Machines and Kernel Methods

Spotted an issue on this page? Report or suggest a fix →

ScholarGate — SHAP (SHAP (SHapley Additive exPlanations)). Retrieved 2026-07-21 from https://scholargate.app/en/machine-learning/shap-analysis · Dataset: https://doi.org/10.5281/zenodo.20539026
Quick facts
Originator
Lundberg, S.M. & Lee, S.-I.
Year
2017
Type
Model-explanation method (Shapley-value attribution)
Task
Interpreting predictions of trained ML models
Scope
Global (feature importance) and local (single-prediction) explanations
MinSample
30
Related methods
Decision TreeGaussian Mixture ModelLogistic RegressionRandom ForestXGBoost
ScholarGate

A content-first reference library for research methods — what each one is, how it works, and where it comes from.

Open data (CC-BY)

Explore

  • Library
  • Search the library…
  • Browse by field
  • Fields
  • Journey
  • Compare
  • Which method?

Reference

  • Subjects
  • Atlas
  • Glossary
  • Methodology
  • Philosophy

Your tools

  • Bookshelf
  • Desk
  • Chat

Company

  • About
  • Pricing
  • Contact
  • Suggest a method

Entries are compiled from published sources for reference. Verifying the accuracy and suitability of any information for your own use remains your responsibility.

© 2026 ScholarGate · A research-method reference library
  • Privacy
  • Cookies
  • Terms
  • Delete account