## 3 Theoretical Derivation of Models and Generalized Modeling for Rapid Prediction
### Theoretical Derivation of Agent Model Based on PSO-SVR
#### 3.1.1 Particle Swarm Optimization  
Hyperparameters are parameters set manually before the algorithm to control the behavior and performance of the model. To avoid the arbitrariness of hyperparameter selection, a particle swarm optimization algorithm is used for the optimal search of hyperparameters. The particle swarm optimization algorithm is an efficient optimization algorithm inspired by the feeding behavior of bird flocks, and its basic idea is to find the optimal solution through the direct assistance and information sharing of individuals in the group [26]. The support vector regression hyperparameter optimization process by particle swarm algorithm is shown below.  
Step 1: Initialization  
1. Set the number of particles \(N\); set the maximum number of iterations \(M\); set the current number of iterations \(k=0\); set the termination condition.
2. Set the search boundary \(Xlim\) for each parameter.
3. Within the search boundary \(Xlim\), randomly generate an initial particle swarm \(P0\), which consists of \(N\) particles: \(x_{i}(0)\quad\forall i\in 1:N\), where \(x_{i}\) is the value of the support vector hyperparameter.
4. Calculate the fitness \(f(x_{i}(0))\) of all particles, record the local optimal solution of the particle, i.e., \(\textbf{pbest}_{i}(0)\forall i\in 1:N\), and record the globally optimal particle \(\textbf{gbest}_{i}(0)\), where \(f(\cdot)\) is the fitness function, i.e., the objective function. Step 2: Iteration  
Repeat the following steps until the termination threshold is satisfied or the number of iteration steps \(k\) reaches \(M\).  
Figure 3: Radially adjacent infrared heating cage partition (from left to right: flat, cylindrical, round table).  
1. Update the velocity of each particle: \[\mathbf{v}_{i}(k+1)=w\mathbf{v}_{i}(k)+c_{1}\mathbf{R}_{1}(\mathbf{pbest}_{i}(k)- \mathbf{x}_{i}(k))+c_{2}\mathbf{R}_{2}(\mathbf{gbest}(k)-\mathbf{x}_{i}(k))\] (2) where \(v_{i}^{k}\) is the flight speed of the particle, \(c_{1},c_{2}\) is the positive acceleration coefficient, also known as the \"cognitive coefficient\" and \"social coefficient\", usually takes the value of the range of \(0\leq c_{1},c_{2}\leq 4\), \(R_{1},~{}R_{2}\) is the uniform distribution generated by the [0, 1] between the two diagonal matrices of random numbers. Two diagonal matrices composed of random numbers. Therefore, both social and cognitive components have stochastic effects on speed updates.
2. Update particle position. \[\mathbf{x}_{i}(k+1)=\mathbf{x}_{i}(k)+\mathbf{v}_{i}(k+1)~{}~{}\forall i\in 1:N\] (3)
3. Evaluate the fitness of all particles: \(f(\mathbf{x}_{i}^{k+1})\) If \(f(\mathbf{x}_{i}(k+1))<f(\boldsymbol{pbest}_{i}(k))\), update the individual optimum: \(\boldsymbol{pbest}_{i}(k+1)=\mathbf{x}_{i}(k+1)\). If \(f(\mathbf{x}_{i}(k+1))<f(\boldsymbol{gbest}_{i}(k))\), update the global optimum: \(\boldsymbol{gbest}_{i}(k+1)=\mathbf{x}_{i}(k+1)\). Where a modified cross-validation algorithm obtains the fitness function of each particle. Step 3: At the end of the iteration, the optimal particle is output. The optimal particle is the optimized model parameter vector.