One-click install
npx skills add https://github.com/Estrella-231/Mathematical_modeling_tongmeng --skill shap-estrella-231
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: shap
Source: https://github.com/Estrella-231/Mathematical_modeling_tongmeng/tree/main/.agents/skills/shap
Command: npx skills add https://github.com/Estrella-231/Mathematical_modeling_tongmeng --skill shap-estrella-231

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

SHAP explains why a machine learning model produced a specific prediction by attributing that output to individual input features, helping you diagnose errors, validate behavior, and build trust in results.

Core Features & Use Cases

  • Feature attribution via Shapley values: quantify each feature’s contribution to a prediction relative to a baseline.
  • Global and local interpretability: create dataset-level importance summaries (beeswarm, bar) and instance-level explanations (waterfall, force).
  • Model-agnostic and model-specific support: handle tree-based models, linear models, deep learning models, and black-box models with the appropriate SHAP explainer.
  • Debugging, bias, and comparison workflows: inspect unexpected feature influence, check subgroup patterns, and compare explanation consistency across models.

Quick Start

Ask the skill to explain which features most influenced your model’s prediction for a single row and generate 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 which features most influenced a machine learning model's prediction?

Feature attribution using Shapley values explains model predictions by quantifying each individual feature's contribution relative to a baseline, generating both global summaries and local instance-level explanations to validate behavior.

Can I generate SHAP explanations for tree-based models and deep learning models?

Yes, SHAP supports model-specific explainers for tree-based models, linear models, deep learning models, and model-agnostic approaches for black-box predictors, computing feature attribution values using appropriate background data.

What is the best way to visualize per-instance feature contributions for a single prediction?

Standard SHAP plots like waterfall and force plots visualize per-instance feature contributions for a single prediction. These local explanations attribute model output to individual input features relative to a baseline.

How do I check bias and debug unexpected feature influence in my ML model?

Debugging and bias checks inspect unexpected feature influence and subgroup patterns by comparing explanation consistency. Dataset-level importance summaries like beeswarm and bar plots reveal global feature attribution patterns for validation.

Do I need background data to compute SHAP values for feature importance?

Yes, computing SHAP values requires selecting the correct explainer and providing appropriate background or baseline data to accurately attribute model predictions to individual features across global and local contexts.