leakage-check
Skill1 starsChanged 2 months agoMITView on GitHub
データリーケージを確認するとき、「リーケージチェックして」「分割は正しいか確認して」と言われたときに必ず使う。
In this repository27 other files it gives its agents.
- AGENTS.mdAGENTS.md
- adrSkill
- architecture-checkSkill
- brainstormSkill
- branch-namingSkill
- codex-delegateSkill
- config-explainSkill
- config-setSkill
- cross-reviewSkill
- design-interviewSkill
- diagnosing-bugsSkill
- fix-ciSkill
- handoffSkill
- literature-reviewSkill
- mlflow-logSkill
- multi-seedSkill
- mutation-testSkill
- paper-writingSkill
- pre-mortemSkill
- property-testSkill
- python-standardsSkill
- refactor-scoutSkill
- regression-suiteSkill
- retrospectiveSkill
- security-reviewSkill
- spec-checklistSkill
- tddSkill
The file
Files
データリーケージチェック
モデルの評価指標が「正しく測れているか」を確認する。 性能の数字そのものではなく、その数字の信頼性を守る。
確認観点
| 観点 | 具体的に見ること |
| 分割の単位 | bag/グループ/患者等の上位単位で分割しているか。同一bagのインスタンスがtrain/testに分かれていないか |
| 時系列の漏洩 | 未来のデータが学習に混入していないか(時系列データの場合) |
| 前処理の漏洩 | 正規化・標準化のパラメータ(mean/std等)をテストデータを含めて計算していないか |
| 特徴量の漏洩 | ラベルから直接導出できる特徴量、またはラベルと1:1対応する特徴量が含まれていないか |
| 重複 | 同一サンプルがtrain/testの両方に含まれていないか |
| 乱数シード | 分割の再現性が確保されているか(seed固定) |
進め方
- 作業スコープ直下に CONTEXT.md があれば先に読む。
- データの読み込み・分割・前処理のコードを特定する。
- 上記の観点を1つずつ順に確認する。
- 問題を重大度(CRITICAL / HIGH / MEDIUM)で報告する。 CRITICALは「評価指標が信用できなくなる」レベル。
MIL(Multiple Instance Learning)固有の注意
- bag単位の分割が必須。bag IDでグループ分割しているか確認する。
- bag内のインスタンス間で情報が共有される場合(同一画像から切り出したパッチ等)、 インスタンス単位の分割では必ずリーケージが起きる。
注意
- このスキルはコードを変更しない(レポートのみ)。修正はユーザーの判断で行う。
- CONTEXT.md にデータの構造(bag/instanceの関係等)が書かれていれば参照する。
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

