# Improved Particle Swarm Optimization for Sea Surface Temperature Prediction
## 3 The Proposed DSL Method
### Parameter Optimization Using LSPSO  
The basic operations of a standard PSO are particle speed and position updates:  
\[v_{i,d}^{k+1}=wv_{i,d}^{k}+c_{1}r_{1}(p_{\text{Ptest},d}^{k}-x_{i,d}^{k})+c_{2}r _{2}(p_{\text{Gtest},d}^{k}-x_{i,d}^{k}) \tag{7}\]  
\[x_{i,d}^{k+1}=x_{i,d}^{k}+v_{i,d}^{k} \tag{8}\]  
where w is the inertia weight, \(c_{1},c_{2}\) are learning factors, \(r_{1},r_{2}\) are mutually independent random numbers in the interval [0, 1], \(k\) is the number of evolutions, \(d\) is the search space dimension. Pbest is the optimal location for each particle search, and Gbest is the optimal location for the entire particle swarm search. When PSO optimizes the parameters of the SST model, the search ability is weak in the late search, and it is easy to fall into local optimum, which is not conducive to optimize the model parameter. Therefore, we proposed LSPSO, which differs from the PSO as summarized below:  
1. PSO adopts a random method in population initialization, which leads to each particle appearing in a random distribution state in space, lacking the guidance of prior knowledge, which is not conducive to the particle close to the optimal solution. In this paper, the Beta distribution strategy is used to initialize the population, which is beneficial to the rapid formation of the surrounding situation by the particles to the optimal solution. 2. The global and local search capabilities of PSO are mutually constrained and tend to fall into local optimum in the later stages of search. This paper uses local search strategy to enhance the local search ability of PSO, so that the improved PSO has independent global and local search capabilities. 3. Particles tend to cross out of bounds during flight. Particles flying faster than the bound range will mutate; flying speeds that exceed half of the constraint range and below the constraint range decelerate to prevent particles from crossing the boundary. When LSPSO optimizes the parameters of DS, it can be expressed as follows:  
\[ \begin{array}{l}\min\text{RMSE}=G_{1}(PL,IS)\\ \min\text{RT}=G_{2}(PL,IS)\\ \qquad\qquad\qquad\qquad\qquad s.t\\ PS=\{x\}\{1\leq x\leq 360,x\in Z\}\\ IS=\left\{y\}\{1\leq y\leq 30,y\in Z\right\}\end{array}  \tag{9}\]  
where RMSE gives the accuracy of the DS; RT is the running time of the DS; PL represents the pattern length; and IS represents the interval step. Figure 2 depicts the flow chart of LSPSO, including the following steps:  
1. Randomly initialize the population using the Beta strategy; each particle has two attributes: the pattern length and the interval step;
2. Calculate the RMSE and RT of each particle, and then filter out the non-dominated solution according to the non-dominated relationship, and store it in the external population, S;* Local search of the external population, S by local search, to enhance the local search ability of the particle, and obtain the population S';
* Control the population in population D by crowding distance;
* Update Pbest and Gbest;
* Update the velocity and position of the particle according to Formulas (7) and (8);
* Determine whether the termination condition is met. If it does, output the optimal solution set and select the appropriate parameters for predicting SST; otherwise, add G to 1, and return to step 2. The traditional particle swarm optimization algorithm typically uses random initialization to generate the initial solution. Due to the lack of guidance of prior information, it is not conducive to the initial particle to move closer to the optimal solution. In this paper, the Beta distribution initialization strategy is used to initialize the population, which is beneficial to the particle to form the enclosing situation to the optimal solution. The shape of the Beta function is a symmetric U-shape, and the candidate set is most likely to be located near the boundary of the search space. At this time, the global optimal solution is better enclosed within the initial particle population.