# Prediction and Optimization of Open-Pit Mine Blasting Based on Intelligent Algorithms
## 4 Methods  
### Least Squares Support Vector Machine  
Support vector machine (SVM) is a machine learning algorithm used for classification and regression tasks [31]. The core idea of SVM is to identify a hyperplane that maximizes the margin between classes. This means finding the optimal boundary between two classes such that the distance from the closest points to this boundary is maximized [32]. The schematic diagram of its structure is shown in Figure 2[33].  
Least squares support vector machine (LSSVM) is a method based on SVM [34]. In LSSVM, data are fitted by minimizing the sum of squared errors, and the decision function is constrained by introducing Lagrange multipliers. This method obtains model parameters by solving the dual problem rather than solving the primal problem as in traditional support vector machines. The following is the principle of LSSVM:  
\begin{table}
\begin{tabular}{c c c c c c c} \hline
**No.** & **S (m)** & **B (m)** & **\(q\) (kg/m3)** & **\(H_{0}\) (m)** & **\(T\)** & **P\({}_{50}\) (cm)** \\ \hline  
\hline \end{tabular}
\end{table}
Table 1: _Cont._  
Figure 2: The schematic diagram of SVM structure.  
Given a training sample set \(\{(x_{i},y_{i}),i=1,2,...,N\}\), where \(x_{i}\in R^{\text{d}}\) (\(R^{\text{d}}\) is a d-dimensional input vector) and \(y_{i}\in R\) is its corresponding predicted value. The optimization problem of LSSVM for the sample set is formulated as follows:  
\[\begin{split}\min\!\left(\omega,e\right)=\min(\frac{1}{2}\|\omega \|^{2}+\frac{\gamma}{2}\sum\limits_{i=1}^{N}e_{i}^{2})\\ \text{s.t.}y_{i}(\omega^{T}\phi(x_{i})+b)=1-e_{i},i=1,2,...,N \end{split} \tag{1}\]  
Among the variables, \(\omega\) is the weight vector, \(e_{i}\) is the slack variable, \(y_{i}\) is the label, \(\phi(x_{i})\) is the feature mapping, \(b\) is the bias term, and \(\gamma\) is the regularization parameter.  
The optimization problem is addressed by constructing the Lagrangian function:  
\[L(\omega,b,e,\alpha)=\frac{1}{2}\|\omega\|^{2}+\frac{\gamma}{2}\sum\limits_{i= 1}^{N}e_{i}^{2}-\sum\limits_{i=1}^{N}\alpha_{i}\Big{[}y_{i}(\omega^{T}\phi(x_ {i})+b)+e_{i}-1\Big{]} \tag{2}\]  
Among the variables, \(\alpha_{i}\) is the Lagrange multiplier.  
By setting the partial derivatives of the Lagrangian function with respect to \(\omega\),\(b\),\(e_{i}\) to zero [35], we obtain the dual problem [36]:  
\[\begin{bmatrix}0&y^{T}\\ y&\Omega+\gamma^{-1}I\end{bmatrix}\begin{bmatrix}b\\ a\end{bmatrix}=\begin{bmatrix}0\\ 1\end{bmatrix} \tag{3}\]  
Among the variables, \(y\) is the label vector, \(\alpha\) is the Lagrange multiplier vector, \(\Omega\) is the kernel matrix, and \(I\) is the identity matrix.  
By solving the linear equations above, we can obtain \(b\) and \(\alpha\). The final expression of the LSSVM model is  
\[f(x)=\sum\limits_{i=1}^{N}\alpha_{i}y_{i}K(x_{i},x_{i})+b \tag{4}\]  
where \(K\big{(}x_{i},x_{j}\big{)}\) is the kernel function, which plays a crucial role in LSSVM [37; 38].  
\[K(x_{i},x_{j})=\exp(-\frac{\|x-x_{i}\|^{2}}{2\sigma^{2}}) \tag{5}\]  
where \(\sigma\) is the width parameter of the kernel function. Both \(\sigma\) and the regularization parameter (\(\gamma\)) are key parameters of the LSSVM model and have a significant impact on the model's performance and generalization ability [39].