## 4 Implementation Results of a Fully-Connected ANN and CNN
### Accuracy Analysis of Prediction Model  
The established fully-connected ANN model and CNN model were used to predict the cost of bridge maintenance in the future. To verify the prediction accuracy of the model, the prediction result of the model was compared to the actual bridge maintenance costs. Figure 13 shows a comparison between the predicted values given by the two prediction models and the actual maintenance costs under the corresponding indicators.  
The relative error distribution of the fully-connected ANN model is shown in Figure 14. It can be seen from Figure 14 that the relative error is less than 20% for 84.8% of the prediction data and less than 30% for 93.6% of the prediction data.  
Figure 14: Relative error distribution of fully-connected ANN prediction model.  
Figure 13: Comparison of actual maintenance costs and predicted results given by the fully-connected ANN model and the CNN model.  
The relative error distribution of the CNN model is shown in Figure 15. It can be seen from Figure 15 that 87.4% of the prediction results have a relative error of less than 20% and less than 30% for 98.7% of the prediction data.  
To compare the predictive performance of the two models, a linear regression model was added as a baseline for comparison. Linear, quadratic, and exponential curve fitting equations can be established based on regression analysis. Finally, the quadratic curve with the highest average goodness of fit (R\({}^{2}\)) was selected as the fitting form, a prediction model was established, and the regression coefficient was calculated. The regression analysis model form is defined as follows:  
\[y=at^{2}+bt+c \tag{25}\]  
where \(y\) indicates the maintenance costs for the bridge; \(a\), \(b\), and \(c\) are parameters for regression analysis; \(t\) indicates time.  
The relevant prediction error indicators for the fully-connected ANN model, the CNN model, and regression model are presented in Table 5.  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline \multirow{2}{*}{**Prediction Model**} & **Mean Absolute Error** & **Maximum Error** & **Minimum Error** & **Root Mean Square Error** \\  & **(Yuan/m\({}^{2}\))** & **(Yuan/m\({}^{2}\))** & **(Yuan/m\({}^{2}\))** & **(Yuan/m\({}^{2}\))** \\ \hline ANN & 16.8 & 59.4 & 0.2 & 19.7 \\ \hline CNN & 12.5 & 52.6 & 0.3 & 16.7 \\ \hline Regression model & 20.6 & 57.8 & 3.6 & 21.9 \\ \hline \multirow{2}{*}{**Prediction Model**} & **Average Relative Error** & **Maximum Relative Error** & **Minimum Relative Error** & **Mean Absolute Percent Error (\%)** \\  & **(\%)** & **(\%)** & **(\%)** & **Error (\%)** \\ \hline ANN & 12.05\% & 52.71\% & 0.28\% & 11.89\% \\ \hline CNN & 9.45\% & 29.83\% & 0.24\% & 9.35\% \\ \hline Regression model & 15.95\% & 46.51\% & 3.15\% & 15.22\% \\ \hline \hline \end{tabular}
\end{table}
Table 5: Relevant error indicators of the fully-connected ANN model, CNN model prediction, and regression model.  
Figure 15: Relative error distribution of CNN prediction model.  
It is apparent--from the prediction results and error analyses of the two models--that the CNN model provides better predictions of the bridge maintenance costs than the fully-connected ANN. Through the convolution operation, multi-dimensional feature extraction can be applied to each maintenance cost indicator, improving the prediction accuracy.