train-test-split
How to split data so the score is honest.
- License 许可
- MIT
- 最近更新
- 2026-10-25
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- train-test-split
- metadata
- { "beyondml": { "kind": "knowledge" } }
- description
- How to split data so the score is honest.
03 SKILL.md 正文
- Split before any fitting; fit imputers, scalers and encoders on the training part only (pipelines do this).
- Stratify classification splits.
- Time-ordered data: split by time, never at random.
- Grouped data (several rows per customer): keep each group on one side.
- Use the same random_state everywhere so results are reproducible.
04 同仓库更多 Skills
tabular-demo
Demo step skill for tabular data.
leakage-demo
Demo knowledge skill about target leakage.
bad-name
Name does not match its folder.
tabular-features
Writes src/features.py with derived features (ratios, logs, interactions) and no target use. Usually right after tabular-eda. Check: run src/features.py, expects data/processed/features.csv.
tabular-export
Writes the shipped code (src/pipeline.py, src/train.py, src/predict.py) from the winning run and trains it. Usually right after evolve-search or tabular-ensemble. Check: run src/train.py, expects models/model.joblib, metric accuracy (classification) or r2 (regression) with a minimum.
tabular-ensemble
Combines the search's top models into a stacking ensemble. Only when the top genomes are within about 1% of each other. Check: metric cv_score with a minimum.