Classification Model Evaluation logo

Classification Model Evaluation

Organization
QFIN-tech
classification-model-evaluation

单一分类模型标准化评估——输入含打分列和标签列的CSV文件,自动计算AUC/KS/准确率/十分桶排序性/业务指标均值,输出JSON+MD+XLSX。支持单档评估和合并评估两种模式。当用户说"模型评估""跑AUC""跑KS""分桶排序性""模型报告""打分评估""单模型评估""帮我评估这个模型"时使用。

Overview

PublisherQFIN-tech
Repositorymodel-evo
Skill nameclassification-model-evaluation
Stars
52
Forks
17
Bundled files
2
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 2 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by QFIN-tech on GitHub. Read the source before you install it.

Installation

Install the Classification Model Evaluation AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/QFIN-tech/model-evo/tree/main/model-skills/classification-model-evaluation
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/QFIN-tech/model-evo.git /tmp/model-evo
mkdir -p .claude/skills
cp -r /tmp/model-evo/model-skills/classification-model-evaluation .claude/skills/classification-model-evaluation
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Classification Model Evaluation in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Classification Model Evaluation on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Classification Model Evaluation is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

单一分类模型标准化评估

1. 输入依赖

输入必选来源说明
模型打分 CSV✅上游训练/取数上游已切分好的 train / val / oot CSV 文件,含打分列 + 二分类标签列

2. 执行命令

<skill_dir> 指本 skill 所在目录(即本文件所在目录),执行时替换为实际绝对路径,不要依赖当前工作目录。

目录模式(eval_single.py --input-dir),一次调用自动完成所有文件评估 + all 合并:

bash
python <skill_dir>/scripts/eval_single.py \
  --input-dir <data_dir> \
  --score-col score \
  --name "模型名" \
  -o <output_dir>/

目录下每个 CSV/parquet 各评估一份(version = 文件名 stem),再纵向拼接所有文件行重算指标得出 all 合并一份(version = all)。合并是真正拼接原始数据重算,非 JSON 加权近似。

3. 参数说明

eval_single.py

参数必选默认值说明
--input-dir✅-输入目录(目录下所有 CSV / parquet 各评估一份 + all 合并一份)
--score-col✅-打分列名
--name否模型名模型名称,用于输出文件名与报告标题
--label-col否label标签列名
--model-type否xgboost模型类型
--segment-cols否None分群列名,逗号分隔;None 表示不分群
--metric-cols否None业务指标列名,逗号分隔;None 表示不汇总
--hyperparams否None超参 JSON 字符串
--n-bins否10分桶数
-o / --output-dir否输入同目录输出目录

4. 输出产物

对目录下每个 CSV/parquet 各产 1 份三件套(version = 文件名 stem),再产 1 份 all 合并三件套(version = all,纵向拼接所有文件行重算指标)。共 (N+1) × 3 个文件,N 为目录下表文件数。

text
<output_dir>/
├── {name}_train_eval.{json,md,xlsx}
├── {name}_test_eval.{json,md,xlsx}
├── {name}_oot_eval.{json,md,xlsx}
└── {name}_all_eval.{json,md,xlsx}    # 全量样本整体一份(纵向拼接所有文件行重算)

4.1 产物内容

产物说明
*_eval.json标准化评估结果,classification-model-comparison 的唯一合法输入。关键字段:model_meta(身份信息)、metric_by_segment(全量 + 各客群的 AUC/KS/accuracy/precision/recall/biz_avg)、performance.score_buckets(全量 + 各客群十分桶明细)
*_eval.md人类可读报告:标题摘要行 + 按客群指标表 + 全量分桶表(含 label率/lift/召回率/累计召回/业务指标) + 模型信息
*_eval.xlsx三 Sheet:1-AUC_KS_by客群、2-分桶排序性by客群、3-全量分桶(明细)

4.2 评估口径

AUC 用 sklearn.roc_auc_score;KS = 按打分降序累计正负样本占比曲线最大差值;准确率/精确率/召回率 以 0.5 为阈值;分桶为 10 档等频降序(decile 10 = 最高分组)。all 版本 = train+test+oot 合并样本整体一份评估。

5. 与其他 skill 的关联

上下游Skill关系
上游classification-model-training训练产出打分数据,各 run 的三档评估由其管线调本脚本落 new-models/{run}/evaluation/
上游classification-model-development编排调用
下游classification-model-comparison消费 *_oot_eval.json 和 *_all_eval.json 做 N-way 对比(本 skill 为其强制前置)

6. 执行约束

约束说明
职责边界只做单一模型评估,不计算 PSI、不做多模型对比(稳定性与横向对比由 classification-model-comparison 负责)
不调用下游本 skill 不被 evaluation 直接调用 comparison,由 classification-model-development 统一编排
评估后必检评估完成后复核指标合理性(AUC/KS 区间、分桶单调性、各客群趋势一致),命中异常须明确标注

7. 异常处理

条件处理方式
找不到标签列脚本报错退出并列出可用列,检查 --label-col
AUC < 0.5标注打分方向可能反了,取反后重跑
AUC > 0.95标注疑似标签泄露,必须解释后才可采信
客群 N ≤ 50KS 标空并警告
总样本 < 200严重警告"评估结果仅供参考"
目录下无 CSV/parquet 文件报错退出

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Classification Model Evaluation AI skill do?

单一分类模型标准化评估——输入含打分列和标签列的CSV文件,自动计算AUC/KS/准确率/十分桶排序性/业务指标均值,输出JSON+MD+XLSX。支持单档评估和合并评估两种模式。当用户说"模型评估""跑AUC""跑KS""分桶排序性""模型报告""打分评估""单模型评估""帮我评估这个模型"时使用。

Why use Classification Model Evaluation on TypingMind?

Because you install it once and use it with any model. Classification Model Evaluation is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Classification Model Evaluation in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/QFIN-tech/model-evo/tree/main/model-skills/classification-model-evaluation. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Classification Model Evaluation?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Classification Model Evaluation?

As many as you like. As long as a model supports skills, you can use Classification Model Evaluation with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Classification Model Evaluation AI skill free?

Yes. It is published on GitHub by QFIN-tech under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