MockDataLab
Data & MLNature / JMLR-style referenceseed 5

Synthetic Gaussian blobs dataset

Three classes sit on a circle of radius 3. Each row takes the next class in turn and adds isotropic Gaussian noise of standard deviation 0.55. Seed 5 fixes the 180 labeled points. It is a teaching stand-in for make_blobs, not a copy of scikit-learn’s random stream.

How a row is built

label = i mod 3; point = center(label) + 0.55 * standard normal

Static snapshotCSV (seed 5) ↓
Interactive dataset studio loads as it enters view…

What this page generates

Classification demos need more than one cloud and a label column. These centers are placed at equal angles, starting from the top of the circle. Class 0 is the top center, and the others follow counterclockwise. The radius is 3 and the cloud width is 0.55, so the clouds barely touch. A linear boundary between a pair of classes is easy; a single linear boundary among all three is not the point.

Labels are assigned by row index modulo 3, not by a random class draw. The counts match exactly: 60, 60, and 60 when the sample count is 180. That makes accuracy and confusion matrices easier to read. The coordinates are random around those centers. The generator consumes two normal draws per row when the spread is positive, first for x1 and then for x2. A script that swaps that order will not match the file.

The geometry is fixed, not re-rolled with the seed. The seed moves points inside each cloud and does not move the centers. If you want random centers, this page is the wrong tool. If you want a reproducible picture of three groups for a slide, this is the point of freezing the circle.

Generating rule

How a row is built

label = i mod 3; point = center(label) + 0.55 * standard normal

Check values

Worked numbers

Seed 5 wrote 180 labeled rows (class 0: 60, class 1: 60, class 2: 60). Labels rotate 0, 1, 2 from the first row, and the centers stay on the radius-3 circle.

Parameters and defaults

Parameters, defaults, and what they change
ParameterDefaultRangeEffect
classes32 to 6How many centers are placed on the circle.
cluster std0.55≥ 0Cloud width. Zero puts every point on its center.
samples1802 to 20,000Split as evenly as the round-robin allows.
seed5unsigned 32-bitRepeats the coordinate noise only.

Python for this seed

Full script with mulberry32() & box_muller() available via Copy Python above

reproduce_seed_5.pyseed 5
# SYNTHETIC DATA - generated by MockDataLab (mockdatalab.com)
# This file is synthetic and must not be presented as real measurements, clinical data, or results from a physical instrument.
# generator: classification-blobs
# seed: 5
# samples: 180

# mulberry32() and box_muller() are included when you copy the full script.


SEED = 5
N = 180
centers = [[1.8369701987210297e-16, -3.0], [2.598076211353316, 1.4999999999999996], [-2.5980762113533156, 1.5000000000000009]]
n_classes = len(centers)
rng = mulberry32(SEED)
x1 = np.empty(N, dtype=np.float64)
x2 = np.empty(N, dtype=np.float64)
label = np.empty(N, dtype=np.int64)
for i in range(N):
    label[i] = i % n_classes
        x1[i] = centers[label][0] + (0.55) * box_muller(rng)
        x2[i] = centers[label][1] + (0.55) * box_muller(rng)
columns = ["x1", "x2", "label"]
data = np.column_stack([x1, x2, label.astype(np.float64)])

Exercises

  • EXERCISE 01Train a 3-class classifier and expect balanced support.
  • EXERCISE 02Draw the decision regions of a linear model and see the circle of centers.
  • EXERCISE 03Check that a student implementation of make_blobs-style data uses the label column and not the row color alone.

Questions

Will these coordinates match sklearn.datasets.make_blobs?

No. The centers are deterministic and the random generator is mulberry32, not NumPy’s Generator. The problem shape is similar. The numbers are not.

Why is class 0 first in the file?

Row i gets class i mod 3, so the file starts 0, 1, 2, 0, 1, 2. Shuffle after you load it if order matters to your splitter.

Can clouds overlap?

Increase the cluster standard deviation. At 0.55 and radius 3 they mostly separate.

Related

SYNTHETIC DATA - generated by MockDataLab (mockdatalab.com). Do not present the download as a real measurement.