Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

model-explanation

Skill by aliyun

model-explanation explains the decisions of a trained XGBoost model using SHAP. It produces a Markdown report with global feature importance, single-sample explanations and feature interaction analysis. It suits users asking why a model made a prediction.

  • Score 71
  • 645 stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install model-explanation

Built from the published package, never by AI.

git clone --depth 1 https://github.com/aliyun/qwen-dianjin /tmp/qwen-dianjin && mkdir -p ~/.claude/skills && cp -r /tmp/qwen-dianjin/DianJin-SKILLS/financial-engineering-expert/model-explanation ~/.claude/skills/model-explanation

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install model-explanation in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

model-explanation is a skill that explains a trained XGBoost model using SHAP (SHapley Additive exPlanations). It runs a Python script, explainer.py, which takes a model file in XGBoost JSON format, a data file in parquet or csv format, and the name of the target column.

The skill generates a Markdown report with a SHAP summary plot, a bar plot, a feature importance table, force and waterfall plots for a chosen sample, and dependence plots for feature pairs. It is aimed at users who ask which features matter most, why a model predicted something, or how a score was produced. It does not train models or select features. The source points to xgb-modeling for training and feature-analysis for pre-modeling feature quality.

Written from the project's SKILL.md and checked against it.

What it can do

  • Global feature importanceShows which features drive the model overall, with a SHAP summary plot and bar plot.
  • Single-sample explanationExplains one prediction with a force plot, a waterfall plot and feature value comparisons.
  • Feature interaction analysisCreates dependence plots and an interaction heatmap for a chosen pair of features.
  • Markdown reportWrites model_explanation_report.md with sections for overview, global, sample and interaction results.
  • Automatic feature listReads the feature list from the model's _meta.json file when --features is not passed.

What you need

  • Python
  • A trained XGBoost model saved in JSON format
  • shap and matplotlib libraries
  • xgboost, pandas and numpy libraries

Try asking

  • Why did the model give this customer a high risk score?
  • Which features are most important in my trained XGBoost model?
  • Explain the prediction for sample 1001 in my dataset.

Good to know

  • Supports only XGBoost JSON model files.
  • The --sample_id value is a integer row index, not a business ID.
  • Global SHAP calculation on large datasets may take a long time.
  • Does not train models or perform feature selection.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: DianJin-SKILLS/financial-engineering-expert/model-explanation/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Alternatives to model-explanation

All alternatives →
kaggle-cliKaggle
94

Guides an assistant through the Kaggle CLI, covering competitions, datasets, notebooks, models, benchmarks, authentication and quota. It is for people who use the kaggle command-line tool.

AAA Skill 7.7k
bigquery-bigframesgoogle
94

Generates Python code that uses BigQuery DataFrames (BigFrames) for data processing, analysis and machine learning on BigQuery. It is meant for Python data tasks, and the source says to use bigquery-basics for SQL-first workflows.

AAA Skill 25k
data-loadingmicrosoft
94

Discovers connected data sources and proposes loading options when a workspace lacks the data a question needs. Suited to users who want to connect database, warehouse or cloud sources from the chat.

AAA Skill 18k
data-manager-api-setupgoogle
94

Guides developers through enabling the Data Manager API, setting up Application Default Credentials, and installing its client libraries. Built for developers who are getting started with the API and need local environment and access setup.

AAA Skill 25k
managed-airflow-dag-authoringgoogle
94

Guides authoring and validating Apache Airflow DAGs for Managed Service for Apache Airflow (MSAA), formerly Cloud Composer. Built for developers who create or extend Airflow DAGs in these environments.

AAA Skill 25k
data-feedsdavila7
94

Extracts structured JSON data from over 40 websites, including Amazon, LinkedIn, Instagram, TikTok, Facebook and YouTube. Built on Bright Data's Web Data APIs, it returns product details, profiles, reviews, posts and comments from a URL.

AAA Skill 34k

Compare with kaggle-cli, bigquery-bigframes or data-loading

model-explanation: common questions

What model formats does model-explanation accept?

It supports only XGBoost JSON model files. The source notes that XGBoost 1.7 and later base_score values are fixed automatically for SHAP compatibility.

How is model-explanation different from feature-analysis?

According to the source, model-explanation explains the decision logic of an already trained model, while feature-analysis examines feature quality before modeling.

What does the sample ID refer to?

The source says --sample_id is the integer index of the data frame, not a business ID.

How do I install model-explanation?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is model-explanation free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is model-explanation safe to use?

It scores 71 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to model-explanation?

Similar skills: kaggle-cli, bigquery-bigframes, data-loading, data-manager-api-setup.

model-explanation Install

Add to stack

Loading.