## 2 Data and Methods
### Methods  
#### 2.2.1 Model for Prediction  
Support Vector Machine  
Suppose the training set of the SVM is \(\{X_{i},Y_{i}\}_{i}^{N}\), where \(X_{i}\) is the input variable, \(Y_{i}\) is the expected value, and \(N\) is the number of training sets. The SVM regression function is determined according to statistical learning theory [22] as follows. \[f(x)=w_{i}\phi_{i}(x)+b \tag{1}\]  
where \(\phi_{i}\) is the nonlinear transfer function that enables the mapping projection of the input variables from the low-dimensional space to the high-dimensional feature space, \(w_{i}\) is the representative weight vector, and \(b\) is the bias. \[r(C)=C\frac{1}{N}\sum_{i=1}^{N}L_{\varepsilon}(d_{i},y_{i})+\frac{1}{2}\|w\|^ {2} \tag{2}\]  
\[L_{\varepsilon}(d,y)=\left\{ \begin{array}{c}|d-y|-\varepsilon,|d-y|\geq \varepsilon\\ 0,|d-y|<\varepsilon\end{array} \right. \tag{3}\]  
In Equation (2), the first part of the right-hand side of the equation is the empirical risk, which can be found by Equation (4) below. The loss value of the insensitive loss function is 0 when within the allowed range [23]. The regularization constant \(C\) can determine the criticality of the empirical risk in the optimization of real-world problems. The larger the value of \(C\), the higher the corresponding percentage of empirical risk. The error tolerance \(\varepsilon\) denotes the approximate accuracy during training, \(\xi\) and \(\xi^{*}\) are positive relaxation variables, thus Equation (4) can be transferred to a constrained form as follows. \[Minimize:\frac{1}{2}\|w\|^{2}+C\Bigg{(}\frac{N}{i}(\xi_{i}+\xi_{i}^{*})\Bigg{)} \tag{4}\]  
Figure 2: Chengbi River karst basin. \[Subjectto\left\{ \begin{array}{l}\sum\limits_{i=1}^{N}\left(\alpha_{i}-\alpha_{i}^{* }\right)=0\\ \alpha_{i},\alpha_{i}^{*}\in[0,C],i=1,2,3,\cdots,N\end{array} \right. \tag{5}\]  
To solve the optimization problem of Equation (4), the Lagrangian function is introduced as:  
\[ \begin{array}{l}L=\frac{1}{2}\|w\|^{2}+C\left(\sum\limits_{i=1}^{N}\left( \zeta_{i}+\zeta_{i}^{*}\right)\right)-\sum\limits_{i=1}^{N}\alpha_{i}(w_{i} \phi(x_{i})+b-d_{i}+\varepsilon+\zeta_{i})\\ -\sum\limits_{i=1}^{N}\alpha_{i}^{*}\left(d_{i}+w_{i}\phi(x)-b+\epsilon_{i}^{* }\right)-\sum\limits_{i=1}^{N}\left(\beta_{i}\zeta_{i}+\beta_{i}^{*}\zeta_{i}^ {*}\right)\end{array}  \tag{6}\]  
In Equation (6), the minimum values of a, \(b\), and \(c\) need to be calculated, while the maximum values of \(d\) and \(f\) need to be calculated. By adding the Karush-Kuhn-Tucker condition to the regression algorithm the equation is transformed into a double Lagrangian form,  
\[ \begin{array}{l}v\left(\alpha_{i},\alpha_{i}^{*}\right)=\sum\limits_{i=1}^{ N}d_{i}\left(\alpha_{i}-\alpha_{i}^{*}\right)-\varepsilon\sum\limits_{i=1}^{N} \left(\alpha_{i}+\alpha_{i}^{*}\right)\\ -\frac{1}{2}\sum\limits_{i=1,j=1}^{N}\left(\alpha_{i}-\alpha_{i}^{*}\right) \left(\alpha_{j}-\alpha_{j}^{*}\right)K\left(x_{i},x_{j}\right)\end{array}  \tag{7}\]  
\[Subjectto\left\{ \begin{array}{l}\sum\limits_{i=1}^{N}\left(\alpha_{i}- \alpha_{i}^{*}\right)=0\\ \alpha_{i},\alpha_{i}^{*}\in[0,C],i=1,2,3,\cdots,N\end{array} \right. \tag{8}\]  
where: \(\alpha_{i}\) and \(\alpha_{i}^{*}\) satisfy the equation. The calculation method of the optimal expected weight vector of the regression hyperplane is:  
\[w^{*}=\sum\limits_{i=1}^{N}(\alpha_{i}-\alpha_{i}^{*})K(x,x_{i}) \tag{9}\]  
\[f(x,\alpha,\alpha^{*})=\sum\limits_{i=1}^{N}(\alpha_{i}-\alpha_{i}^{*})K(x,x_ {i})+b \tag{10}\]  
The kernel function in the above equation is expressed as  
\[K\left(x_{i},x_{j}\right)=\varphi(x_{i})*\varphi\left(x_{j}\right) \tag{11}\]  
The kernel function is the inner product of the high-dimensional feature space, and the Mercer condition is considered when choosing the kernel function, i.e., choosing a semi-positive definite function. The kernel functions have more types, and the four main types of kernel functions commonly used in SVM are as follows [24].