Suche

2.2 An artificial decision

Let’s take another look at the example of the digital bouncer, which was first shown in Scratch and modelled manually with a single neuron. This time, however, the neuron will be trained with a real training for neural networks. The data used for this is explained in more detail below. There is no need to adjust anything manually here; the training procedure manages to find optimum values for the weight and the threshold value on its own.

The neural network seen below consists of just a single neuron, and it isn’t able to do anything meaningful in the beginning. However, it can be trained. Afterwards, it will be able to make the correct decision and behave like a real digital bouncer.

Instructions

  • Click Reset: Everything that the network has learnt is reset. In addition, a new random value is selected for the weight w.
  • Hover the mouse pointer over the boxes at the top, each of which represents an age: For each box, the neuron's current decision is displayed as to whether you are allowed to enter the disco at that age or not. For each box, the calculation of the neuron is displayed in the lower part.
  • Click Start: The network is trained with the age and decision pairs shown below until it has learnt these pairs. During training, observe how the weight w and the threshold value b change until the network makes the correct decision for each age. Then look at the information now provided by the boxes in the upper part and whether the neuron makes the correct decision.
  • In the upper part, red stands for no and green stands for yes.

Bitte einen anderen Browser benutzen.
Bitte einen anderen Browser benutzen.
0 0 0 0 0 x w Act. x⋅w b o Sorry, your browser does not support inline SVG.
Bitte einen anderen Browser benutzen.

Explanation

The neuron is trained with the following pairs of input and output data: x is the input value and y is the desired output value (0 = no / 1 = yes):

x

y

15.0

0

15.5

0

16.0

0

16.5

0

17.0

0

17.5

0

18.0

1

18.5

1

19.0

1

19.5

1

20.0

1

20.5

1

 

As can be observed, the threshold value and the weight of the neuron change during the training. In principle, this happens until the correct decision is made for all age groups. To achieve this, the training data is repeatedly sent through the neuron and the weight and threshold value of the neuron are slightly changed each time for better results. Incidentally, even if the neuron does not output 0 for, let’s say, age 14 at the end of training as required, but a value between 0.0 and 0.5, the decision is still correct. Rounding the output value, everything below 0.5 is rounded to 0 (= no) and everything above 0.5 is rounded to 1 (= yes). Interestingly, the neuron can also make decisions on an age such as 10, for example, even though there was no pair with the age 10 in the training pairs.

What can the neuron do now?

The neuron has automatically found the point at which it can answer no to the left and yes to the right. Finding such a separating point where something is on one side and something else on the other is the main task of neurons or neural networks in general. This enables them to decide what the appropriate output is for any given input: in this case, no or yes. In the case of neural networks with a large number of neurons, this can of course be a much more detailed input and a much more detailed output.

Learn age difference

Close search