agentleFS
takayoshitoyoda05takayoshitoyoda05/claude-ml-template/.claude/skills/leakage-check/SKILL.md

leakage-check

Skill1 starsChanged 2 months agoMITView on GitHub

データリーケージを確認するとき、「リーケージチェックして」「分割は正しいか確認して」と言われたときに必ず使う。

The file

Files
SKILL.md

データリーケージチェック

モデルの評価指標が「正しく測れているか」を確認する。 性能の数字そのものではなく、その数字の信頼性を守る。

確認観点

観点具体的に見ること
分割の単位bag/グループ/患者等の上位単位で分割しているか。同一bagのインスタンスがtrain/testに分かれていないか
時系列の漏洩未来のデータが学習に混入していないか(時系列データの場合)
前処理の漏洩正規化・標準化のパラメータ(mean/std等)をテストデータを含めて計算していないか
特徴量の漏洩ラベルから直接導出できる特徴量、またはラベルと1:1対応する特徴量が含まれていないか
重複同一サンプルがtrain/testの両方に含まれていないか
乱数シード分割の再現性が確保されているか(seed固定)

進め方

  1. 作業スコープ直下に CONTEXT.md があれば先に読む。
  2. データの読み込み・分割・前処理のコードを特定する。
  3. 上記の観点を1つずつ順に確認する。
  4. 問題を重大度(CRITICAL / HIGH / MEDIUM)で報告する。 CRITICALは「評価指標が信用できなくなる」レベル。

MIL(Multiple Instance Learning)固有の注意

  • bag単位の分割が必須。bag IDでグループ分割しているか確認する。
  • bag内のインスタンス間で情報が共有される場合(同一画像から切り出したパッチ等)、 インスタンス単位の分割では必ずリーケージが起きる。

注意

  • このスキルはコードを変更しない(レポートのみ)。修正はユーザーの判断で行う。
  • CONTEXT.md にデータの構造(bag/instanceの関係等)が書かれていれば参照する。

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.