MultiLayer Perceptron Learning Algorithm

The algorithm for Perceptron Learning is based on the back-propagation rule discussed previously. This algorithm can be coded in any programming language, and in the case of this tutorial, Java for the applets. In this case we are assuming the use of the sigmoid function f(net) described earlier in the tutorial. This is because it has a simple derivative.

Algorithm:

  1. Initialise weights and threshold.

    Set all weights and thresholds to small random values.

  2. Present input and desired output

    Present input Xp = x0 ,x1 ,x2 ,...,xn-1 and target output Tp = t0 ,t1 ,...,tm-1 where n is the number of input nodes and m is the number of output nodes. Set w0 to be , the bias, and x0 to be always 1. For pattern association, Xp and Tp represent the patterns to be associated. For classification, Tp is set to zero except for one element set to 1 that corresponds to the class that Xp is in.

  3. Calculate the actual output

    Each layer calculates the following:

    fypj = f [w0x0 + w1x1 + .... + wnxn]

    This is then passes this to the next layer as an input. The final layer outputs values opj.

  4. Adapts weights

    Starting from the output we now work backwards.

    wij(t+1) = wij(t) + ñþpjopj , where ñ is a gain term and þpj is an error term for pattern p on node j.

    For output units

    þpj = kopj(1 - opj)(t - opj)

    For hidden units

    þpj = kopj(1 - opj)[(þp0wj0 + þp1wj1 + ....+ þpkwjk)]

    where the sum(in the [brackets]) is over the k nodes in the layer above node j.

Previous:- MultiLayer Perceptron Learning Theory

Next:- Example 4: Two Dimensional Pattern Space revisted