Labs · Neural Networks

Neural Network Curve Fitting

Neural Network Curve Fitting simulation

The perceptron could only draw a straight line. A network with hidden layers can approximate any smooth function (the universal approximation theorem). Here it learns y = f(x) from example points by minimising the mean squared error.

The faint coloured curves are the outputs of the last hidden layer's neurons. Each is a bent and shifted tanh, and the final yellow curve is just a weighted sum of them. Watch the network build a complex shape out of simple pieces.

Choose "Bumps" with 2 neurons, then 4, then 16. Left-click adds points, right-click removes them.

Controls

Evolved from The Perceptron.

Evolved into Neural Network Painter.