Backpropagation Applet

The applet below demonstrates the backpropagation learning algorithm for multilayer feedforward networks.

Clicking with mouse in grid area in the applet adds samples. Two classes of samples can be added. Left mouse button adds samples from the class “blue” and right mouse button adds samples from the class “red”. A sample can be moved by pressing on the sample and dragging it while holding the mouse button.

The applet uses a feedforward network with two input neurons and two output neurons, and only one hidden layer. The number of neurons at the hidden layer can be adjusted using the “Hidden Layer Size” combo box. The default number of neurons at the hiddent layer is 5. The number of neurons at the input layer are 2, because our samples are on a two dimensional plane (x,y). We have 2 output neurons, each representing one of the classes “red and “blue”.

Learning rate can be adjusted using the “Learning rate” combo box. The default learning rate is 0.1.

Using “Iteration count” combo, we can adjust how many step to iterate during backpropagation algorithm when “Train” button is pressed. Default number of iteration is 20.

“Add 10 random points” button adds 10 random points to the grid, 5 of which to the “red” class and 5 to the “blue” class.

“Error” label below the “Train” button shows current error at the output layer. Notice that, at each step the error should become lower. (if not converged, or if not trapped to a local minimum).

 Tutorial

  1. Press reset/clear.
  2. Add several random points.
  3. Press “step” several times. You will see “blue” and “red” regions. Notice that, at each step the error becomes lower.