## 2 Materials and Methods
### Methodology of FOA-LS-SVM Model
#### 2.2.2 Least Squares Support Vector Machine (LS-SVM)  
Regarding those issues above, an improved version of SVM, called least Squares Support Vector Machine, was proposed by [PERSON] and [PERSON] [33]. By substituting the convex quadratic programming problem through utilizing equality constraints, LS-SVM can not only reduce the complexity of SVM, but also enhance its convergence speed. For LS-SVM, the formulation of primal problem can be expressed as Equation (3) [18; 33].  
\[\min\!J(w,e)=\frac{1}{2}w^{\mathrm{T}}w+\frac{1}{2}\gamma\sum_{k=1}^{N}e_{k}^ {2},\quad y>0 \tag{3}\]  
Subject to  
\[y_{k}=w^{\mathrm{T}}\varphi(x_{k})+b+e_{k},\quad k=1,\ldots,N \tag{4}\]  
where \(\gamma\) represents the regularization parameter, which balances the training errors and the complexity of model; and \(e_{k}\) represents the slack variable.  
To solve this optimization problem, the Lagrange function is adopted to construct as follow.  
\[L(w,b,e,\alpha)=J(w,e)-\sum_{k=1}^{N}\alpha_{k}[w^{\mathrm{T}}\varphi(x_{k})+ b+e_{k}-y_{k}] \tag{5}\]  
where \(\alpha_{k}\) are Lagrange multipliers. According to the Kuhn-Tucker conditions [34], the solutions of Equation (5) can be obtained by performing partial differential for each variable.  
\[\left\{\begin{array}{l}\frac{\partial L}{\partial w}=0\Rightarrow w=\sum\limits_{k= 1}^{N}\alpha_{k}\varphi(x_{k})\\ \frac{\partial L}{\partial b}=0\Rightarrow w=\sum\limits_{k=1}^{N}\alpha_{k}=0 \\ \frac{\partial L}{\partial x_{k}}=0\Rightarrow\alpha_{k}=\gamma e_{k},\,k=1, \ldots,N\\ \frac{\partial L}{\partial\alpha_{k}}=0\Rightarrow\alpha_{k}=w^{\intercal} \varphi(x_{k})+b+e_{k}-y_{k},\,k=1,\ldots,N\end{array}\right. \tag{6}\]  
After \(w\) and \(e_{k}\) are removed, the solution of Equation (6) can also be rewritten by:  
\[\left[\begin{array}{c}b\\ \alpha\end{array}\right]=\left[\begin{array}{cc}0&\overset{\rightarrow}{I} \\ \overset{\rightarrow}{I}&\Omega+\gamma^{-1}I\end{array}\right]\left[\begin{array} []{c}0\\ y\end{array}\right] \tag{7}\]  
with  
\[\left\{\begin{array}{l}\alpha=[\alpha_{1},\ldots,\alpha_{N}]\\ y=[y_{1},\ldots,y_{N}]\\ \overset{\rightarrow}{I}=[1,\ldots,1]\\ \Omega=\{\Omega_{k}\,|k=1\ldots,N\}\end{array}\right.\]  
and  
\[\Omega_{k}=\varphi(x_{k})^{\mathrm{T}}\varphi(x)=K(x_{k},x),\,k=1,\ldots,N\]  
Then, the regression function of LS-SVM model for parameter prediction can be obtained as:  
\[y_{k}=\sum\limits_{k=1}^{N}\alpha_{k}K(x,x_{k})+b \tag{8}\]  
where \(K(x,x_{k})\) is the kernel function, which is used for mapping input vectors into a high-dimension feature space. There are several kinds of kernel functions including radial basis function (RBF), polynomial, sigmoid. Due to an excellent overall performance and fewer parameters, the RBF kernel function is more interesting to apply in many fields [35]. Therefore, the RBF kernel function was selected in this work and its equation is expressed as:  
\[K(x,x_{k})=\exp\left[-\frac{||\,x_{k}-x\,||\,^{2}}{\sigma^{2}}\right] \tag{9}\]  
where \(\sigma^{2}\) is the kernel parameter, which can be optimized by an optimization algorithm such as FOA.  
Consequently, in the LS-SVM mode, there are only two parameters, which are \(\gamma\) and \(\sigma^{2}\), need to be chosen. In this work, an improved fruit fly optimization algorithm will be applied for seeking the optimal values of \(\gamma\) and \(\sigma^{2}\).