# Augmenting CCAM Infrastructure for Creating Smart Roads and Enabling Autonomous Driving
## 6 Validation of the CCAM for Autonomous Driving
### Results and Discussions  
For vehicle count, there are three different linear regression models used and for each of them, the results are given, as follows. Using linear regression, we trained our model to learn the average traffic count pattern for each hour of the day. The Figure 16 shows how the model performs compared to the real traffic counts. For linear regression, we reported an accuracy of 65% for the prediction of the vehicle count. The training data were split into training and testing sub-samples, as is the case with ML models and then the predictions for the rest of the three days were predicted using the linear regression model. We can observe the actual vehicle count graph in the Figure 10.  
For the Gradient Boosted regressor, we performed the experimental setup and trained the model using the following hyper parameters: loss was set to mean squared error, learning rate was 0.1, number of Boosting stages was 100, sub-sample value was 1.0, whereas the split quality measurement criterion was set to the Friedman Mean Squared Error (FMSE). The accuracy for this method is reported as 94.3%. Similarly, for random forest linear regression hyper parameters used are as follows: the number of tree was 100, split quality criterion was squared error, maximum tree depth was set to 2, minimum sample split was 1, sample weight function for leaves was equal, maximum features for split selection was the same as the features allotted. The accuracy for this method is reported as 93.8%. The results from these training experiments are presented in Figure 17.  
Figure 16: Linear regression prediction of vehicle count. The experimental results indicate a repeating pattern for traffic intensity for the road sections, as predicted by our models, and as the general patterns shown by Figure 10. Our trained models predicted the running average of this traffic density accurately. The traffic flow is low in the early morning, gradually increasing, and then reducing to a midday low as it then climbs back around the evening hours. These results demonstrate that traffic flow density can be modeled by artificial intelligence and be accurately predicted given enough information about the traffic features and conditions. These models are helpful in making informed decisions about our autonomous perception proposals. These create a known tangible outcome-based result that can be known ahead of time to be prepared for and given the resources at our disposal for communication infrastructure. For Wi-Fi device count, the Figure 18 shows that we had an accuracy of 41.82% when trained on vanilla hyper parameters and an accuracy of 91% when trained with the gradient boost regressor. These results, however, visually do represent a similarity between what the actual trend is and what the model predicts it to be in the case. These values are incredibly important. Figure 17: Random forest and gradient boost regressors when trained on partial day dataset, and tested for predicting two days of traffic. Figure 18: WiFi devices’ prediction. Gradient boost model predictions for five days (**Upper**). The training dataset with prediction based on XGBoost model (**Lower**). From a mobility point of view and to help us better understand the mobility patterns of the people around us, in this case, the SHapley Additive exPlanations (SHAP) values are selected for our regression model, where the features are divided into two groups: red and blue. As shown in Figure 19, SHAP values in the red group are positive, meaning they had a positive impact on the prediction. Similarly, there are negative SHAP value in the blue group, meaning it negatively affected the prediction. Hence, the SHAP values present the explainablility of the features contributed with the predicitons and used in the regression model. We believe that this will help the reader to understand the predictions of the model in a more specific and explainable manner. The glossary of frequently used terms are listed in Table 4.