## 2 Theory and Methodology
### Least Square Support Vector Machines  
LSSVM inherits the generalization capability and robustness of SVM, with the added benefit of superior computational efficiency compared to SVM. LSSVM transforms the  
Figure 3: Calculated apparent resistivities from (**a-c**) \(x\)-direction magnetic field gradient \(H_{z}^{\Delta x}\); (**d-f**) \(y\)-direction magnetic field gradient \(H_{z}^{\Delta y}\) of uniform half-space models with different resistivities.  
inequality constraints of SVM into equations, adds an error variable, and introduces the L2 regularization term of the error variable as a penalty term, which improves the accuracy and speed of convergence. In this paper, we consider a given sample dataset \(\{x_{k},y_{k}\}_{k=1}^{N}\), where \(x_{k}\) denotes the input data, \(y_{k}\) denotes the target data, \(N\) is the total number of samples. In the feature space, the regression function can be given by [25; 26]  
\[y(x)=w^{T}\phi(x)+b, \tag{4}\]  
where \(w\) is the weight vector, \(b\) is the bias term, \(\phi(x)\) is the non-linear function that maps the input data points to a high-dimensional feature space where linear regression is performed.  
According to the structural risk minimization principle, the objective function and constraints can be described as:  
\[\begin{array}{ll}\underset{w,b,\xi}{\min}&\big{(}w,\xi\big{)}=\frac{1}{2}w^ {T}w+\frac{1}{2}\gamma\sum\limits_{k=1}^{N}\xi_{k}^{2}\\ \text{s.t.}&y_{k}=w^{T}\phi(x_{k})+b+\xi_{k},\quad k=1,2,\dots,N,\end{array} \tag{5}\]  
where \(\gamma\) is a regularization parameter, \(\xi_{k}\) is the slack variable.  
Using the Lagrange method to solve the optimization problem, it follows that  
\[L(w,b,\xi,\alpha)=\frac{1}{2}w^{T}w+\frac{1}{2}\gamma\sum\limits_{k=1}^{N}\xi_ {k}^{2}-\sum\limits_{k=1}^{N}\alpha_{k}\Big{\{}w^{T}\phi(x_{k})+b+\xi_{k}-y_{k }\Big{\}}, \tag{6}\]  
where \(\alpha_{k}\) is the Lagrange multiplier. The conditions for optimality can be obtained by differentiating with respect to the primal variables \(w\), \(b\), \(\xi_{k}\), and \(\alpha_{k}\),  
\[\begin{array}{ll}\frac{dL}{dw}=0\to w=\sum\limits_{k=1}^{N}\alpha_{k}\phi(x_ {k}),\\ \frac{dL}{db}=0\to\sum\limits_{k=1}^{N}\alpha_{k}=0,\\ \frac{dL}{dC_{k}}=0\to\alpha_{k}=\gamma\xi_{k},\;\;k=1,2,\dots,N,\\ \frac{dL}{da_{k}}=0\to y_{k}=w^{T}\phi(x_{k})+b+\xi_{k},\;\;k=1,2,\dots,N, \end{array} \tag{7}\]  
By elimination of \(w\) and \(\xi_{k}\), the linear system can be obtained as follows [34]:  
\[\left[\begin{array}{cccc}0&1&\dots&1\\ 1&K(x,x_{k})+\gamma^{-1}&\dots&K(x,x_{k})\\ \vdots&\vdots&\dots&\vdots\\ 1&K(x,x_{k})&\dots&K(x,x_{k})+\gamma^{-1}\end{array}\right]\left[\begin{array} []{c}b\\ \alpha_{1}\\ \vdots\\ \alpha_{N}\end{array}\right]=\left[\begin{array}{c}0\\ y_{1}\\ \vdots\\ y_{N}\end{array}\right], \tag{8}\]  
where the kernel function \(K(x,x_{k})={\phi(x_{k})}^{T}\phi(x)\) is a symmetric function satisfying the conditions of [PERSON]'s theorem [35]. The resulting LSSVM for the function estimation can thus be formulated as  
\[y(x)=\sum\limits_{k=1}^{N}\alpha_{k}K(x,x_{k})+b, \tag{9}\]  
The LSSVMs employ various kernel functions, including linear kernel functions, polynomial kernel functions, radial basis functions (RBFs), and sigmoid kernel functions. The radial basis function, which has fewer parameters and a strong generalization ability, is adopted and its expression is as follows:  
\[K(x,x_{k})=\exp(-\frac{\|x-x_{k}\|^{2}}{2\sigma^{2}}). \tag{10}\]  
where \(\sigma\) is the width of the radial basis function.  
The optimization problem of the LSSVM parameters is commonly transformed into a parametric estimation problem of a multiple linear regression function. The regularization parameter \(\gamma\) and the kernel parameter \(\sigma\) significantly impact the performance of the LSSVM model, so optimizing them is necessary to prevent poor accuracy caused by random parameters and premature convergence to locally optimal solutions.