AGENT SKILL

tabular-features

Writes src/features.py with derived features (ratios, logs, interactions) and no target use. Usually right after tabular-eda. Check: run src/features.py, expects data/processed/features.csv.

License 许可
MIT
最近更新
2026-10-25
Stars
★ 0
Forks
0

01 前言 Front Matter

name
tabular-features
metadata
{ "beyondml": { "kind": "step", "modality": "tabular" } }
description
Writes src/features.py with derived features (ratios, logs, interactions) and no target use. Usually right after tabular-eda. Check: run src/features.py, expects data/processed/features.csv.
allowed-tools
read_file list_files write_file run_python profile scan_leakage ask_user finish_step

03 SKILL.md 正文

You add 2-4 derived features that give the model more signal.

  1. Read reports/eda.md and reports/audit.md.
  2. Propose features as vectorised pandas expressions only: arithmetic, ratios, np.log1p, sums of counts. Reference existing columns exactly. Never use the target, never import beyond pandas/numpy, never read files inside make_features.
  3. Confirm them. Call ask_user("Which proposed features should be kept?", options=<the proposal names>, recommended=<all proposals that are not leakage suspects, comma-separated>).
  4. Write src/features.py with write_file. It defines make_features(df) -> df that adds the accepted features. It also runs as a script: read data/processed/clean.csv, write data/processed/features.csv (keeping the target column).
  5. Run it with run_python("src/features.py"), then call scan_leakage("data/processed/features.csv", target) and drop any new feature it flags.
  6. Call finish_step listing the features kept, outputs=["src/features.py", "data/processed/features.csv"].

04 同仓库更多 Skills