Introduction to BP Neural Network Algorithm

The neural network model has been applied in many fields, simulating the neuron structure of organisms, is a simplified neuron model, and can perform distributed information processing mathematical models.

background

The neural network is divided into the neural world In the 1980s, scientists led by Rumelhart and McCelland established a parallel processing group and proposed the famous neural network algorithm.

Neural networks include biological neural networks and artificial neural networks. In the BP neuron structure, the neurons imitate the neuron structure of the organism, as shown in the figure below, which is the neuron structure of the organism (the figure comes from the network):

basic structure

 BP neural network is a multi-layer neural network with three or more layers, and each layer is composed of several neurons. Assuming that the number of input layers is 3 and the number of output layers is 2, the basic schematic diagram is shown in the following figure:

 

Suppose the number of output layers is l, the number of hidden layers is m, and the number of output layers is n, which a_his the output of the hth neuron in the hidden layer. w_{hj}is the connection weight between the jth neuron of the input layer and the hth neuron of the hidden layer, then the input formula of the jth neuron is:

                                                            a_j{}=\sum_{h=1}^{m}w_{hj}a_h

neuron activation function

The BP neural network generally uses a linear function as a transfer function or an S-type function as a transfer function. The S function can be divided into a log-sigmoid function and a Tan-sigmoid function. Neuron activation function

(1) Sigmoid function

Sigmoid and its derivatives are continuous, because the Sigmoid function can be divided into unipolar S-shaped curves, and the function formula of unipolar S-shaped curves is as follows:

                                                        f(x)=\frac{1}{1+e^{-x}}

Using MATLAB to simulate the image of f(x) is as follows:

 The functional formula for bipolar S-type is as follows:

                                                             f(x)=\frac{​{e^x-e^{-x}}}{e^x+e^{-x}}

An image of the above formula looks like this:

Compared with Tan-signed, the Sigmoid function has better error tolerance and higher linear accuracy than the linear function.

Overall Framework of BP Neural Network Algorithm

The overall framework of the BP neuron network and the functions of its respective parts are:

forward propagation get the predicted result
backpropagation reverse transfer for w and b
test model Calculation accuracy

The BP neural network algorithm uses the back propagation algorithm for learning. The data is transmitted layer by layer backwards. From the perspective of the input layer, the whole process is carried out along the direction of error reduction. During the operation process, the connection weights of the network are continuously corrected forward, and finally the error is reduced. to a minimum.

Guess you like

Origin blog.csdn.net/qq_54186956/article/details/126382153