How to generate synthetic data for machine learning
By the Ground team
To generate synthetic data for training a machine learning model, start with the task, label definition and cases you need more of. Reserve a real test set first, generate only for the training set, and compare models on the same untouched test data.
A practical workflow
Describe the dataset you need, including the label and how often each class occurs, or upload your training table and ask for more rows. Check the result in the editor before you download it.
- Reserve a real holdout before you add synthetic rows.
- Describe the dataset, or upload the training portion and ask for more rows.
- Check the label mix and the columns that drive it.
- Compare real-only, synthetic-only and mixed training on the real holdout.
Work through a rare-event example
The Northwind Card export pairs 89,204 transactions with their outcomes. It has 825 confirmed fraud rows, including 181 marked as card testing. Join on transactions_id and check the label counts before fitting a model.
For prediction at authorization time, keep only fields available at that time. Exclude dispute status, fraud sequence and other outcomes from the features. Split by customer or time to match your actual decision and measure utility on a real holdout.
Measure on real data
Train one model on real data and one on real plus synthetic data. Evaluate both on the same untouched real holdout. For a rare class, report precision and recall alongside overall results, and compare performance on the cases you generated to fill.
If a customer or account has multiple records, split by that entity before generation so examples for the same entity stay on one side of the evaluation. For a forecast, split by time and keep future evidence outside the training data.
Training an LLM calls for task examples
Fine-tuning examples pair a task input with a target response. Preference data pairs the same input with a chosen and rejected response. Check that the response is supported by the input and that the exported format matches your trainer.
Common questions
Does synthetic data always improve a model?
No. Measure it for your task on real held-out data.
Are my uploaded rows changed?
No. When you extend an upload, your original rows are kept exactly as uploaded and new rows are added beside them.
Try it with your own dataset
Get started, see pricing or use the API.
Review security and privacy when evaluating Ground for your team.