# Road Event Detection and Classification Algorithm Using Vibration and Acceleration Data
## 5 Dataset Description
### Quantitative Analysis
\begin{table}
\begin{tabular}{l c c c c c} \hline \hline
**Approach** & **Precision** & **Recall** & **F1-Score** & **Accuracy** & **AUC** \\ \hline Rule-Based & 0.92 & 0.78 & 0.84 & 0.910 & N/A \\ \hline Random Forest (A)—No Filter & 0.78 & 0.72 & 0.75 & 0.851 & 0.924 \\ \hline Random Forest (A)—Filtered & 0.85 & 0.80 & 0.82 & 0.896 & 0.981 \\ \hline Random Forest (B)—No Filter & 0.70 & 0.65 & 0.67 & 0.812 & 0.878 \\ \hline Random Forest (B)—Filtered & 0.75 & 0.70 & 0.72 & 0.866 & 0.913 \\ \hline Random Forest (C)—No Filter & 0.74 & 0.69 & 0.71 & 0.841 & 0.905 \\ \hline Random Forest (C)—Filtered & 0.80 & 0.75 & 0.77 & 0.919 & 0.946 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Performance comparison between the rule-based approach and Random Forest configurations A, B, and C, both with and without the Butterworth filter. Filtering consistently improves accuracy, recall, and AUC by reducing sensor noise. Configurations A, B, and C of the Random Forest model demonstrate **higher robustness and consistency between different datasets**. The ability to learn complex patterns from sensor data without requiring continuous manual tuning makes this approach **better suited for real-world deployment in urban traffic environments**. The experimental results demonstrated the importance of configuration choices and how the balance between model complexity, class imbalance, and fine-tuning can affect overall performance. Configuration C, with hyperparameter adjustments and optimal balance, provides the most reliable results for event detection in the context of road event detection in urban traffic. The results of these experiments align with the goals outlined in Section 3.3, where our aim was to build a robust and generalizable Random Forest model. Configuration A served as the baseline, while Configurations B and C addressed specific challenges such as class imbalance and the need for finer control over model parameters. The **AUC** results show that Configuration A had the highest discriminative ability (0.98106), suggesting that the baseline model could distinguish well between the event types. However, this configuration might not have optimized the model's ability to detect less frequent events because of the class imbalance. The **AUC** in Configuration B dropped to 0.91358, which reflects the trade-off introduced by class balancing techniques. Although recall for the \"No events detected\" class increased to 0.75, this led to a decrease in the ability to distinguish between event and non-event classes. On the other hand, Configuration C, with hyperparameter tuning, managed to maintain a high level of discrimination (AUC of 0.94682), along with improvements in both precision and recall, making it the most balanced configuration. To better visualize these results, we include the following figures:  
* Confusion Matrices (Figures 3-5) display the confusion matrices for Configurations A, B and C, respectively, highlighting true positives, false positives, false negatives, and true negatives. * ROC Curves (Figure 6) show the ROC curves and corresponding AUC values for Configurations A, B and C to demonstrate trade-offs between sensitivity and specificity. * Feature Importance (Figure 7) provides a graphical representation of the most important features identified by the Random Forest model, which are crucial for accurate event detection. As shown in these figures, the model in Configuration C not only achieved better overall performance, but also demonstrated better ranking of importance of features, allowing the model to focus on the most relevant features for accurate classification. These findings demonstrate that hyperparameter tuning, class balancing, and a careful balance between model complexity and interpretability are essential to improve performance in the context of road event detection.