shap

Compute SHAP values to explain model predictions with feature contributions.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/BKZhao/MIMIC-Papers-Repro-Agent --skill shap-bkzhao
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: shap
Source: https://github.com/BKZhao/MIMIC-Papers-Repro-Agent/tree/main/.codex/skills/shap
Command: npx skills add https://github.com/BKZhao/MIMIC-Papers-Repro-Agent --skill shap-bkzhao

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

SHAP-based explanations provide faithful, local attributions for individual predictions by assigning each input feature a contribution to the model output, enabling debugging, trust-building, and fairness analyses across ML systems.

Core Features & Use Cases

  • Global features importance via SHAP value summaries (beeswarm, bar) that aggregate local attributions across the dataset
  • Local explanations for single predictions using waterfall and force plots
  • Interaction and dependence visualizations (scatter, heatmap) to reveal feature relationships and non-linear effects
  • Model-agnostic and model-specific explainers (TreeExplainer, DeepExplainer, LinearExplainer, KernelExplainer) that work with tree-based, deep learning, and linear models
  • Support for model comparison, debugging, and bias analyses by comparing SHAP profiles across cohorts

Quick Start

Train your model, create a suitable SHAP explainer, and compute SHAP values for a test set to begin interpreting predictions.

Frequently Asked Questions about shap

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I explain machine learning model predictions using feature importance?

Explain machine learning model predictions by computing SHAP values to provide feature-level contributions, assigning each input feature an attribution for individual predictions and debugging model behavior.

Can I use SHAP explainers with tree-based models and neural networks?

Yes, SHAP explainers support tree-based models, neural networks, and linear models using TreeExplainer, DeepExplainer, LinearExplainer, and KernelExplainer to compute conditional expectations for explanations.

What is the best way to visualize feature interactions and non-linear effects in a model?

Visualize feature interactions and non-linear effects using SHAP dependence plots and heatmaps, which reveal feature relationships by plotting SHAP values against feature values across the dataset.

How do I generate local and global explanations for model predictions?

Generate local explanations for single predictions using SHAP waterfall and force plots, and global feature importance by aggregating local attributions across the dataset with beeswarm and bar summaries.

Do I need a background dataset to compute SHAP values for model interpretation?

Yes, you need a representative background dataset to compute conditional expectations when applying SHAP explainers for model interpretation and feature attribution analysis.

How can I perform bias analysis and model debugging using SHAP values?

Perform bias analysis and model debugging by comparing SHAP profiles across different cohorts, enabling trust-building and fairness analyses by inspecting feature contributions for various subgroups.