# A Privacy-Preserving Scheme for a Traffic Accident Risk Level Prediction System
## 6 Results
Compiling times are similar in this case because of the similarity of the configurations. For the other models that use optimal configurations, the compiling times are higher than models using default configurations. For instance, the Random Forest-based model (Expts. 7 and 8) obtained times of 2.345 and 8.496 s, the XGBoost-based model (Expts. 11 and 12) obtained times of 2.413 and 7.523 s, and the FCNN-based model (Expts. 15 and 16) obtained 1.928 and 3.615 s.  
The key generation times for the tree-based models are similar (>0.6 and <0.9 s). Those models reached values of 0.784 (Table 5, Expt. 3), 0.744 (Expt. 4), 0.867 (Expt. 7), 0.758 (Expt. 8), 0.853 (Expt. 11), and 0.644 s (Expt. 12) using default and optimal configurations. In the case of the neural network-based models, there is a considerable increase compared to the results of the previous models. These last models reached values of 1.391 (Expt. 15) and 3.966 s (Expt. 16). As expected, inference times are much higher in encrypted models than unencrypted ones. The results show that these differences are extremely high for some experiments, especially for the Random Forest and XGBoost-based models. For instance, Decision Tree-based models obtained times of 0.000078 (Table 5, Expt. 1) and 17.959156 s (Expt. 3) for unencrypted and encrypted models, respectively. However, the XGBoost-based models \begin{table}
\begin{tabular}{c c c c c c c c c} \hline \hline
**Experiment** & **Algorithm** & **Encrypted** & **Configuration** & \begin{tabular}{c} **Training** \\ **Time** \\ \end{tabular} & \begin{tabular}{c} **Compiling** \\ **Time** \\ \end{tabular} & \
\begin{tabular}{c} **Key Gen.** \\ **Time** \\ \end{tabular} &
\begin{tabular}{c} **Inference** \\ **Time** \\ \end{tabular} & **Accuracy** \\ \hline
1 & & & & **[s]** & **[s]** & **[s/Sample]** & \\ \cline{3-8}
2 & Decision Tree & No & Default & 0.157 & - & - & 0.000078 & 82.0 \\ \cline{3-8}
3 & & & Optimal & 0.136 & - & - & 0.000056 & 85.9 \\ \cline{3-8}
4 & & Yes & Default & 0.126 & 2.440 & 0.784 & 17.959156 & 82.0 \\ \cline{3-8}
5 & & & Optimal & 0.126 & 2.482 & 0.744 & 18.139494 & 85.9 \\ \cline{3-8}
6 & & & Default & 0.136 & - & - & 0.000016 & 69.7 \\ \cline{3-8}
7 & & & Optimal & 0.835 & - & - & 0.000672 & 85.0 \\ \cline{3-8}
8 & & & Default & 0.133 & 2.345 & 0.867 & 12.965843 & 69.7 \\ \cline{3-8}
9 & & & Optimal & 0.990 & 8.496 & 0.758 & 181.197287 & 85.0 \\ \cline{3-8}
10 & XGBoost & No & Default & 0.274 & - & - & 0.000029 & 81.5 \\ \cline{3-8}
11 & & & Optimal & 0.983 & - & - & 0.000622 & 84.8 \\ \cline{3-8}
12 & & & Yes & Default & 0.218 & 2.413 & 0.853 & 24.494245 & 81.5 \\ \cline{3-8}
13 & & & Optimal & 1.249 & 7.523 & 0.644 & 207.799554 & 84.8 \\ \cline{3-8}
14 & Fully Connected & No & Default & 1.255 & - & - & 0.000015 & 71.0 \\ \cline{3-8}
15 & Neural Network & No & Optimal & 11.860 & - & - & 0.000041 & 80.1 \\ \cline{3-8}
16 & & & Default & 1.243 & 1.928 & 1.391 & 2.484339 & 71.0 \\ \cline{3-8} \hline \hline \end{tabular}
\end{table} 
Table 5: Experimental results using the POLIDriving dataset. reached times of 0.000622 (Expt. 10) and 207.799 s (Expt. 12). The best results were obtained from the FCNN-based models, which reached values of 0.000041 (Expt. 14) and 8.476 s (Expt. 16). Concerning the accuracy of the models, the results show no difference between encrypted and unencrypted ones. For instance, the Decision Tree-based models show an accuracy of 82.0 (Table 5, Expts. 1 and 3) for the unencrypted and encrypted models; the Random Forest-based models show an accuracy of 85.0 (Expts. 6 and 8) for both models; and the XGBoost-based models show accuracies of 84.8 (Expts. 10 and 12) for the unencrypted and encrypted models. Figure 4 presents a comparative analysis of the encrypted models using optimal configurations. Additionally, we performed experiments to verify how the complexity of encrypted models affects the evaluation metrics.