Feature Analysis logo

Feature Analysis

Organization
QFIN-tech
feature-analysis

建模前对样本宽表里的候选特征做独立分析,产出特征报告(基础统计/单变量预测力 IV+AUC/训练-OOT 稳定性 PSI)。仅产报告供人工决定特征筛选,不自动剔除特征。当用户要"做特征分析/特征IV/特征PSI/建模前看一下特征"时使用。

Overview

PublisherQFIN-tech
Repositorymodel-evo
Skill namefeature-analysis
Stars
52
Forks
17
Bundled files
17
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.

  • 17 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 Feature Analysis 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/feature-analysis
  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/feature-analysis .claude/skills/feature-analysis
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Feature Analysis 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 Feature Analysis 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 Feature Analysis 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.

feature-analysis

建模前的独立特征分析:输入样本宽表 + 特征清单,输出 markdown 报告供人工判断特征质量。 不自动筛选,只给数据,筛与不筛由人决定。

1. 输入依赖

输入必选来源说明
sample.parquet✅上游 feature-matching 产出 / 用户 --data_path 指定任意路径样本宽表
feature_config.yaml✅复制 feature-analysis/config/feature_config.example.yaml 到 session 内填写含 model.{label_col, features/feature_list_source, split, dt_col} + analysis.*
特征清单✅--feature_list_source / yaml model.feature_list_source / yaml model.features见「6. 执行约束」的特征清单交互约定
feature-list.csv否feature-matching 产出,--cross_validate_csv 不传时自动从 --data_path 同目录推断交叉校验基准

2. 执行命令

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

bash
python <skill_dir>/scripts/run_analysis.py \
    --config <session_dir>/sample-features/feature-analysis/feature_config.yaml \
    --data_path <session_dir>/sample-features/feature-matching/sample.parquet \
    --output_dir <session_dir>/sample-features/feature-analysis/analysis \
    [--feature_list_source model-knowledge/assets/feature-knowledge/feature-list/feature-list-user-operation-v1.csv] \
    [--cross_validate_csv <session_dir>/sample-features/feature-matching/feature-list.csv]

配置文件落 session 内(从 feature-analysis/config/feature_config.example.yaml 复制),不落 skill 自身 config/ 目录(模板才放那里),保持 session 自包含,多 session 不互相覆盖。

3. 参数说明

参数必选默认值说明
--config✅-feature_config.yaml 路径
--data_path✅-sample.parquet 路径(.parquet 走 read_parquet,否则走 read_csv)
--output_dir✅-报告输出目录
--feature_list_source否None特征清单文件(.txt 按行 / .csv 取 feature_name 列),覆盖 yaml model.feature_list_source
--cross_validate_csv否None(自动从 --data_path 同目录推断 feature-list.csv)用于交叉校验的数据特征清单

yaml 内关键字段:

字段必填说明
model.label_col✅标签列名,仅支持二分类 0/1
model.features / model.feature_list_source见「特征清单交互约定」特征来源(与 CLI --feature_list_source 三选一,优先级见约定)
model.split✅train_range / test_range / oot_range 三档 pday 区间(8 位 YYYYMMDD,起 ≤ 止,三档时序递增);未配置直接报错
model.dt_col否默认 pday,用于 model.split 区间切分
analysis.iv.n_bins否默认 10,IV 等频分箱数
analysis.psi.n_bins否默认 10,PSI 分箱数
analysis.psi.warn_threshold否默认 0.10,须在 [0,1] 内,否则报错

4. 输出产物

主交付为 report.md(markdown),同目录另落机器可读产物;切分产物落 <session_dir>/sample-features/splits/(即 output_dir.parent.parent / "splits",与 feature-matching/sample.parquet 同级)。

