## 3 Construction of PIs Using the Bootstrap Method
### Bootstrap Methodology  
The bootstrap method is a computer technology-based resampling method proposed by Professor [PERSON] [41]. The method of constructing confidence intervals and prediction intervals is commonly used to simulate the population distribution by resampling observed data with replacement and generating regenerated samples. Compared to other methods, this method can generate more reliable PI without the need to calculate complex matrices [16].  
Suppose that there is a data sample \(X=\{x_{1},x_{2},\ldots x_{n}\}\) with a sample capacity of \(N\), and \(B\) samples with a capacity of \(M\) are extracted from the original sample \(X\). \(X^{*}=\left\{x_{1}^{*},x_{2}^{*},\ldots,x_{m}^{*}\right\}\), usually \(M=N\), finally producing \(B\) bootstrap samples \(X_{1}^{*},X_{2}^{*},\ldots,X_{B}^{*}\). The value of \(B\) is generally within the range of 20-200 and can meet the requirements of most applications [19]. In this paper, \(B=30\) is selected.  
The mean of point prediction of travel time for \(B\) samples using artificial neural network models is [40]:  
\[\hat{y}(x_{i})=\frac{1}{B}\sum_{b=1}^{B}\hat{y}_{b}(x_{i}) \tag{4}\]  
Among them, \(\hat{y}_{b}(x_{i})\) is the prediction of the \(i\)-th sample generated by the \(b\)-th bootstrap model. Then, use the variance of the predicted results from the \(B\) models to estimate the model variance [16; 40].  
\[\sigma_{\hat{g}}^{2}(x_{i})=\frac{1}{B-1}\sum_{b=1}^{B}\left(\hat{y}_{b}(x_{i })-\hat{y}(x_{i})\right)^{2} \tag{5}\]  
In order to construct PI, it is also necessary to estimate the variance of the error \(\sigma_{\epsilon}^{2}(x_{i})\)[16]:  
\[\sigma_{\epsilon}^{2}(x_{i})=E\Big{\{}(y_{i}^{*}-\hat{y}(x_{i}))^{2}\Big{\}}- \sigma_{\hat{g}}^{2}(x_{i}) \tag{6}\]  
The sum of squared residuals is [40]:  
\[r^{2}(x_{i})=max\Big{(}(y_{i}^{*}-\hat{y}(x_{i}))^{2}-\sigma_{\hat{g}}^{2}(x_{ i}),0\Big{)} \tag{7}\]  
where \(\hat{y}(x_{i})\) and \(\sigma_{\hat{g}}^{2}(x_{i})\) can be calculated from Equations (4) and (5). Combine residuals with input variable set samples to build a new data set \(D_{r^{2}}=\big{\{}\big{(}x_{i},r^{2}(x_{i})\big{)}_{i=1}^{n}\). Through the data set \(D_{r^{2}}\), train a new neural network, that is, the L + 1 learning model to estimate \(\sigma_{\epsilon}^{2}(x_{i})\). In order to maximize the probability of the observed sample in \(D_{r^{2}}\), therefore, the new model introduces the maximum likelihood estimation method and establishes a new objective function to train the model. Defined as [40]  
\[C_{BS}=\frac{1}{2}\sum_{i=1}^{n}\biggl{(}ln\Big{(}\sigma_{\epsilon}^{2}(x_{i} )\Big{)}+\frac{r^{2}(x_{i})}{\sigma_{\epsilon}^{2}(x_{i})}\biggr{)} \tag{8}\]  
After estimating \(\sigma_{\hat{g}}^{2}(x_{i})\) and \(\sigma_{\epsilon}^{2}(x_{i})\), the PIs with a confidence level of \((1-\alpha)\%\) can be constructed [16]:  
\[U^{(\alpha)}(x_{i})=\hat{y}(x_{i})+t_{df}^{1-\frac{\alpha}{2}}\sqrt{\sigma_{ \hat{g}}^{2}(x_{i})+\sigma_{\epsilon}^{2}(x_{i})} \tag{9}\]\[L^{(\alpha)}(x_{i})=\hat{y}(x_{i})-t_{df}^{1-\frac{\alpha}{2}}\sqrt{\sigma_{\hat{y} }^{2}(x_{i})+\sigma_{\hat{e}}^{2}(x_{i})} \tag{10}\]  
where \(U^{(\alpha)}(x_{i})\) and \(L^{(\alpha)}(x_{i})\) are the upper and lower boundaries that construct PI, respectively. \(t_{df}^{1-\frac{\alpha}{2}}\) is the \(1-\alpha/2\) quantile of the t distribution function with the degree of freedom _df_. Usually, the value of _df_ is set to \(B\).