# Identification of Complicated Lithology with Machine Learning
## 3 Data Selection and Practical Application
### Model Construction
#### 3.4.2 SVR Regression Prediction of Felsic Content  
Originally, we selected 20% of the predictive factors for training. After achieving the best training results, we input the predictive factors of the test set into the trained model to obtain the predicted results. The evaluation metrics of the predicted results are shown in Table 4.  
Figure 11: Effect diagram of 80%-training-sample XGBoost prediction of felsic content in Well Lu 1.  
\begin{table}
\begin{tabular}{c c c c c} \hline  & **MAE** & **MSE** & **RMSE** & **R\({}^{2}\)** \\ \hline XGBoost & 0.12 & 0.022 & 0.15 & 0.42 \\ \hline \end{tabular}
\end{table}
Table 3: XGBoost model of 80% of the training samples in Well Lu 1 predicting the felsic evaluation index.  
The support vector regression (SVR) model performs well when using 20% of the training samples, as shown in Table 4. Its MAE is 0.12, MSE is 0.021, RMSE is 0.14, and R\({}^{2}\) is 0.39. Compared with the XGBoost model under the same proportion of training samples, the MAE of SVR decreased by 36.8%, the MSE decreased by 8.7%, and the R\({}^{2}\) increased by 8.3%. This indicates that under the condition of small samples, the SVR model has a better generalization ability, which may be attributable to its characteristics based on the principle of structural risk minimization, as well as the advantages of the kernel function (the Gaussian kernel used in this study) when dealing with nonlinear relationships.  
As shown in Figure 12, the fluctuations of the predicted values by the SVR model are generally similar to those of the actual values, although there are significant differences between the predicted and actual values at some peaks and troughs. Subsequently, 80% of the predictive factors were selected for training. After achieving the best training results, the predictive factors of the test set were input into the trained model to obtain the predicted results. The evaluation metrics of the predicted results are shown in Table 5.  
When the training samples increased to 80% (Table 5), the performance of the SVR model was further improved, with MAE dropping to 0.11 and R\({}^{2}\) increasing to 0.41. However, compared with the XGBoost model, the performance improvement of the SVR model after increasing the training samples was relatively small (the MAE only decreased by 8.3%, and the R\({}^{2}\) increased by 5.1%). This phenomenon indicates that the SVR model was able to capture the patterns in the data relatively well under the condition of small samples, and increasing the sample size has a relatively small marginal effect on the improvement of its performance.  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline  & **MAE** & **MSE** & **RMSE** & **R\({}^{2}\)** \\ \hline
**SVR** & 0.12 & 0.021 & 0.14 & 0.39 \\ \hline \hline \end{tabular}
\end{table}
Table 4: The SVR model of 20% of the training samples in Well Lu 1 predicting the evaluation index of felsic quality.  
Figure 12: Effect diagram of 20%-training-sample SVR prediction of felsic content in Well Lu 1.  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline  & **MAE** & **MSE** & **RMSE** & **R\({}^{2}\)** \\ \hline
**SVR** & 0.11 & 0.021 & 0.14 & 0.41 \\ \hline \hline \end{tabular}
\end{table}
Table 5: SVR model of 80% of the training samples in Well Lu 1 predicting the evaluation index of the felsic quality.  
From the perspective of practical applications, when the available training data is limited, SVR may be a more suitable choice. The prediction results are shown in Figure 13.