## 4 Results
### Data-Driven Modeling Results
#### 4.2.2 Genetic Programming (GP)  
Upon applying Multiple Linear Regression (MLR) as the statistical model, a grey box AI model called Genetic Programming (GP) was utilized to forecast the bearing capacity of shallow foundations (q\({}_{u}\)). Through a thorough analysis of various GP models, the most optimal model was identified. As depicted in Figure 6, the outcomes of the best GP model show a favorable alignment between actual and predicted values. These results demonstrate the remarkable accuracy of the GP model in forecasting q\({}_{u}\) (bearing capacity) values. Table 6 provides a comprehensive assessment of the best GP model's overall performance in predicting the ultimate bearing capacity of shallow foundations. The evaluation was conducted on both the training and testing databases, employing various performance metrics. In the training database, the GP model demonstrated a reasonable performance with a Mean Absolute Error (MAE) of 19.677 kPa, indicating that, on average, the model's predictions were within approximately 19.677 units of the actual values. The model's predictions showed a relatively good variance from the actual values, as reflected in the Mean Squared Error (MSE) of 700.751 and the Root Mean Squared Error (RMSE) of 26.472. Additionally, the model exhibited remarkable accuracy in dealing with both small and large errors, as evidenced from the low Mean Squared Logarithmic Error (MSLE) of 0.018 and the Root Mean Squared Logarithmic Error (RMSLE) of 0.136. Moreover, the GP model displayed a strong overall fit to the training data, as indicated by the high R-squared (\(R^{2}\)) value of 0.939, which signifies the model's capability to explain a substantial portion of the variance in the training data. Figure 6: Results of proposed GP based on (**a**) training database and (**b**) testing database. On the testing database, the GP model demonstrated even better predictive performance, as evidenced by the reduced MAE of 16.164 kPa compared to the training database. The model's predictions exhibited decreased variability from the actual values, with MSE and RMSE values of 313.386 and 17.703, respectively. The GP model's adeptness in handling errors was consistent, as indicated by the low MSLE of 0.012 and RMSLE of 0.111. Furthermore, the high \(R^{2}\) value of 0.975 in the testing database showcases the model's robustness in explaining the variance in unseen data, reaffirming its strong predictive ability. Overall, the results in Table 6 underscore the GP model's efficacy in accurately estimating the ultimate bearing capacity of shallow foundations, making it a valuable tool for practical applications in foundation engineering and design. An important distinction between genetic programming (GP) and black box models lies in the GP model's ability as a grey box model to produce an equation as its outcome, which can be directly utilized by the reader. In this study, Equation (8) represents the GP model's output for predicting the bearing capacity of shallow foundations (q\({}_{\text{u}}\)) values. The length of Equation (8) can be attributed to its incorporation of five distinct inputs: width of footing (B), depth of footing (D), footing geometry (L/B), unit weight of sand (\(\gamma_{\text{d}}\) or \(\gamma^{\prime}\)), and internal friction angle (\(\phi\)). Notably, conventional methods lack the capability to generate an equation like Equation (8), considering all five influential inputs. Thus, this study marks the first successful attempt to formulate an equation that predicts q\({}_{\text{u}}\) based on these five crucial inputs. It is essential to mention that the parameters in Equation (8) are normalized values, and readers should normalize their input values based on Table 1 before applying them to Equation (8) for accurate predictions. \[