Install any skill in seconds. Free to start, no credit card required.
Get Started Free →mkurman/dataset-splitting
Create reproducible train/validation/test splits with stratification, leakage prevention, and distribution validation. Covers random, stratified, grouped, and time-series split strategies.
Passed 19 of 22 test cases with the skill, and 15 of 22 without it.
and 2 more in the full report
4 fixed15 passed either way3 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 4 test cases the skill fixed. Same model, same prompt, with and without the skill.
List the mandatory quality gate checks that must pass on dataset split artifacts before releasing them for supervised model training.
| Checked | Without skill | With skill |
|---|---|---|
| The quality criteria requires every row to belong to exactly one split partition. | Missed | Passed |
| The quality criteria requires all preprocessing decisions and parameters to be derived solely from the training set. | Passed | Passed |
The instructions your model reads when the skill loads.
Train/validation/test splits are the single most important guardrail against overfitting and data leakage. A bad split invalidates everything downstream. Split once, lock the split, and never let test data influence any decision.
Use this skill when:
Do not use for:
darts or prophet skills.dataset-cleaning before splitting.from sklearn.model_selection import train_test_split
# Single split (fixed seed, stratified)
X_train, X_test, y_train, y_test = train_test_split(
X, y,
test_size=0.2,
stratify=y,
random_state=42 # NEVER change this casually
)
# Train / validation / test (two-step)
X_temp, X_test, y_temp, y_test = train_test_split(
X, y, test_size=0.15, stratify=y, random_state=42
)
X_train, X_val, y_train, y_val = train_test_split(
X_temp, y_temp, test_size=0.1765, stratify=y_temp, random_state=42
test cases passed, vs 15 / 22 without
Published skills whose descriptions closely match this one, with their headline benchmark lift.
More skills from the same source and nearby in the registry, with their headline benchmark lift.