## 3 Data analysis and BP Neural Network Model Building
### Testing Results  
On the basis of the existing database, 150 groups were used as the training group and 50 groups were applied as the testing group to build the BP neural network model. The training results are shown in Figure 7 for Gradation-13 and Figure 8 for Gradation-16. In the process of data transmission, through repeated training, four hidden layer nodes for Gradation-13 and five nodes for Gradation-16 were finally determined as the most suitable number of hidden layer nodes. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Training Group Sizes** & **Optimum Node Number** & **Mean Value of R\({}^{2}\)** & **Mean Value of MSE** \\ \hline
25 & 4 & 0.837615 & 0.073948 \\
50 & 4 & 0.954905 & 0.012391 \\
75 & 7 & 0.977096 & 0.007002 \\
100 & 5 & 0.98425 & 0.00472 \\
125 & 8 & 0.983784 & 0.004031 \\
150 & 5 & 0.988016 & 0.002924 \\
175 & 12 & 0.988349 & 0.003112 \\ \hline \hline \end{tabular}
\end{table} 
Table 9: The optimum node number, corresponding R\({}^{2}\) and mean square error (MSE) of different training group sizes. Figure 6: R\({}^{2}\) for different training group sizes. For two models, their coefficients of determination both achieve 99%, which means porosity prediction models have enough accuracy to provide reliable results. In addition, all the related parameters applied in model training are listed in the following tables. Tables 10 and 11 provide the gradation and porosity normalization parameters (\(x_{max},\ x_{min},\ y_{max},\ y_{min}\)) for Gradation-13 and Gradation-16. Through these parameters, the original gradation and porosity data could be normalized according to Equation (3). Then, the weights and thresholds used to transfer data from the input layer to the hidden layer are shown in Table 12, while those parameters from the hidden layer to the output layer are shown in Table 13.  
Figure 8: Porosity comparison among testing value and predicted value for Gradation-16. Figure 7: Porosity comparison among testing value and predicted value for Gradation-13. The complete prediction calculation process is listed as follows:  
**Step1:** Original gradation and porosity data are recorded and inputted to MATLAB program. **Step2:** All the original data are normalized according to Equation (3) and parameters in Tables 10 and 11. **Step3:** The values in hidden layer are calculated according to Equations (8). \[\textit{Hidden layer value}=\textit{tansig}(\textit{Weight}_{-1}\times\textit{ normalized input data}+\textit{Threshold}_{-1}) \tag{8}\]  
**Step4:** The values in output layer are calculated according to Equations (9). \[\textit{Output layer value}=\textit{purelin}(\textit{Weight}_{-2}\times\textit{ Hidden layer value}+\textit{Threshold}_{-2}) \tag{9}\]  
**Step5:** The calculated results are anti-normalized through Equation (4). Through the above steps, the porosity of a certain kind of particulate mixture can be accurately predicted. **4. Verification and Application of Prediction Method**  
For the purpose of evaluating model validity and accuracy, a static compression test was also completed in laboratory. The steel balls were used to compare with the virtual ball element model. Meanwhile, the relationship among the measured porosity, the simulated porosity and the predicted value was compared. In order to simulate the real composition of granular particles applied in highway \begin{table}
\begin{tabular}{c|c c c c|c} \hline \multicolumn{2}{c}{**Type**} & \multicolumn{4}{c}{\(\textit{Weight}_{-2}\)} & \multicolumn{2}{c}{\(\textit{Threshold}_{-2}\)} \\ \hline Gradation-13 & & \(-0.1552\) & \(-0.7475\) & \(-0.4340\) & \(-0.9771\) & 1.1815 \\ Gradation-16 & 2.0664 & 0.4469 & \(-0.4462\) & \(-0.7392\) & \(-0.0103\) & 1.7224 \\ \hline \end{tabular}
\end{table} 
Table 13: The parameters from the hidden layer to output layer for Gradation-13 and Gradation-16.