# Prediction Method for Mine Earthquake in Time Sequence Based on Clustering Analysis
## 2 Methodology Background
### Support Vector Regression  
In recent years, the support vector machine (SVM) has been a hot research topic in the field of machine learning applications. It is a machine learning method based on statistical learning theory and the structural risk minimization principle. Because of its good learning ability, the SVM is widely used in many fields of life and production [27; 28], mainly to solve the problems of classification and regression analysis. The SVM has a solid mathematical theoretical foundation and excellent performance, so can well solve many key problems of modeling based on neural network, especially the problem of neural network training. The SVM structure is shown in Figure 2:  
The traditional SVM is a generalized linear classifier, which is used to solve data classification problem. However, the theory of the SVM can be adjusted so that it can also be applied to regression analysis problem. This improved method is called Support Vector Regression (SVR). It is flexibly applied to the modeling of nonlinear regression problem and can show unique advantage when processing multidimensional or high-dimensional data, because the nonlinear kernel function in the algorithm can map the sample data to a higher dimensional feature space and can quickly find the linear regression function. The SVR algorithm has many advantages, such as low generalization error rate, low computational complexity, not falling into local optimization, and high accuracy in dealing with nonlinear prediction and regression problem. As shown in Figure 3, the objective of the algorithm is to find the function \(f(x)\), which wants to maximize the \"soft edge \(\epsilon\)\" to include as many target values as possible while maintaining a certain flatness. Figure 3: Basic concept diagram of SVR. Figure 2: Schematic diagram of SVM structure. The regression prediction of data can be realized by finding the decision boundary that maximizes the edge. The function can be expressed as follows:  
\[f(x)=\omega^{T}x+b \tag{4}\]  
where \(\omega\) is the weighting coefficient, \(b\) is the threshold, also known as the bias term, flatness means that we need to find a \(\omega\) as small as possible (in the sense of Euclidean norm, that is \(||\omega||^{2}\)). This problem can be transformed into a convex optimization problem:  
\[min\frac{1}{2}\parallel\omega\parallel^{2} \tag{5}\]  
\[subject\ to \begin{cases}y_{i}-\omega x_{i}-b\leq\varepsilon\\ \omega x_{i}+b-y_{i}\leq\varepsilon\end{cases}  \tag{6}\]  
where \(\varepsilon\) is the allowable error value of the regression function, and the smaller \(\varepsilon\) is, the smaller the error of the regression function will be, indicating that the sample points are more concentrated. However, not every sample point in the training set can meet the constraint conditions. Therefore, relaxation variables \(\xi_{i}^{+}\) and \(\xi_{i}^{-}\) can be introduced to alleviate the optimization constraint problem. The above formula can be rewritten as follows:  
\[min\ L\big{(}\omega,\xi_{i}^{+},\xi_{i}^{-}\big{)}=min\Bigg{(}\frac{1}{2} \parallel\omega\parallel^{2}+C\sum\limits_{i=1}^{n}\big{(}\xi_{i}^{+}+\xi_{i }^{-}\big{)}\Bigg{)} \tag{7}\]  
\[subject\ to \begin{cases}y_{i}-\omega x_{i}-b\leq\varepsilon+\xi_{i}^{+}\\ \omega x_{i}+b-y_{i}\leq\varepsilon+\xi_{i}^{-}\\ \xi_{i}^{+},\xi_{i}^{-}\geq 0\end{cases}  \tag{8}\]  
where \(C\) is the penalty factor, which is a positive value, indicating the penalty degree of the samples exceeding the allowable error, and is used to adjust the trade-off between the relaxation variable and the boundary. Lagrange multiplier method and duality theory are applied to the above formula, and Lagrange multipliers \(\alpha^{+}\) and \(\alpha^{-}\) are introduced.