Suche

2.4 An artificial separation

In the following interactive figure, the neuron will now be automatically trained with the learning algorithm that has already been used for the digital bouncer. During training, you can observe how the weights and the threshold change, continuously reducing the error that the neuron makes. Whereas the neuron initially classified many animals incorrectly (which can easily be observed in its untrained state by adding new animals with a click), the network works perfectly after training because it has found a good separation line between the two classes of ladybird and caterpillar.

Instructions

  • Click Reset: Everything that the network has learnt is reset. In addition, new random values are selected for the weights w1 and w2.
  • Hover the mouse over ladybirds or caterpillars in the figure: The box below the coordinate system will display which animal it is and what its measures are. Under the neuron, on the other hand, you will see which animal the neuron considers it to be. In addition, the complete calculation of the output is displayed (the animal is considered to be a ladybird when the output value is below 0.5 and a caterpillar when it is above 0.5).
  • Click in the coordinate system to add new animals.
  • Hover the mouse over the brown dots in the figure representing unknown animals: A prediction of which animal it could be and what its measures are is displayed below the coordinate system. Under the neuron you will see the complete calculation of the respective output.
  • In the figure, red stands for ladybirds and green stands for caterpillars. After the training, the colouring in the background of the figure also indicates whether the respective values for width and length are more likely to be identified as ladybirds (red) or as caterpillars (green).
Bitte einen anderen Browser benutzen.
Bitte einen anderen Browser benutzen.
Bitte einen anderen Browser benutzen.
Bitte einen anderen Browser benutzen.

What happens during training?

If you click Start, 300 training epochs are conducted. This means that the weights and the threshold value are changed 300 times. After each change, the entire table of training data is tested line by line and a value is determined that indicates the size of the error that the network is currently making. This is calculated from the difference between all desired outputs and all actual outputs. Since it is known how big the error was in the previous step, it can be calculated whether changing a weight or the threshold value has made a difference in reducing the error. The art of mathematics lies in obtaining precise information about which of the three changes did what. Once this has been determined, it is known for each weight and for each threshold whether the value must be increased or decreased slightly so that the error of the network becomes even smaller.

What can the neuron do now?

The neuron has found a separation line which enables it to make a clear decision as to whether input data belongs to the ladybird class or the caterpillar class. Of course, more neurons or an entire neural network can distinguish a lot more classes. The points do not even have to be clearly separated from each other. In real life, there can be overlaps and ambiguities. But this is precisely where the power of neural networks lies, as the next example shows.

Close search