← All notes

Machine learning · Lab note 001 · September 2026

What can 105 numbers
actually learn?

A small model is a good place to see what training really changes.

Pick a point on a plane. It has two coordinates: x and y. Now ask a small neural network which of two groups that point belongs to. That is the entire task in this site’s learning experiment.

The interesting part is that the network does not get the rule for drawing the groups. It gets examples. Training changes a set of numbers until the network’s answers fit those examples better.

What are the 105 numbers?

The network has two inputs, two hidden layers of eight neurons, and one output. Each connection has a weight. Each neuron after the input has a bias. Add them up:

(2 × 8) + 8   = 24
(8 × 8) + 8   = 72
(8 × 1) + 1   =  9
                   ───
                   105

A neuron multiplies its inputs by their weights, adds the results and its bias, then passes that sum through an activation function. The hidden layers use tanh. The final layer uses sigmoid, producing a value between zero and one.

In this experiment, that final value is the estimated probability of Class A. The light line on the plot marks the 50% boundary. Moving across it changes the model’s predicted class.

Learning means changing the numbers.

The model starts with deterministic random weights. Its first boundary is mostly arbitrary. For each training step, it makes predictions on the examples and measures how wrong they are using binary cross-entropy.

Backpropagation calculates how each parameter contributes to that error. The Adam optimizer uses those gradients to update the parameters. Then the process repeats. The plot and the network diagram both show that same evolving model.

Try this

Choose Rings and press Train. Once the boundary has formed, add a Class B point near the centre and train again. Watch the shape bend to accommodate the new example.

Try the experiment

Fitting the examples is only the beginning.

The displayed score is training fit: the proportion of the visible training points classified correctly. A high score does not prove that the model will behave well on new points. It can also learn noise or distort its boundary around an unusual example.

This is a toy classifier, with no language model, external API, or hidden service. Its value is visibility. You can change the inputs, see the outputs, and inspect every computation. Larger models are harder to inspect, but the distinction between fitting examples and being useful still matters.

Explore further: TensorFlow Playground. Implementation: the experiment’s source.

Explore

↑ ↓ to move · Enter to choose · Esc to close