## 3 Experiment and Analysis
### Model Training  
For the real-time risk assessment model of hazmat road transportation based on GRU-DNN with MFE, the cross-entropy cost function was used as the loss function, as presented in Equation (11). \[l(W)=-\sum_{k=1}^{S}\Big{[}\Big{(}1-\mathbf{Y}^{(k)}\Big{)}\log\Big{(}1-\hat{\mathbf{ Y}}\Big{(}\mathbf{X}^{(k)}\Big{)}\Big{)}+\mathbf{Y}^{(k)}\log\hat{\mathbf{Y}}\Big{(}\mathbf{X}^{(k)} \Big{)}\Big{]}+\ \min\frac{\lambda}{2}\|W\|^{2} \tag{11}\] \begin{table}
\begin{tabular}{c c c} \hline \hline
**Performance Measures** & **Derivation** & **Definition** \\ \hline ACC (\%) & \(\frac{TP+TN}{TP+TN+TP+TN}\) & Proportion of accurate predictions in the predicted sample \\ PR (\%) & \(\frac{TP}{TP+TP}\) & Proportion of true positives to \\  & \(\frac{TP}{TP+TN}\) & predicted positives \\ RE (\%) & \(\frac{TP}{TP+TN}\) & Proportion of predicted positive samples to \\ F1 (\%) & \(\frac{2 TP}{TP+TP+TN}\) & Harmonic mean of precision and recall \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Derivations and definitions of four performance measures. where \(s\) denotes the number of samples. \(\hat{\mathbf{Y}}\Big{(}\mathbf{X}^{(k)}\Big{)}\) is the predicted value of the sample \(\mathbf{X}^{(k)}\). \(\Big{(}\mathbf{X}^{(k)},\mathbf{Y}^{(k)}\Big{)}\) represents the data samples and corresponding labels. The second term is the weight penalty term, and \(\lambda\) is the penalty coefficient. During model building, we added dropout and batch normalization (BN) operators to prevent model overfitting. The dropout operator allows the model to stop the activation of a neuron with a certain probability during forward propagation. This makes the model more generalizable, because it does not depend too much on some local features. The BN operation is added between each layer of the CNN, which can adjust the weights of neurons to a standard normal distribution. Generally speaking, with increasing network depth, the model becomes more difficult to train and the convergence becomes slower and slower. Through the adjustment of the BN layer, the input of each layer can be unified to a fixed distribution. In this way, the complexity of the model can be appropriately increased to prevent the model from overfitting. [PERSON] was chosen as the optimizer of the model. The learning rate was set as 0.001, and the mini-batch was 10. To improve the computational efficiency and smooth the output curve for comparative analysis, the average loss was recorded for every 10 epochs and the trained model was verified and saved for every epoch. Therefore, the training results of different stages were analyzed. In Figure 8, the training procedure is displayed. To evaluate the impact of different learning rates on the GRU-DNN with MFE, three learning rates of 0.002, 0.001 and 0.0001 were set in the training process based on the transfer learning strategy [69]. The losses with different learning rate are presented in Figure 9.  
Figure 9 indicates that the loss of the learning rate 0.001 is the lowest. The training loss decreased rapidly in the first 200 epochs, and the training tended to stabilize after 400 epochs. To evaluate the performance of the model, the four measures described above were used, as demonstrated in Table 5.  
Figure 8: Training process of GRU-DNN with MFE. Figure 9: Losses with different learning rates. (**A**) learning rate of 0.002; (**B**) learning rate of 0.001; (**C**) learning rate of 0.0001. Actually, in addition to ACC, PR and RE should also be considered. The former shows the proportion of accurate predictions made by the model among all the predicted samples. The latter shows the proportion of predicted positive samples to the true samples. In the prediction of an emergency, such as accidents during hazmat road transportation, consideration should not only be of FPs and TPs, but rather the RE should also be used as a measure. Therefore, the model offers great prediction performance. Then, we compared performance between the training sets and validation sets.