text
<output_dir>/
├── _manifest.json          # schema_version / produced_by / files / overview
├── report.md               # 主交付; 人工阅读
├── report.xlsx             # 多 sheet: overview / feature_profile / feature_quality / woe
├── feature-profile.csv     # 基础统计语义化合并表(stats 全列)
├── feature-quality.csv     # IV + PSI merge 的单变量质量一站表 (feature/iv/auc/n_bins_effective/psi/psi_warn)
├── stats.csv               # 细分: 基础统计 (classification-model-tuning 高缺失率剔除规则消费)
├── iv_table.csv            # 细分: IV  (classification-model-tuning 低 IV 剔除规则消费)
├── woe_table.csv           # 细分: WOE 分桶明细 (feature/bin/cnt/pos/neg/pos_rate/woe/iv_bin)
└── psi_table.csv           # 细分: PSI (classification-model-tuning 高 PSI 剔除规则消费)

<session_dir>/sample-features/splits/
├── train.parquet
├── test.parquet
└── oot.parquet

4.1 产物内容

维度指标/文件说明
基础统计feature-profile.csv / stats.csv缺失率/unique/mean/分位数(q25/median/q75)/min/max/dtype,全样本上算
单变量预测力iv_table.csv / woe_table.csvIV / 单变量 AUC / 有效分箱数 / WOE 分桶明细;等频分箱,缺失独立分桶;WOE 明细落 woe_table.csv,报告内仅展开 IV Top 20。AUC 口径:把特征做 WoE 编码后再算 roc_auc_score(y, woe(x)),等价于"用 bin 的正样本率排序";支持分类列与缺失列,但 WoE 用了样本内标签信息,数值轻微偏乐观,不是 raw-feature ROC-AUC
稳定性psi_table.csv训练段 vs OOT 段 PSI(默认阈值 0.10,超阈值标 [PSI_WARN])
主报告report.md一、概述 二、基础统计表 三、IV+单变量 AUC 排序 三-bis WOE 分桶明细(IV Top 20) 四、PSI(含 WARN 标记)
Excel 全景report.xlsxoverview/feature_profile/feature_quality/woe sheets,业务/产品离线看
单变量质量合并feature-quality.csvfeature, iv, auc, n_bins_effective, psi, psi_warn,业务总览
清单_manifest.json给下游做 schema/版本校验用(schema_version=1, produced_by=skills/feature-analysis)

补充说明:

  • 合并 csv 与细分 csv 是冗余但同源(同次计算);下游可任选一种读法,变更后同步落

5. 与其他 skill 的关联

上下游Skill关系
上游feature-matching产出 sample.parquet + feature-list.csv
下游classification-model-training产 splits/{train,test,oot}.parquet 给 training 直接消费(training 不切分);特征分析报告供人工筛 features 列表
下游classification-model-tuningselect_features.py 直接消费本 skill 的 stats/iv/psi 三份 csv 做自动筛选
依赖model-evo/shared(父目录)公共配置读写(config_io)

6. 执行约束

约束说明
⚠️ 特征清单三档必填--feature_list_source / yaml feature_list_source / yaml features 三者都空 → 报错终止,不默认全量分析(特征表含 ID/join-key/标签泄漏列,不可不筛)

覆盖范围、取数/切分边界、职责边界、特征清单交互约定详情(来源优先级/获取来源/交叉校验)、异常处理全表详见 references/constraints-and-exceptions.md。

7. 异常处理

异常分类与处理方式详见 references/constraints-and-exceptions.md 第 7 节。

8. 测试

bash
python -m pytest feature-analysis/tests/ -q

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 Feature Analysis AI skill do?

建模前对样本宽表里的候选特征做独立分析,产出特征报告(基础统计/单变量预测力 IV+AUC/训练-OOT 稳定性 PSI)。仅产报告供人工决定特征筛选,不自动剔除特征。当用户要"做特征分析/特征IV/特征PSI/建模前看一下特征"时使用。

Why use Feature Analysis on TypingMind?

Because you install it once and use it with any model. Feature Analysis 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 Feature Analysis in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/QFIN-tech/model-evo/tree/main/model-skills/feature-analysis. 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 Feature Analysis?

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 Feature Analysis?

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

Is the Feature Analysis 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 👇