## 4 Methodology
### Pann  
Slow learning speed and ease of falling into local minima are the inherent disadvantages of ANN. This section attempts to improve the performance of ANN by the particle  
Figure 5: Architecture of the proposed ANN model. swarm optimization (PSO) algorithm. As a heuristic algorithm, the PSO algorithm with powerful global optimal searchability is a kind of evolutionary computing technology. Particles are the basic unit of PSO algorithm, and each particle represents a candidate solution to the optimization problem in the population. The basic principle of PSO is to simulate the flight of birds by using a swarm of particles with only velocity and position attributes. The position of the food represents the optimal solution to the problem, and the distance between the particle and the optimal solution represents the objective function value of the current particle. Each particle finds the optimal position separately, and the optimal position sought by each particle is the individual extremum. Then, each particle shares the individual extreme value with other particles, and finds the best individual extreme value by comparison, and the best individual extreme value is the best value of the group. Finally, all particles are updated according to the current individual optimal position and group optimal position, and the above steps are repeated until the optimal solution is found. The specific Implementation process of PSO is as follows:  
Suppose that there are \(N\) particles in the D-dimensional space, and \(X\) and \(V\) are used to represent the position and velocity of the particles. The position of the \(i\)th particle is:  
\[X_{iD}=(x_{i1},x_{i2},\dots,x_{iD}). \tag{9}\]  
The velocity of the \(i\)th particle is given in Equation (10):  
\[V_{iD}=(v_{i1},v_{i2},\dots,v_{iD}). \tag{10}\]  
In every iteration of the system, the particle moves to find the best places (i.e., \(P_{best}\) and \(G_{best}\)). The velocity and position of all particles can be attained:  
\[V_{iD}\;^{new}=V_{iD}+R_{1}+C_{1}R_{1}(P_{best}-X_{iD})+C_{2}R_{2}(G_{best}-X_{ iD}) \tag{11}\]  
\[X_{iD}\;^{new}=X_{iD}+V_{iD}\;^{new} \tag{12}\]  
where \(V_{iD}\;^{new}\) and \(X_{iD}\;^{new}\) are terms that show the updated velocity and position of particles; \(C_{1}\) and \(C_{2}\) are two customized position acceleration constants; and two positive acceleration constants \(R_{1}\) and \(R_{2}\) are the random numbers in the range of (0,1). In order to deepen the understanding of the PSO algorithm, the geometrical illustration of particles moving in two-dimensional space is shown in Figure 6. \(P_{best}\) denotes the local best position, and \(G_{best}\) denotes the global best position. Further details about the use of PSO development and operations can be found in the Ref. [82]. The PSO is utilized to search the hyperparameters of ANN, such as the optimal number of neurons, learning rate, and number of iterations. The connection weights and thresholds of the ANN are mapped to a swarm of particles. The dimension of each particle represents the sum of the number of weights in the network that play a connection role and the number of network thresholds. Using the PSO algorithm to train neural network can give full play to its global optimization ability and local rapid convergence advantages. The particle moves and searches in the weight and threshold space to minimize the error of the Output layer of the neural network. Finally, a hybrid PANN model is developed by using the advantages of PSO and ANN. The good global search ability of PSO improves the generalization ability and learning performance of ANN. The hybrid PANN model incorporates the advantages of PSO and ANN; specifically, PSO finds the global minimum in the search space, while ANN finds the best result using the determined global minimum. In addition, PCA is performed on the original data to extract new variables that meet the requirements of principal components.