Algorithm:
Backpropagation. Neural network learning for
classication or prediction, using the
backpropagation algorithm.
Input:
D, a data set consisting of the training tuples
and their associated target values;
l, the learning rate;
network, a multilayer feed-forward network.
Output:
A trained neural network. Method:
(1) Initialize all weights and biases in network;
(2) while terminating condition is not satised {
(3) for each training tuple X in D {
(4) // Propagate the inputs forward:
(5) for each input layer unit j {
(6) Oj = Ij; // output of an input unit is its actual
input value
(7) for each hidden or output layer unit j {
(8) Ij = i wijOi +j; //compute the net input of unit
j with respect to the previous layer, i
(9) Oj = 1 1+eI j ; } // compute the output of each
unit j
(10) // Backpropagate the errors:
(11) for each unit j in the output layer
(12) Errj = Oj(1Oj)(Tj Oj); // compute the error
(13) for each unit j in the hidden layers, from the
last to the rst hidden layer
(14) Errj = Oj(1Oj)k Errkwjk; // compute the
error with respect to the next higher layer, k
(15) for each weight wij in network {
(16) wij = (l)ErrjOi; // weight increment
(17) wij = wij +wij; } // weight update
(18) for each bias j in network {
(19) j = (l)Errj; // bias increment
(20) j = j +j; } // bias update
(21) } }