## 2 Materials and Methods
### The Combined Model of PSO, GA, and BPNN  
Both PSO and GA are optimization algorithms that try to simulate the adaptability of individual populations on the basis of natural characteristics. Both of them use certain transformation rules to solve the problem through searching space. Besides, they both have parallel search features, thus reducing the possibility of falling into local minimum in BPNN. Both PSO and GA algorithms have good optimization performance but also have disadvantages and limitations. Both in PSO and GA, parameters are determined by experience, which will cause premature convergence, slow convergence speed, and finally affect the optimization performance.  
PSO and GA optimize BPNN by optimizing the connection weight and threshold of BPNN. This PSO and GA hybrid algorithm is based on the PSO algorithm, and the genetic algorithm is added in the process of the PSO algorithm. It combines the advantages of the two algorithms and has the advantages of less computation, fast convergence, and good global convergence performance. The steps of the PSO-GA-BP are as follows.  
**Step 1.** BP neural network initialization. According to the input and output dimensions of the model, the hierarchical structure of the neural network and the number of nodes in the hidden layer are determined.  
**Step 2.** Particle swarm initialization. According to the network structure, the particle parameters and the number of particles are determined. The velocity and position of the particles are encoded by binary code. The mean square error (MSE) is selected to calculate the fitness value.  
\[\text{MSE}=\frac{1}{N}\sum_{i=1}^{N}(y-\hat{y})^{2} \tag{13}\]  
**Step 3.** Calculate the fitness value. Calculate the fitness value of each particle and determine whether the target conditions are met. If the target condition is met, the output result is obtained; If the target condition is not satisfied, the individual optimum and global optimum of the particles are updated.  
**Step 4.** PSO added Crossover operator. Particle swarm optimization adds the selection crossover step of genetic algorithm, selects the particles with better fitness by the wheel bet method, crosses the position and speed of the particle group according to the probability \(\text{Pa}=0.4\), and selects the particles with better fitness after crossing into the particle group for the next iteration.  
**Step 5.** PSO added Mutation operator. Particle swarm optimization adds the mutation step of the genetic algorithm. According to the probability \(\text{Pb}=0.01\), the mutation operation is carried out on the position and velocity of the particles with poor fitness in the particle swarm, and the particles after the mutation operation are put into the particle swarm.  
**Step 6.** Calculate the fitness value by fitness function and update the _gBest_ and _zBest_ particle swarm optimization.  
**Step 7.** Determine whether the target value of the set particle swarm is met or has reached the maximum evolutionary algebra. If the condition is met, the optimal solution _zBest_ is output; If it is not met, then jump to step (3) and continue to complete the iteration.  
**Step 8.** Decode the optimal solution after the iteration is completed and substitute initial weights and thresholds into the preset BP neural network. Further, the PSO-GA-BP neural network model was obtained.  
Flow chart of PSO-GA-BP neural network prediction model is shown in Figure 2 as follows.