wenmin-wu/ds-skills/anchor-grouped-validation
Claude Code and agent skill by wenmin-wu/ds-skills
Trust tier 2
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
Split validation by unique anchor/query entities so no anchor appears in both train and val, preventing data leakage in pairwise matching tasks
Install
npx vskill@latest install wenmin-wu/ds-skills/anchor-grouped-validationSKILL.md
Anchor-Grouped Validation
Overview
In pairwise matching tasks (phrase similarity, question-answer matching), the same anchor/query maps to multiple targets. If the same anchor appears in both train and validation, the model memorizes anchor-specific patterns rather than learning general similarity. Splitting by unique anchors ensures the model is evaluated on truly unseen queries.
Quick Start
Workflow
- Identify the grouping entity (anchor, query, user, document ID)
- Use
StratifiedGroupKFoldfor balanced + grouped splits, or manual shuffle-split on unique entities - Verify no group overlap between train and validation sets
- Report both in-group (standard) and grouped CV scores — the gap reveals leakage risk
Key Decisions
- StratifiedGroupKFold vs GroupKFold: stratified variant preserves label distribution across folds
- Stratification target: bin continuous scores into integers for stratification compatibility
- Number of folds: 4-5 is standard; fewer folds if number of unique anchors is small
- Simple alternative: shuffle unique anchors, split first 25% as val, rest as train
References
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/nlp/anchor-grouped-validation/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/wenmin-wu/ds-skills/anchor-grouped-validation)