## 2 Method
### Lssvm  
LSSVM can be obtained by improving SVM using the least squares method, LSSVM is more concise and less time-consuming than SVM. LSSVM performs very well in linear regression, can avoid overfitting problems, and has a good generalization ability, so it is suitable for regression prediction.  
The constraints of the LSSVM are equational constraints in the following form:  
\[\begin{array}{l}\min\limits_{\omega,b,\sigma}J(\mathbf{\omega},\mathbf{e})=\frac{1} {2}\mathbf{\omega}^{T}\mathbf{\omega}+\frac{1}{2}\gamma\sum\limits_{k=1}^{N}\mathbf{e}_{ k}^{2}\\ s.t.\mathbf{y}_{k}\big{[}\mathbf{\omega}^{T}\varphi(\mathbf{x}_{k})+b\big{]}=1-\mathbf{e}_{k} \\ \gamma>0,k=1,2,\ldots,N\end{array} \tag{4}\]  
where the weight coefficients of the LSSVM are given as \(\mathbf{\omega}\), \(b\) is the threshold, \(\mathbf{e}_{k}\) is the deviation vector, \(\gamma\) is the penalty factor, \(\mathbf{x}_{k}\) is the eigenvector, \(\mathbf{y}_{k}\) is for category tags, and \(\varphi\) is a kernel function that allows linear computation on inputs.  
The original LSSVM problem can be transformed by the Lagrange multiplier method into a problem of finding the extreme value of a single parameter, i.e., finding the extreme value of \(\mathbf{\alpha}\), written as follows:  
\[\begin{array}{l}L(\mathbf{\omega},b,\mathbf{e};\mathbf{\alpha})=J(\mathbf{\omega},\mathbf{e})- \\ \sum\limits_{k=1}^{N}\mathbf{\alpha}_{k}\big{\{}\mathbf{y}_{k}\big{[}\mathbf{\omega}^{T} \varphi(\mathbf{x}_{k}+b)-1+\mathbf{e}_{k}\big{]}\big{\}}\end{array} \tag{5}\]  
where \(\mathbf{\alpha}\) is the Lagrangian daily vector and \(\mathbf{\alpha}_{k}\) is the Lagrangian daily number. Taking the derivatives of \(\mathbf{\omega}\), \(b\), \(\mathbf{\alpha}_{k}\), and \(\mathbf{e}_{k}\), respectively, and making their values 0, we obtain the following:  
\[\left\{\begin{array}{l}\frac{\partial L}{\partial\mathbf{\omega}}=0\to\mathbf{ \omega}=\sum\limits_{k=1}^{N}\mathbf{\alpha}_{k}\mathbf{y}_{k}\varphi(\mathbf{x}_{k})\\ \frac{\partial L}{\partial b}=0\to\sum\limits_{k=1}^{N}\mathbf{\alpha}_{k}\mathbf{y}_{ k}=0\\ \frac{\partial L}{\partial\mathbf{\alpha}_{k}}=0\to\mathbf{y}_{k}[\mathbf{\omega}^{T} \varphi(\mathbf{x}_{k}+b)]=1-\mathbf{e}_{k}\\ \frac{\partial L}{\partial\mathbf{e}_{k}}=0\to\mathbf{\alpha}_{k}=\gamma\mathbf{e}_{k} \end{array}\right. \tag{6}\]  
Solving the system of equations, we obtain the following:  
\[\mathbf{y}(\mathbf{x})=\sum\limits_{k=1}^{N}\mathbf{\alpha}_{k}\mathbf{y}_{k}K(\mathbf{x},\mathbf{x}_ {k})+b \tag{7}\]  
This is the expression for the LSSVM pre-diction, where \(K(\mathbf{x},\mathbf{x}_{k})\) is the kernel function. The kernel function chosen in this paper is the radial basis kernel function because of its excellent performance in terms of its generalization ability and wide convergence domain. The expression of the radial basis kernel function is as follows:  
\[K\big{(}\mathbf{x}_{i},\mathbf{x}_{j}\big{)}=\exp\Big{(}-x_{i}-x_{j}^{2}/2\sigma^{2} \Big{)}, \tag{8}\]  
where \(\sigma^{2}\) is the kernel function parameter. In LSSVM, the kernel function parameter \(\sigma^{2}\) and the penalty factor \(\gamma\) are the key hyperparameters, which determine the model's ability to differentiate between data samples, as well as its generalization ability and so on. In order to have the best performance of LSSVM, an optimization algorithm is needed to optimize LSSVM to find the optimal hyperparameter values.