## 2 Principle of PSO-LSSVM
### Principle Swarm Optimization  
Particle swarm optimization is a newly developed evolutionary algorithm. The global optimum is found by following the optimal value that is currently identified. The idea of PSO stems from the study of the predation behavior of birds. A group of birds searches for food randomly. If there is only one piece of food in this area, the simplest and most effective strategy for finding food is to search for the area around the bird closest to the food. When the PSO solves the optimization problem, the problem's solution corresponds to the position of a bird in the search space, and the birds are called particles or agents. Each particle has its position and velocity (determining the direction and distance of flight) and an adaptation value determined by the optimized function. Each particle remembers, follows the current optimal particle, and searches in the solution space. The process of each iteration is not entirely random. If a better solution is found, it will be used as a basis for finding the next solution. Let PSO initialize into a group of random particles (random solutions). In each iteration, the particles are updated by tracking two \"extreme values\": the first one is the best solution found by the particles themselves, the individual extreme points (Pi is used to indicate its position), and the other--an extreme point--is the best solution currently found for the entire population, which is the global extreme point (used to indicate its position). After seeing the two best solutions, the particles can update their position and flight speed according to Equations (6) and (7). Supposing that there are m particles, the information for particle i can be represented by a D-dimensional vector, where the position of the i-th particle is \(X_{i}^{i}=(X_{i1},X_{i2},\ldots,x_{iD})\), \(I=1,2,\ldots,m\), and its speed is \(V_{i}^{i}=(v_{i1},v_{i2},\ldots,v_{iD})\). Bringing Xi into the optimized objective function calculates its fitness value. The optimal position searched for the i-th particle is \(P_{i}=(P_{i1},P_{i2},\ldots,P_{iD})\). The optimal location for the entire particle swarm search is \(P_{i}^{c}=\left(P_{g1},P_{g2},\ldots,P_{gD}\right)\). The particle status update operation is as follows:  
\[V_{id}^{n+1}=\epsilon V_{id}^{n}+c1r_{1}(P_{id}^{n}-X_{id}^{n})+c2r_{2}\left(P _{gd}^{n}-X_{id}^{n}\right) \tag{6}\]  
\[X_{id}^{n+1}=X_{id}^{n}+V_{id}^{n+1} \tag{7}\]  
where \(\epsilon\) is the inertia weight, whose value affects the global and local search ability of the particle swarm to prevent the problem of local minima; \(c1\) and \(c2\) are learning factors, which are non-negative constants; r1 and r2 are random numbers between the interval [0,1]; \(P_{id}^{n}\) and \(P_{gd}^{n}\) are the individual optimal solution and the global optimal solution, respectively, of the ith particle in the dth dimension since the nth iteration; \(X_{id}^{n+1}\) and \(V_{id}^{n+1}\) denote the position and velocity of the ith particle in the nth iteration of the dth dimension position and velocity, respectively. The choice of inertia weights is crucial. Larger ones have better global search capability and smaller ones have stronger local search capability. Therefore, the inertia weights should be reduced continuously as the number of iterations increases, so that the particle swarm optimization algorithm has a strong global convergence capability in the initial stage and a strong local convergence capability in the later stage. When the acceleration factor c1 is large, the particles will over-twitch in the local range, and when c2 is large, the particles will converge to the local optimum prematurely. To balance the role of random factors, this paper takes c1 = c2 = 1.5. The iterative abort condition is generally chosen to maximize the number of iterations, and the optimal position of the particle swarm currently searching satisfies the adaptive threshold eps = \(10^{-7}\).