## 3 Materials and Methods
### Stage 4: Interval Predictions and Complexity Index  
Stage 4 involved generating interval predictions using two methods: Monte Carlo dropout and bootstrapping (see Figure 1). These techniques leverage resampling or dropout as Bayesian approximations, enabling the model to quantify uncertainty and generate prediction intervals based on the output variance [38; 61]. Compared to traditional Bayesian methods, these two techniques allow the quantification of uncertainty in datasets that lack explicitly probabilistic information [19; 42]. Therefore, they were adopted in this study to increase the robustness of the prediction models. As in Stage 3, two interval prediction models--one excluding the complexity index and one incorporating it--were compared to evaluate the impact of the complexity index on predictive accuracy. The evaluation method for interval predictions followed [PERSON] et al.'s [38] approach, where _uncertainty accuracy_ was used to assess the performance of uncertainty estimations. The approaches and evaluation processes for the interval predictions are detailed below:  
1. Monte Carlo dropout  
Monte Carlo dropout was applied to obtain interval predictions by performing multiple stochastic forward passes through the ANN [38]. Fundamentally, the Monte Carlo dropout approach involves executing the model \(n\) times with dropout enabled to introduce randomness in the network's weights during inference and generate different predictions for the same test case \(x\)[62]. The Monte Carlo dropout process consists of four steps:  
1. Train the model using the original training dataset, with dropout enabled during both training and inference;
2. Perform multiple stochastic forward passes (\(n\) passes) through the trained model for the same test case \(x\), with dropout activated to introduce randomness in each pass;
3. Generate a set of \(n\) predictions for the test case \(x\) from the stochastic forward passes;
4. Calculate the lower and upper bounds of the prediction interval, using the formulas presented below [61]: \[LB =\] \[\mathit{Percentile}_{2.5}(\hat{y}_{1},\hat{y}_{2},\cdots\hat{y}_{i} \cdots,\hat{y}_{n})=\hat{y}_{mean}-z\sigma\] (8) \[UB =\] (9)  
where \(LB\) and \(UB\) are the lower and upper bounds, respectively, \(\hat{y}_{i}\) is the predicted value of the test case \(x\) using the model trained on the \(i\)th bootstrapped dataset from \(n\) sets, and \(\hat{y}_{mean}\) and \(\sigma\) are the mean value and variance of \((\hat{y}_{1},\hat{y}_{2},\cdots\hat{y}_{i}\cdots,\hat{y}_{n})\), respectively. A 95% confidence interval was used in this study, with the 2.5 th and 97.5 th percentiles representing the lower and upper bounds, respectively.  
1. Bootstrapping was employed to estimate prediction intervals by resampling the training data and generating multiple models [50]. Compared to Monte Carlo dropout, bootstrapping is expected to capture a wider range of uncertainty as it accounts for variations in the training data, potentially offering a more comprehensive representation of model uncertainty [61]. The bootstrapping process mirrors that used in Monte Carlo dropout, with key differences in the first two steps. Instead of generating multiple predictions for a test case by introducing randomness through dropout, bootstrapping generates predictions by resampling the training data. The lower and upper bounds of the prediction interval were then calculated using Equations (8) and (9).  
The uncertainty accuracy (UA) of the interval predictions was assessed by calculating the proportion of actual values that fell within the predicted intervals [39]. This metric is defined as:  
\[UA=\frac{n_{true}}{n_{total}}\times 100\% \tag{10}\]where \(n_{true}\) is the number of project cases where the actual value fell within the predicted interval, and \(n_{total}\) is the total number of project cases.