# A Privacy-Preserving Scheme for a Traffic Accident Risk Level Prediction System
## 6 Results  
We evaluated the models using the metrics described in Section 5.4. Thus, Table 5 presents the results of the experiments using the POLIDriving dataset, and Table 6 presents the results of evaluating a Random Forest-based model using different configurations. \begin{table}
\begin{tabular}{p{113.8 pt} p{113.8 pt} p{113.8 pt}} \hline \hline \multirow{2}{*}{**Metric**} & \multicolumn{2}{c}{**Description**} \\ \cline{2-3}  & **Unencrypted Model** & **Encrypted Model** \\ \hline \multirow{2}{*}{Training time} & It refers to the time it takes to train the learning model. & It refers to the time it takes to train the learning model using unencrypted data. \\ \hline \multirow{2}{*}{Compiling time} & Not applicable. & It refers to the time it takes to convert a model into a code machine that executes the same model over encrypted data. \\ \hline \multirow{2}{*}{Key generation time} & Not applicable. & It refers to the time spent generating the keys for encrypting and decrypting information. \\ \hline \multirow{2}{*}{Inference time} & It refers to the time it takes to perform the predicting task. & It refers to the time it takes to perform quantizing, encrypting, predicting, decrypting, and dequantizing tasks. \\ \hline \multirow{2}{*}{Accuracy} & It refers to the number of correct predictions about the total number of predictions. & It refers to the number of correct predictions about the total number of predictions. \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Key performance metrics. \begin{table}
\begin{tabular}{p{113.8 pt} p{113.8 pt} p{113.8 pt} p{113.8 pt}} \hline \hline \# & **Algorithm** & **Configuration** & **Hyperparameters** \\ \hline \multirow{2}{*}{3} & \multirow{2}{*}{Random Forest} & Default & criterion=‘gini’, max\_depth=4, max\_features=‘sqrt’, min\_samples\_leaf=1, min\_samples\_split=2, n\_estimators=20, random\_state=42, n\_jobs=1, *n\_bits=6 \\ \cline{3-5}  & & Optimal & criterion=‘entropy’, max\_depth=15, max\_features=‘sqrt’, min\_samples\_leaf=1, min\_samples\_split=2, n\_estimators=10, random\_state=42, n\_jobs=1, *n\_bits=4 \\ \hline \multirow{2}{*}{5} & \multirow{2}{*}{XGBoost} & Default & learning rate=None, max\_depth=3, n\_estimators=20, random\_state=42, n\_jobs=1, *n\_bits=6 \\ \cline{3-5}  & & Optimal & learning rate=0.1, max\_depth=15, n\_estimators=10, random\_state=42, n\_jobs=1, *n\_bits=5 \\ \hline \multirow{2}{*}{7} & \multirow{2}{*}{FCNN} & Default & hidden\_layers=1, activation\_function=None, criterion=‘entropy’, optimizer=‘adam’, learning\_rate=0.01, max\_epochs=10 \\ \cline{3-5}  & & Optimal & hidden\_layers=2, activation\_function=‘relu’, criterion=‘entropy’, optimizer=‘adam’, learning\_rate=0.01, max\_epochs=100, *n\_w\_bits=4 & \(n\_a\_bits=4\) \\ \hline \hline \end{tabular}  
* Only for encrypted models. criterion refers to the quality of a split. max\_epochs is the maximum # of iterations. random\_state control the randomness of data or splitting. n\_jobs is the # of jobs to run in parallel. n\_bits is the # of bits for quantization.  
\end{table} 
Table 3: _Cont._Both unencrypted and encrypted models are trained using unencrypted data, resulting in no significant difference in training time between them. For instance, the decision tree-based model (Table 5, Experiments 2 and 4) reached training times of 0.136 and 0.126 s, the Random Forest-based model (Expts. 6 and 8) reached training times of 0.835 and 0.990 s, the XGBoost-based model (Expts. 10 and 12) reached training times of 0.983 and 1.249 s, and the FCNN-based model (Expts. 14 and 16) reached training times of 11.860 and 13.033 s. According to Concrete ML, model training includes a quantization task performed after or before the training itself, depending on the model type. In that way, the models generated by Concrete ML experience higher training times than scikit-learn models. Concerning compiling times, the decision tree-based model (Table 5, Expts. 3 and 4) obtained times of 2.440 s and 2.482 s using a default and optimal configuration, respectively.