# shap/shap

A game theoretic approach to explain the output of any machine learning model.

Repository: https://github.com/shap/shap
Canonical: https://ross.abutalabs.com/products/shap
Homepage: https://shap.readthedocs.io
Language: Jupyter Notebook
License: MIT
License Family: permissive
Topics: interpretability, machine-learning, deep-learning, gradient-boosting, shap, shapley, explainability
Last push: 2026-08-24T20:07:12+00:00

## Health v2 (maintenance only)
Score: 90/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 74, longevity 100
- inputs: {"age_days": 3571, "days_push": 9, "days_rel": 97, "gap_med": 41.5, "n_releases_24m": 9}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 25704, forks 3747 (observed 2026-08-28T04:11:38.432294+00:00)

## What it is
SHAP (SHapley Additive exPlanations) is a Python library that explains the output of any machine learning model using Shapley values from game theory. It provides fast exact algorithms for tree ensembles and model-agnostic explainers with rich visualization tools.

## Use cases
- explain predictions of an xgboost model
- compute feature importance with shapley values
- interpret a neural network's output
- visualize which features drove a model's prediction
- explain text classification model decisions
- audit model fairness and bias
- debug why a model made a specific prediction

## When to choose
- you need theoretically grounded, consistent feature attributions for any model
- you use tree ensembles like XGBoost, LightGBM, or CatBoost and want fast exact SHAP values
- you need plots and explainers for tabular, text, and image models

## When to avoid
- you only need simple built-in feature importances and not per-prediction explanations
- your dataset is so large that Shapley value computation is prohibitively expensive
- you need a non-Python environment

## Facets
- artifact type: library
- maturity: active
- function: machine-learning, data-visualization, nlp, computer-vision
- domain: machine-learning, data-science, deep-learning, artificial-intelligence
- platform: python, cross-platform
- tags: explainability, shapley-values, interpretability, feature-attribution, xgboost, model-agnostic, gpu

## Member repositories
- shap/shap (main) score 90

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:11:38.432294+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T16:56:00.253793+00:00, confidence not recorded.
  - readme: https://github.com/shap/shap (fetched 2026-08-28T04:11:38.432294+00:00, sha 485afe95720f)
  - homepage: https://shap.readthedocs.io (fetched 2026-08-29T07:52:39.019136+00:00, sha 0bba347faf32)
- Data as of 2026-08-30T08:39:29.467469+00:00.
