## 4 BP NEURAL Network Modeling
So, \(K_{flume}\) in the total dataset is pretreated with natural logarithm, but even after this pretreatment, a BP neural network with just one hidden layer still gives rise to notable errors through the aforementioned 9-fold cross-validation process. So, a BP neural network with two hidden layers is employed, and when the neuron number for each hidden layer is 9, the cross-validation results for the transfer functions of the hidden and output layers are shown in Table 8, where case 6 gives the best approximation and quick convergence. Further investigation shows that when the neuron number of each hidden layer is decreased to 7 or increased to 11, the average MAE and MSE will not show any improvement. MATLAB is used to perform the BP neural network modeling and approximation. The purelin, tansig and logsig transfer functions are illustrated as shown in Figure 16:  
Therefore, it can be concluded that a BP neural network of which both the first and second hidden layers have 9 neurons with a transfer function of \"logsig\" and the output layer has 3 neurons with a transfer function of \"tansig\" can provide very good approximations for \(K_{flume}\), \(E_{d\_arch}\) and \(E_{d\_frame}\). The final BP neural network for evaluating \(K_{flume}\), \(E_{d\_arch}\) and \(E_{d\_frame}\) is trained using this architecture with the training and validation dataset, and then the testing dataset is applied, which produces the following test results, as shown in Table 9.  
Figure 16: Illustration of transfer functions. \begin{table}
\begin{tabular}{c c c c c c c c c c} \hline \hline  & \multicolumn{3}{c}{**Transfer Function**} & \multicolumn{3}{c}{**\(E_{d\_Arch}\)**} & \multicolumn{3}{c}{**\(E_{d\_Frame}\)**} & \multicolumn{3}{c}{**\(Ln\) (\(K_{l\_flume}\))**} \\ \cline{2-10}
**Case** & **Hidden** & **Hidden** & **Output** & **Avg.** & **Avg. MSE** & **Avg. MSE** & **Avg. MSE** & **Avg. MSE** & **Avg. MSE** & **Avg. MSE** \\  & **Layer 1** & **Layer 2** & **Layer** & **MAE** & **/GPa2** & **MAE** & **/GPa2** & **MAE** & **/(kN/m)2** \\ \hline
1 & purelin & tansig & tansig & 0.25\% & 0.06 & 0.36\% & 0.06 & 0.58\% & 0.03 \\
2 & tansig & tansig & 0.38\% & 0.29 & 0.25\% & 0.07 & 1.65\% & 0.39 \\
3 & purelin & purelin & tansig & 2.25\% & 1.11 & 2.30\% & 1.43 & 16.54\% & 10.97 \\
4 & tansig & purelin & tansig & 0.22\% & 0.09 & 0.25\% & 0.12 & 9.93\% & 5.94 \\
5 & tansig & logsig & tansig & 0.25\% & 0.06 & 0.20\% & 0.02 & 0.72\% & 0.04 \\
6 & logsig & logsig & tansig & 0.15\% & 0.02 & 0.18\% & 0.03 & 0.47\% & 0.02 \\
7 & tansig & tansig & logsig & 13.1\% & 48.92 & 6.98\% & 19.99 & 6.85\% & 1.81 \\ \hline \hline \end{tabular}
\end{table} 
Table 8: Cross validation of the hidden-layer 2 BP neural network. Using the dynamic characteristics of the whole aqueduct obtained from field tests, as shown in Table 1, as the six inputs (\(f_{T1}\) 0.97 Hz, \(f_{T2}\) 1.02 Hz, \(f_{T3}\) 1.06 Hz, \(f_{L1}\) 1.50 Hz, \(f_{L2}\) 1.915 Hz and \(f_{V1}\) 5.328 Hz) of the trained BP neural network, the three outputs (\(K_{\textit{J}ume}\), \(E_{d-arch}\) and \(E_{d-frame}\)) are estimated to be 1.2288 \(\times\) 10\({}^{8}\) kN/m, 47.8 GPa and 46.1 GPa, respectively. It should be noted that \(K_{\textit{J}ume}\) is approximated to be the maximum value of the corresponding training data, and this indicates that the asphalt bearings of U-shaped flumes essentially behave more like a three-directional hinge which cannot provide effective dynamic isolation during seismic events. Normally the first modes of the aqueduct in three directions are most prone to be excited when the structure is subjected to exterior dynamic loading, so technically they can be more easily and accurately detected by a field dynamic test than the other higher modes.