## 4 PSO Based on the PSO-BP Model
### PSO-BP Model Development  
PSO-BP neural network model optimization process is shown in Figure 11. The construction steps are as follows:  
1. Data preprocessing and model construction: First, normalize the input data. Subsequently, construct a backpropagation neural network (BPNN) model, define its network topology (including the number of nodes in the input layer, hidden layer, and output layer), and randomly initialize the connection weights and neuron thresholds.
2. PSO hyperparameter configuration: Set key operational parameters for the particle swarm optimization (PSO) algorithm, including maximum iteration count, particle population size (m), individual cognitive factor (c\({}_{1}\)), social learning factor (c\({}_{2}\)), and inertia weight coefficient controlling search capability.
3. Particle swarm initialization: Randomly generate initial positions of the particle swarm within the solution space dimensions corresponding to the BPNN parameters to be optimized (i.e., all weights and thresholds). Simultaneously, assign initial velocities to each particle and constrain their velocity variation range (setting maximum and minimum velocity values).
4. Initial fitness evaluation: Initiate the PSO process. Based on each particle's initial position (representing a set of BPNN parameters), compute its corresponding fitness value (typically the reciprocal or negative value of BPNN prediction error on the validation set). Evaluate the quality of the solution represented by each particle according to this fitness value.
5. Enter the iterative loop process. In each iteration:Update each particle's personal historical best position (P\({}_{\text{best}}\)): if the current position's fitness surpasses its historical best, update P\({}_{\text{best}}\).  
Update the global historical best position (G\({}_{\text{best}}\)) of the entire population: if a particle's Pbest fitness surpasses the current G\({}_{\text{best}}\), update G\({}_{\text{best}}\).  
Adjust each particle's state according to the following velocity-position update formula [33]:  
\[V_{ij}^{k+1}=wV_{ij}^{k}+c_{1}r_{1}\Big{(}P_{II}^{k}-X_{ij}^{k}\Big{)}+c_{2}r_ {2}\Big{(}G_{j}^{k}-X_{ij}^{k}\Big{)}X_{ij}^{k+1}=X_{ij}^{k}+V_{ij}^{k+1},1\leq i \leq n,1\leq j\leq d \tag{15}\]  
where  
k: Iteration count;  
w: Inertia weight coefficient;  
c\({}_{1}\), c\({}_{2}\): Learning factors (individual/social);  
r\({}_{1}\), r\({}_{2}\): Random numbers (for introducing randomness);  
P\({}_{\text{j}}\)\({}^{k}\): Dimension j of the best position vector found by particle i at iteration k;  
\(G_{j}^{k}\): Dimension j of the global best position at iteration k;  
\(X_{ij}^{k}\): Dimension j of the position vector of particle i at iteration k;  
\(V_{ij}^{k+1}\): Dimension j of the velocity vector of particle i at iteration (k + 1).  
Termination condition: The PSO stops when the iteration reaches the preset maximum count or when the particle swarm finds a global optimal solution satisfying the preset fitness threshold.  
Figure 11: Optimization process of the PSO-BP neural network model.  
Constructing the optimization model: Populate the BP neural network model built in Step 1 with the optimal combination of weight and threshold parameters output from the PSO process, thereby obtaining the enhanced-performance PSO-BP hybrid prediction model.