About Two Gaussians Classifier Playground
This playground opens on the two Gaussian blobs with Linear activation, a single neuron in one hidden layer, noise at 0.3 and 40 epochs. It is the smallest network that solves a classification problem. It is free, needs no sign-up and runs in your browser, so nothing you enter is uploaded.
The blobs are centred at (0.5, 0.5) and (-0.5, -0.5), so one straight line between them separates most points. With Linear activation the hidden layer adds no bend, and the sigmoid output turns the weighted sum into a probability, which is logistic regression in network form. The boundary is a straight line, and the diagram shows just two inputs feeding one neuron.
Raise the noise to make the blobs overlap and watch accuracy settle below 100 percent: some points are simply on the wrong side, and no network can fix that.
How to use Two Gaussians Classifier Playground
- Choose a dataset: Circle, XOR, Two Gaussians or Spiral. The points are drawn on the plot straight away.
- Set the network: hidden layers (1 to 4), neurons per layer (1 to 16), the activation function (ReLU, Tanh, Sigmoid or Linear) and which input features it receives.
- Set the training: learning rate, L2 regularization, batch size, noise and the number of epochs (10 to 200).
- Press Train model. The status shows the epoch, the loss lines grow, and the boundary and the network diagram refresh as the network learns. Choose how often the boundary redraws, or leave it at every 2 epochs. Press Stop to end early.
- Read the result: the coloured background is the decision boundary, the diagram shows each link coloured by the sign of its weight and sized by its size, and the accuracy line gives training and test accuracy.
- Change one setting and train again to compare. Reset clears the plot and the curves.
Features
- Four datasets: circle, XOR, two Gaussians and spiral, 200 points each, with a noise slider.
- Seven selectable input features: X1, X2, X1 squared, X2 squared, X1 times X2, sin(πX1) and sin(πX2), where the sine features really are sin(π × X), so one full period spans the plot.
- One to four hidden layers of 1 to 16 neurons, with ReLU, Tanh, Sigmoid or Linear activation.
- Learning rate from 0.003 to 1, L2 regularization from none to 0.1, batch size 4 to 64 and 10 to 200 epochs.
- Live training loss and test loss curves, with the latest values in the heading.
- Training and test accuracy after the run, on a held-out fifth of the points.
- A decision boundary painted behind the data and redrawn every 1, 2, 5 or 10 epochs while the network trains, without freezing the page. With reduced motion switched on in your system, it updates once every 10 epochs instead.
- A network diagram: links are blue for positive weights and orange for negative ones, thicker for larger weights, and neurons are sized by their bias.
- A scatter plot that resizes with its container and has a text description for screen readers.
- Four starting points: the circle, XOR, spiral and two-Gaussians pages each open the tool with their own dataset, features and network.
- Stop and Reset buttons.
Worked examples
Two Gaussians, X1 and X2, 1 Linear neuron, noise 0.3, 40 epochs gives A straight boundary between the blobs and high accuracy, with a few points near the line misclassified.
Two Gaussians with noise 1 gives The blobs overlap heavily, so accuracy is limited by the data, not by the network.
Privacy: how it works
- There is nothing to upload: the datasets are generated in the page, and the network is trained by TensorFlow.js running on your device. TensorFlow.js ships with this site and is loaded from it when you first press Train. Your settings are not sent anywhere or stored.
Tips
- Change one setting per run. If you change three, you will not know which one mattered.
- A learning rate of 1 can make the loss jump around, and 0.003 can be too slow for 60 epochs. The default of 0.03 is a reasonable start.
- Compare the two loss lines. Training loss well below test loss is the sign of overfitting.
- Tanh and Sigmoid give smooth boundaries, while ReLU gives boundaries made of straight pieces.
- For the spiral, add the sin features, use more layers and neurons, and raise the epochs.
Frequently asked questions
Is it really free?
Yes. There is no price, no trial and no credit card. Ulkaa Tool does the work with your own device, so there is no server bill to pass on to you.
Do I need an account?
No. There is no sign-up and no login. Open the page and use it. An Ulkaa account is not needed for anything on this tool.
Does it run in my browser?
Yes. Your settings are processed by code running in your browser tab, on your own device.
Is my data uploaded?
No. Your settings are never sent to Ulkaa or to anyone else. You can check this yourself by watching the Network tab in your browser developer tools while you use the tool.
Why can one neuron solve this dataset?
The two classes can be split by a straight line, and a single neuron with a sigmoid output draws exactly one straight line.
Is this logistic regression?
Yes, in effect. One neuron with a sigmoid output trained on binary cross-entropy is logistic regression. Linear activation in the hidden layer adds no extra bend.
More TensorFlow Neural Network Playground pages
- TensorFlow Neural Network PlaygroundTrain a small neural network on a 2D dataset and watch the decision boundary and the loss curves change.
- Neural Network Playground OnlineSee what layers, neurons and activations do to a small network.
- TensorFlow Playground OnlineA TensorFlow.js playground that trains in your browser.
- Spiral Neural Network PlaygroundTrain a deeper network on the spiral and watch the boundary wind in.