Calculation Results
Results update after calculation.
Recommendation
Enter dataset values and calculate a split.
Quality checks
Summary
No calculation yet.
Formula Used
How to Use
- Enter the total dataset size.
- Select a two-way or three-way split.
- Choose percentages, counts, or missing-value mode.
- Add exclusions before splitting the dataset.
- Configure stratification, grouping, or time-series controls.
- Review warnings, charts, and recommended ratios.
- Export the result as CSV or PDF.
Example Data
| Dataset size | Train % | Validation % | Test % | Train samples | Validation samples | Test samples | Use |
|---|---|---|---|---|---|---|---|
| 100 | 70 | 15 | 15 | 70 | 15 | 15 | Small experiment |
| 1000 | 80 | 10 | 10 | 800 | 100 | 100 | General modelling |
| 10000 | 90 | 5 | 5 | 9000 | 500 | 500 | Large dataset |
| 500 | 80 | 0 | 20 | 400 | 0 | 100 | Simple holdout |
Understanding Train-Test Splits
Training data
Training data teaches the model its patterns. Larger training sets usually improve learning stability. Quality still matters more than raw volume.
Validation data
Validation data supports tuning and model selection. It should remain separate from training. Repeated tuning can still overfit validation data.
Testing data
Testing data estimates final model performance. Use it after model decisions are complete. Reusing it can create optimistic results.
Stratification
Stratification preserves class proportions across splits. It helps imbalanced classification tasks. Tiny classes may still need special handling.
Time-series data
Time-series splits should respect chronological order. Random shuffling may leak future information. Add gaps when nearby observations overlap.
Grouped data
Related records should stay within one split. Patient or customer records are common examples. Group-aware splitting prevents identity leakage.
Frequently Asked Questions
What is a train-test split?
It separates data for learning and evaluation. The training set fits the model. The test set checks unseen performance.
Which split ratio is best?
No ratio fits every dataset. Eighty-twenty is a common starting point. Dataset size and risk should guide selection.
When is validation data needed?
Validation data supports tuning and model comparison. It protects the final test set. Cross-validation can replace a fixed validation split.
Should data always be shuffled?
No. Time-series data should usually remain ordered. Grouped records also need controlled splitting.
Why use a random seed?
A seed makes random splits reproducible. Teams can recreate identical experiments. Different seeds reveal split sensitivity.
What does stratification do?
It preserves class proportions across datasets. This supports fairer class evaluation. It is useful for imbalanced targets.
Can test data be augmented?
Usually not. Test data should reflect real observations. Augmentation belongs in the training pipeline.
When should cross-validation be used?
Use it when data is limited. It evaluates several training-validation partitions. Keep a final holdout when possible.
What is data leakage?
Leakage exposes unavailable information during training. It inflates measured model performance. Split data before learned preprocessing steps.