Skip to content
Back to skills

A Share Explainable Ai

ASecurity

A股可解释AI/模型归因分析。当用户说"可解释AI"、"XAI"、"SHAP"、"模型解释"、"模型归因"、"explainable"、"为什么模型这样预测"时触发。基于 cn-stock-data 获取数据,对量化模型进行可解释性分析。支持 formal/brief 两种输出风格。

  • 232 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 7, 2026
documentationpythonbash

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned September 7, 2026

npx -y skills add aifinlab/FinClaw --skill a-share-explainable-ai --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of A Share Explainable Ai?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for A Share Explainable Ai
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/aifinlab-a-share-explainable-ai/badge)](https://www.skillsdirectory.com/skills/aifinlab-a-share-explainable-ai)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: a-share-explainable-ai
description: A股可解释AI/模型归因分析。当用户说"可解释AI"、"XAI"、"SHAP"、"模型解释"、"模型归因"、"explainable"、"为什么模型这样预测"时触发。基于 cn-stock-data 获取数据,对量化模型进行可解释性分析。支持 formal/brief 两种输出风格。
---

# 可解释AI/模型归因分析助手

## 数据获取

通过 cn-stock-data skill 获取数据:
- **模型预测**: ML模型的预测结果
- **特征数据**: 输入特征矩阵
- **K线数据**: 用于验证解释合理性

## 分析工作流

### Step 1: 全局解释
- 特征重要性:Gain/Permutation/SHAP全局重要性
- 部分依赖图(PDP):特征与预测的边际关系
- 特征交互:SHAP交互值识别重要特征对
- 全局代理模型:用简单模型近似复杂模型

### Step 2: 局部解释
- SHAP值:每个特征对单个预测的贡献
- LIME:局部线性近似解释单个预测
- 反事实解释:改变哪个特征可以改变预测
- 锚点解释:找到决定预测的充分条件

### Step 3: 模型诊断
- 预测偏差分析:模型在哪些子群上表现差
- 特征泄露检测:是否存在未来信息泄露
- 概念漂移:特征-标签关系是否随时间变化
- 公平性检查:模型是否对某些行业/市值有偏

### Step 4: 解释驱动优化
- 基于SHAP的特征选择:去除负贡献特征
- 基于PDP的特征工程:发现非线性关系
- 基于解释的模型调试:修正不合理的预测逻辑
- 投资者沟通:用可解释结果说服投资决策

### Step 5: 输出报告

## 输出格式

### formal 风格(研报级)
```
# 可解释AI分析报告

## 一、全局解释
| 特征 | 重要性 | 方向 |
|------|--------|------|

## 二、局部解释
[个股SHAP瀑布图]

## 三、模型诊断
[偏差分析、漂移检测]

## 四、优化建议
[基于解释的改进方向]
```

### brief 风格(快速分析)
```
## XAI速览
- Top3特征:换手率/20日动量/ROE
- 个股解释:XX被选中因为动量强+质量高
- 模型无明显偏差
- 建议:去除2个负贡献特征
```

参考 `references/explainable-ai-guide.md` 获取详细方法论与 A股实证研究。

## 使用示例

### 示例 1: 基本使用

```python
# 调用 skill
result = run_skill({
    "param1": "value1",
    "param2": "value2"
})
```

### 示例 2: 命令行使用

```bash
python scripts/run_skill.py --input data.json
```

Files in this skill

  • SKILL.md2.4 KB
  • references/explainable-ai-guide.md522 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…