Logistic Regression Dataset Generator
Labelled data where the boundary is known, so you can check whether a classifier actually recovered it. The number that matters most is not the accuracy — it is the majority-class baseline, because a model that always guesses the commoner class already scores that. If your classifier gets 85% and the baseline is 84%, it has learned almost nothing, and this page puts both figures side by side for exactly that reason.
What this generator does
Draws points, labels them by which side of a hidden line they fall on, and pushes some across it with noise. It reports how accurately the true boundary classifies its own data, and what always guessing the commoner class would score.
How to use this tool
- Choose how many rows and how much noise to add.
- Generate, and note the baseline accuracy before anything else.
- Copy the CSV and fit a model to it.
- Compare your model's accuracy against the true boundary's, not against fifty percent.
Understanding the controls
- How many rows
- Between 20 and 500 labelled points. More rows make the class balance steadier.
- Noise
- How far points are pushed across the boundary. Zero makes the classes perfectly separable, which real data never is.
- Seed
- Reproduces exactly the same dataset, which is what makes a training run repeatable.
Common use cases
- Test data for a classifier with a known correct answer
- Showing why accuracy alone is a misleading measure
- Teaching decision boundaries with data you can plot
- Checking that a training pipeline recovers a planted relationship
- Reproducing the same dataset from a seed
How this generator works
Labels come from the sign of a linear combination plus normal noise, so the structure is genuinely linear and genuinely imperfect. The check confirms the planted boundary classifies its own data better than the majority baseline — if it did not, there would be no structure to find — and that zero noise gives perfect separation.
Randomness and fairness
The points and the noise are random; the boundary is fixed per dataset and reported. Seeded datasets reproduce exactly and are therefore explicitly not cryptographically secure. Unseeded, the browser's cryptographically secure generator draws them.
For how randomness is produced across the whole site, see how Generate Random works.
Limitations and good to know
- Two features only, so the data can be plotted — real problems have many more.
- The boundary is linear, which is the easy case; curved boundaries need different models entirely.
- Noise is normal and identical everywhere, rather than varying across the space.
- No train and test split is provided; that is left to you.
- Datasets are not stored between visits.
Privacy and your data
Every row is generated in your browser. Nothing about the dataset or your seed is transmitted or kept.
Related generators
- Clustered Dataset GeneratorPoints grouped around known centres with the true group recorded, so you can check what a clustering algorithm actually recovered.
- Imbalanced Dataset GeneratorA classification dataset with a rare positive class, and the majority-class baseline that shows why accuracy is the wrong measure.
- Regression Dataset GeneratorData built from a slope and intercept you choose, with the line fitted back out of it so you can see how close estimation gets.
- Synthetic Test Data GeneratorBuild a whole table of fictional records from the fields you choose, then export them as a table, JSON, CSV or SQL inserts.