Skip to content
Back to skills

572 Usage Guide 03d4d3b2

ASecurity

Implement proper cross-validation strategies to get unbiased performance estimates on biomedical datasets and avoid overfitting during biomarker discovery.

  • 9 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added October 11, 2026
databashexpressperformance

Security analysis

A96/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro shows the line behind each finding and how to fix it

Scanned October 11, 2026

npx -y skills add tools-only/X-Skills --skill 572-usage-guide_03d4d3b2 --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 572 Usage Guide 03d4d3b2?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for 572 Usage Guide 03d4d3b2
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tools-only-572-usage-guide-03d4d3b2/badge)](https://www.skillsdirectory.com/skills/tools-only-572-usage-guide-03d4d3b2)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

SKILL.md
# Cross-Validation Usage Guide

## Overview

Implement proper cross-validation strategies to get unbiased performance estimates on biomedical datasets and avoid overfitting during biomarker discovery.

## Prerequisites

```bash
pip install scikit-learn pandas numpy
```

## Quick Start

Tell your AI agent what you want to do:
- "Run nested cross-validation on my classifier"
- "Evaluate my model with stratified 5-fold CV"
- "Use leave-one-out validation for my small dataset"
- "Make sure patients from the same individual are kept together in CV"

## Example Prompts

### Nested CV

> "Run nested cross-validation on my expression classifier. Use 5 outer folds for evaluation and 3 inner folds for hyperparameter tuning with grid search."

> "I want an unbiased estimate of my classifier's performance. Run nested CV and report the mean and standard deviation of AUC."

### Stratified CV

> "Evaluate my random forest with stratified 5-fold cross-validation. My classes are imbalanced."

### Small Datasets

> "I only have 25 samples. Run leave-one-out cross-validation to maximize training data."

### Grouped Data

> "My dataset has multiple samples per patient. Run cross-validation keeping all samples from each patient in the same fold."

## What the Agent Will Do

1. Identify appropriate CV strategy for dataset size
2. Set up outer CV for evaluation (and inner CV if nested)
3. Ensure feature selection/preprocessing is inside the CV loop
4. Calculate performance metrics per fold
5. Report mean +/- std of performance

## Tips

- Always use stratified splits when classes are imbalanced
- Put ALL preprocessing (scaling, feature selection) inside the CV loop to avoid data leakage
- Nested CV is essential when tuning hyperparameters on small datasets
- Use GroupKFold when samples aren't independent (repeated measures, same patient)
- Leave-one-out gives maximum training data but high variance estimates
- Report standard deviation of CV scores, not just the mean

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.