Skip to main content
. 2019 Mar 5;19(5):1112. doi: 10.3390/s19051112

Table 1.

The code of the BP neural network algorithm.

Algorithm 1: The back propagation neural network
Definition:
Input layer neurons xi; The number of input layer neurons n; The hidden layer neurons Hj, H′j and H″j; The number of input layer neurons k; The output layer neurons y
Deposition
Initialization:
Initialize all weights and biases in network;
for i=1 to n do
 Create hierarchy model and assign to neurons x8=(fs, fh, p, ns, t, h, ws, v); y=(d)
xi = X(xi)
end
forj=1 tokdo
fort=1 to 3 do
  HjΣWijxi+bj
  H′jΣWijHj+bj
  H″jΣW″ijH′j+b″j
  yog(H″j)
end
end
for all j in k do
E1/2Σej2
if (EError) do
  Wij←Wij+αHjej
  bjbj+βej
return i=1
else y=yo
End