agentsclimarketplace

Shap explainer

Skill a5c-ai/babysitter/library/specializations/data-science-ml/skills/shap-explainer

Babysitter enforces obedience on agentic workforces and enables them to manage extremely complex tasks and workflows through deterministic, hallucination-free self-orchestration

Install
npx -y skills add a5c-ai/babysitter --skill shap-explainer

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

What its author says it does

Copied from the file, not written here

SHAP-based model explainability skill for feature attribution, summary plots, and interaction analysis.

SKILL.md

3.7 KB, as published. Nobody here has run it

shap-explainer

Overview

SHAP-based model explainability skill for feature attribution, summary plots, interaction analysis, and model interpretation.

Capabilities

  • TreeExplainer for tree-based models (XGBoost, LightGBM, Random Forest)
  • DeepExplainer for neural networks
  • KernelExplainer for model-agnostic explanations
  • Summary, dependence, and force plots
  • Interaction value computation
  • Cohort-based analysis
  • Waterfall and bar plots
  • Expected value analysis

Target Processes

  • Model Interpretability and Explainability Analysis
  • Model Evaluation and Validation Framework
  • A/B Testing Framework for ML Models

Tools and Libraries

  • SHAP
  • matplotlib
  • numpy

Input Schema

{
  "type": "object",
  "required": ["modelPath", "dataPath", "explainerType"],
  "properties": {
    "modelPath": {
      "type": "string",
      "description": "Path to the trained model"
    },
    "dataPath": {
      "type": "string",
      "description": "Path to data for explanation"
    },
    "explainerType": {
      "type": "string",
      "enum": ["tree", "deep", "kernel", "linear", "gradient"],
      "description": "Type of SHAP explainer to use"
    },
    "analysisConfig": {
      "type": "object",
      "properties": {
        "numSamples": { "type": "integer" },
        "backgroundSamples": { "type": "integer" },
        "featureNames": { "type": "array", "items": { "type": "string" } },
        "outputIndex": { "type": "integer" }
      }
    },
    "plotConfig": {
      "type": "object",
      "properties": {
        "plotTypes": {
          "type": "array",
          "items": { "type": "string", "enum": ["summary", "bar", "waterfall", "force", "dependence", "interaction"] }
        },
        "maxFeatures": { "type": "integer" },
        "outputDir": { "type": "string" }
      }
    }
  }
}

Output Schema

{
  "type": "object",
  "required": ["status", "shapValues"],
  "properties": {
    "status": {
      "type": "string",
      "enum": ["success", "error"]
    },
    "shapValues": {
      "type": "string",
      "description": "Path to SHAP values file"
    },
    "expectedValue": {
      "type": "number"
    },
    "featureImportance": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "feature": { "type": "string" },
          "importance": { "type": "number" },
          "rank": { "type": "integer" }
        }
      }
    },
    "plots": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "type": { "type": "string" },
          "path": { "type": "string" }
        }
      }
    },
    "interactions": {
      "type": "object",
      "description": "Top feature interactions"
    }
  }
}

Usage Example

{
  kind: 'skill',
  title: 'Generate SHAP explanations',
  skill: {
    name: 'shap-explainer',
    context: {
      modelPath: 'models/xgboost_model.pkl',
      dataPath: 'data/test.csv',
      explainerType: 'tree',
      analysisConfig: {
        numSamples: 1000,
        backgroundSamples: 100
      },
      plotConfig: {
        plotTypes: ['summary', 'bar', 'dependence'],
        maxFeatures: 20,
        outputDir: 'explanations/'
      }
    }
  }
}

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.