Optimizing Machine Learning Models for Predicting Rock Cohesion and Angle of Internal Friction: A Comparative Study of Lithological Analysis, Robustness Assessment, and SHAP Explanations
Rock cohesion (c) and angle of internal friction (φ) are core parameters for rock mass stability analysis and engineering design; however, traditional triaxial tests are costly and time-consuming, limiting their availability in preliminary engineering assessments. To address this limitation, this study develops a machine learning framework that predicts these parameters from easily measurable physical properties, enabling rapid and cost-effective estimation without the need for complex laboratory testing. Based on a total of 199 sets of measured data from four rock types (shale, limestone, quartzite, and quartz-mica schist) in the Himalayan region, this study uses P-wave velocity (Vp), density (ρ), uniaxial compressive strength (UCS), and tensile strength (TS) as input variables. It employs four models: Support Vector Regression (SVR), Random Forest (RF), Multi-Layer Perceptron (MLP), and extreme gradient boosting (XGBoost) to predict c and φ. Hyperparameters were tuned using grid search and Bayesian optimization. We compared unified modeling with rock-type-specific modeling, performed interpretability analysis using SHapley Additive exPlanations (SHAP), and tested robustness by introducing Gaussian noise. The results show that XGBoost produced the best predictions at c (test set R2 = 0.9901, RMSE = 0.512 MPa), while the Bayesian-optimized SVR model yielded the best results at φ (R2 = 0.9776, RMSE = 0.744°). Rock-type-specific modeling improved the R2 for limestone at φ by 0.3541; the SHAP contribution for UCS and TS exceeded 70%; Random Forest demonstrated the best noise resistance, with a decrease in R2 of less than 0.04 under 10% noise. In summary, the strategy proposed in this paper allows for the selection of prediction schemes based on data quality and lithological differences, providing a feasible approach for rapidly obtaining rock strength parameters.