# Machine Learning Techniques for Soil Characterization Using Cone Penetration Test Data
## 3 Methodology  
This section outlines the training and testing procedures for the ML models used to predict \(V_{s}\). Four ML models, namely RF, SVM, DT and XGBoost, were trained for this purpose. Each ML model was trained on the training datasets, with \(q_{c}\), \(f_{s}\), friction ratio (\(R_{f}\)), and soil depth (\(D\)) serving as input features and \(V_{s}\) as target variable (output). To optimize the performance of these models, the hyperparameters of each model were fine-tuned using a model-based Bayesian optimization technique. To ensure that the models can generalize well to new data, the commonly used k-fold cross-validation techniques were employed. This involves dividing the data into k subsets, training the model on k-1 subsets, and evaluating their performance on the remaining subset. The root mean squared error (RMSE) was used as the evaluation metric to assess the models' accuracy. In addition to hyperparameter tuning, permutation feature importance and/or recursive feature elimination techniques were applied using the optimized models. This technique was used for the identification and removal of irrelevant features, if present, in the input features. Once the irrelevant features were eliminated, the hyperparameter tuning process was repeated with the updated features to further enhance the models' performance. Finally, the performances of the optimized models were assessed using the testing dataset. The entire process of training and testing the models is presented in Figure 5, providing a visual representation of the workflow.  
The performance of optimized ML models was evaluated using multiple statistical metrics such as root mean squared error (RMSE), mean absolute error (MAE), mean absolute percentage error (MAPE), coefficient of determination \(\left(R^{2}\right)\), scatter index (\(SI\)), and performance index (\(PI\)) (see Table 2). Many researchers utilized these indices to evaluate the predictive performance of different ML models [53; 54; 55; 56; 57; 58; 59; 60]. The RMSE measures the average magnitude of the errors between the predicted and actual values, indicating the model's predictive accuracy. A lower RMSE indicates better model performance. MAE estimates the average absolute difference between the predicted and actual values. Like RMSE, a lower MAE indicates better model performance. MAPE represents the average percentage difference between the predicted and actual values. A lower MAPE signifies better model accuracy. \(R^{2}\) measures the proportion of the variance in the target variable (\(V_{S}\)) that can be explained by the model, with values closer to 1 indicating a better fit. Furthermore, a newly proposed engineering index (\(A10-I\)) was used to evaluate the predictive performance of the models [55; 59; 61; 62; 63]. In an ideal model, the value of \(A10-I\) is expected to be one. The \(A10-I\) has significance in engineering as it represents the proportion of samples that fall within \(\pm 10\%\) deviation from the predicted values compared with the target value. Additionally, the efficiency of the models was evaluated using uncertainty analysis at 95% confidence level (\(U_{95}\)) [64; 65].  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Metrics** & **Best Performance** & **Equations** & **Equation No.** \\ \hline Root mean squared error & Lower value & \(RMSE=\sqrt{\frac{\sum_{i=1}^{n}\left(X_{i}-\widetilde{X}_{i}\right)^{2}}{ \widetilde{X}_{i}}}\) & (4) \\ Mean absolute error & Lower value & \(MAE=\frac{1}{n}\times\left|\sum\limits_{i=1}^{n}X_{i}-\widetilde{X}_{i}\right|\) & (5) \\ Mean absolute percentage error & Lower value & \(MAPE=\frac{1}{n}\times\left|\sum\limits_{i=1}^{n}\frac{\left(X_{Figure 5: Flow diagram illustrating machine learning models used for predicting \(V_{S}\).