shap

Compute SHAP feature attributions and generate standardized plots for model predictions.

783|65|Updated Feb 27, 2026
One-click install
npx skills add https://github.com/LeonChaoX/qinyan-academic-skills --skill shap-leonchaox
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: shap
Source: https://github.com/LeonChaoX/qinyan-academic-skills/tree/main/skills/09-%E6%9C%BA%E5%99%A8%E5%AD%A6%E4%B9%A0%E4%B8%8E%E4%BA%BA%E5%B7%A5%E6%99%BA%E8%83%BD/shap
Command: npx skills add https://github.com/LeonChaoX/qinyan-academic-skills --skill shap-leonchaox

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you interpret and explain machine learning model predictions by computing SHAP (Shapley Additive exPlanations) feature attributions and turning them into clear insights about which features drive outcomes.

Core Features & Use Cases

  • Feature importance & prediction drivers: Quantify how each feature contributes to a single prediction (local) and overall behavior (global).
  • SHAP visual diagnostics: Generate key plots such as waterfall, beeswarm, bar, scatter (dependence), force, and heatmap to validate model logic and communicate results.
  • Debugging, fairness, and comparison: Use SHAP to investigate errors, detect bias patterns across cohorts, and compare feature influence across multiple models or model versions.

Quick Start

Ask the skill to explain why your model predicted a specific case and to produce the top contributing features with a SHAP waterfall plot.

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 and identify feature importance?

You can explain machine learning model predictions by computing SHAP feature attributions to quantify how each feature contributes to a single prediction locally and overall behavior globally, then visualize the results using standardized plots.

Can I use SHAP to check fairness and detect bias across different cohorts?

Yes, you can use SHAP to check fairness and detect bias by investigating errors and analyzing feature attributions across different cohorts, which helps identify patterns of bias in your model's behavior.

Does SHAP work with tree, linear, and deep learning black-box models?

SHAP works with tree, linear, deep learning, and black-box models by selecting an appropriate SHAP explainer for your specific model type and computing the corresponding feature attributions.

What is the best way to visualize feature attributions for model interpretability?

The best way to visualize feature attributions for model interpretability is by generating standardized SHAP plots such as beeswarm, bar, waterfall, scatter, force, and heatmap to validate model logic and communicate results.

How do I generate a waterfall plot to debug why a model predicted a specific case?

To debug why a model predicted a specific case, you ask the skill to explain the prediction, compute the SHAP values with correct output units, and produce the top contributing features visualized in a waterfall plot.