## 4 Results
### Model Results  
Regarding the SVC model, the hyperparameters that optimize the performance of this model are a radial function as kernel, Gamma = 0.1, and a regularization parameter C = 0.1. Note that the value of parameter C is low enough to maximize the classification margin, although this may lead to a higher probability of misclassification. However, this value of parameter C does not condition the final accuracy obtained (83.6%). In KNN, the number K of nearest neighbors resulting from running the optimization function is k = 3 with a power parameter p = 1, which means that, in this case, the Manhattan distance is used. The final accuracy of this classifier is 85.6%. The individual DT obtained was generated through the _sklearn.tree_ module of the Scikit learn Python library. The maximum depth of the tree is three levels, with a single minimum observation to split the internal nodes and six observations per node. The splitting criterion is the Gini index. Figure 14: Histogram of the variable “Reaction_type” as a function of the response variable “Event”. \begin{table}
\begin{tabular}{c c} \hline \hline
**Classifier** & **Hyperparameters** \\ \hline SVM & C: [0.1, 0.5, 0.75, 1, 10]; Kernel function: [radial basis function (rbf); lineall]; gamma (only rbf): [0.1, 0.5, 1, ‘scale’] \\ \hline KNN & K: [1–31]; power parameter/metric (p): [1-Manhattan (11), 2-Euclidean (l2)] \\ \hline Individual & Split criteria: [Cross entropy, Gini index]; max_depth: [None, 3, 5, 10]; min_samples_split: [1, 3, 5, 7,10]; min_samples_leaf: [1, 2, 4] \\ \hline Random Forest (RF) & Split criteria: [Cross entropy, Gini index]; number of trees: [3–30], \\  & (validated by the Out-of-the-bag criterion); max_depth: [None, 3, 5, 10]; min_samples_split: [1, 3, 5, 7,10]; min_samples_leaf: [1, 2, 4] \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Classifiers hyperparameters and input values in the optimization function. In Figure 15, it can be seen how generating a dodging movement has a differential effect on the sample classification. If the cyclist tries to avoid the vehicle by turning the handlebars, they can avoid the accident as long as their speed is very high (above 2.74 m/s). This reaction type is explained from the point of view of the maneuverability of the subjects with the simulator, since, at low speeds, it is more cumbersome for them to orient the bicycle on the scene than in cases where they are already riding with a certain inertia of movement. On the other hand, if the cyclist does not dodge, only high accelerations of the cyclist can result in avoiding being hit. This case may be applicable to scenario SC4 (type C2), in which the cyclist must accelerate to avoid being sideswiped by a vehicle running the traffic light priority. Situations where the speed is not high enough and the cyclist does not change speed or attempt to brake mostly lead to a collision. Moreover, DT deals with an outlier in the training sample, where the speed is very high (above 5.25 m/s). The final accuracy of the individual DT model is 82%. In Random Forest, the number of trees that optimize the model performance is eight. On the other hand, the OOB error rate takes the minimum value for eight trees (Figure 16). However, considering that the classification performance of the model is significantly higher for eight trees, and the existence of the slight increasing trend that can be found from 32 trees onwards would indicate the presence of overfitting in the training sample, it was decided to evaluate the model with eight trees. Figure 16: Number of trees vs. OOB error rate. Figure 15: Individual Decision Tree predictive model. Likewise, the RF model performance was optimized when no maximum depth was set, the minimum number of observations to split an internal node was 10, and the minimum number of observations in a node was four (Figure 17). In this tree example, \"a1i\" and \"v1i\" continue to be decisive variables in the division of the sample into nodes.