Neural Network Classification

See how a computer learns to sort things into groups. Start with a simple story (which students pass an exam) and follow the short lesson, or jump straight in: pick a shape, build a network with any number of layers and neurons, choose an optimiser and press Start. The coloured background shows the model's guess everywhere, and it changes as the model learns. Everything runs in your browser.

Learn step by step · 1 of 8

Sort into two groups

Each dot is a student. Further right means they studied more, higher up means they slept more. Blue dots passed the exam and orange dots failed.

We'll teach the computer to sort a new student into "pass" or "fail". Sorting things into groups like this is called classification.

Try this

Press Start. The background colour is the computer's guess for every spot: blue means pass, orange means fail.

Neural Network

Classification

Sort points into two groups

Epochs
0
Training loss
–
Test loss
–
Training accuracy
–
Test accuracy
–

Data

Students who study and sleep more tend to pass. One straight line can split them.

0

Mixes the groups up a little, like messy real-world data.

The model

Layers with neurons

InOut

No hidden layers: the model can only learn a straight line. Press + to add one.

ReLU: simple and fast. Makes sharp corners.

Training

0.01

How big each learning step is. Too small: slow. Too big: it can't settle.

8

How many examples it looks at before each correction.

Momentum + adaptive step sizes. A great default.

Display

8px

How detailed the coloured background is. Smaller is sharper but slower.

Ready
PassedFailedOutlined dots: test data (never seen)Background: the model's guess

Loss over time

TrainingTest

Press Start to see how the mistakes shrink

How to use the Neural Network Classification

  1. 1

    Follow the lesson

    Eight short steps explain sorting, scores, neurons, layers, optimisers and overfitting in plain words.

  2. 2

    Pick an example

    Exam results, two groups, circle, XOR, spiral, or draw your own points with a click (Shift + click for the other group).

  3. 3

    Build the network

    Add layers, type how many neurons each one has, and choose the activation, learning rate, batch size and optimiser.

  4. 4

    Press Start and watch

    The background reshapes around the dots while accuracy goes up and loss goes down. Point at the chart to ask the model.

Features

  • Made for beginners

    A guided lesson with everyday examples and a hint under every setting.

  • Real training

    A real neural network trained with backpropagation in your browser.

  • 7 optimisers

    SGD, Momentum, AdaGrad, RMSProp, AdaDelta, Adam and Adamax, to compare side by side.

  • Live scores and loss chart

    Training and test loss and accuracy, updated as it learns.

  • Spot overfitting

    A friendly warning when the model starts learning the examples by heart.

  • Draw your own data

    Click to add points and create your own puzzles for the network.

Frequently asked questions

What is classification in machine learning?

Classification means sorting things into groups, for example pass or fail, spam or not spam. The model learns from examples whose group is known, then guesses the group of new ones.

What do accuracy and loss mean?

Accuracy is the share of examples sorted correctly. Loss measures how wrong or unsure the guesses are, so lower is better. Test scores use examples the model never trained on, so they show how well it works on new data.

Why can't the model learn the circle without neurons?

Without hidden layers the model can only draw one straight line, and no straight line can separate a middle group from a ring around it. Neurons each draw a line, and together they can make a circle or any other shape.

Which optimiser should I use?

Adam is a great default: it adapts its step size as it learns and is usually much faster than plain SGD. The lesson shows the difference on the spiral, where SGD gets stuck and Adam solves it in seconds.

What is overfitting?

Overfitting is when a model learns the training examples by heart instead of the real pattern. You can spot it when training accuracy is much higher than test accuracy. Fewer neurons, more data or less noise usually help.

Is there a regression version?

Yes. The Neural Network Regression simulator predicts numbers instead of groups, such as house prices, fuel use or temperature.

More free tools