shap

Computes SHAP feature attributions and generates visualizations for ML models.

21|2|Updated Dec 8, 2025
One-click install
npx skills add https://github.com/silverstein/claude-scientific-skills-desktop --skill shap-silverstein
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: shap
Source: https://github.com/silverstein/claude-scientific-skills-desktop/tree/main/corpus/shap
Command: npx skills add https://github.com/silverstein/claude-scientific-skills-desktop --skill shap-silverstein

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

SHAP helps you understand why a machine learning model produced a specific prediction by attributing the output to individual feature contributions.

Core Features & Use Cases

  • Feature importance and prediction attribution: Identify which features push predictions higher or lower using Shapley-value explanations.
  • Model-wide interpretability: Summarize global feature impact with beeswarm and bar plots.
  • Debugging and validation: Diagnose unexpected behavior, investigate potential data leakage, and compare explanations across models or cohorts.
  • Visualization suite: Produce common SHAP plots including waterfall, force, scatter (dependence), and heatmap for multi-instance comparison.
  • Broad model coverage: Supports tree-based models (e.g., XGBoost/LightGBM/Random Forest), deep learning (TensorFlow/PyTorch), linear models, and black-box models via model-agnostic approaches.

Quick Start

Ask the AI to compute SHAP values for your trained model and generate both a beeswarm plot for global importance and a waterfall plot for a single prediction.

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?

You can explain machine learning model predictions by computing SHAP values, which attribute the output to individual feature contributions to identify what pushes predictions higher or lower.

What's the best way to visualize global feature impact across a whole dataset?

The best way to visualize global feature impact is by generating a SHAP beeswarm or bar plot, which summarizes the directional influence of features across all predictions in the dataset.

Can I compute SHAP values for XGBoost and deep neural networks?

Yes, you can compute SHAP values for XGBoost and deep neural networks by selecting the appropriate tree-based or deep learning explainer to calculate feature attributions for your specific model type.

How do I debug fairness and bias issues in black-box predictors?

You can debug fairness and bias issues in black-box predictors by calculating SHAP values across different cohorts to compare feature attributions and investigate potential data leakage or unexpected behavior.

Do I need to specify a baseline to generate a SHAP waterfall plot for a single prediction?

Yes, you need to specify a background baseline to calculate SHAP values, which allows the explainer to generate a waterfall plot showing exactly how features push a single prediction away from that baseline.