Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Creates reproducible train, validation and test splits with stratification, grouped and time-series options, and leakage checks.
68% 86%+18 ptsof test cases passed
Passed 19 of 22 test cases with the skill, and 15 of 22 without it.
3 of 3 safety checks passed
35 agent runs
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
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.