# Machine Learning-Driven Calibration of Traffic Models Based on a Real-Time Video Analysis
## 5 Discussion  
The developed system for creating an SMTF with the possibility of global and local calibration using data from the PTS has demonstrated high adaptability to temporal and spatial deviations from the actual dynamics of traffic flow. The algorithm for extracting vehicle characteristics from video stream analysis ensured high registration accuracy, which was confirmed by tests on the correspondence of the distributions of parameters of the data from the video stream analysis and from the sensor system of the test car (the K-S test will be carried out using data from the AI and the tracker).  
The results obtained were compared with the research [110], which had a very similar task. In the calibration process for the SUMO model generated previously in [110], linear regression was used to create a time trend line for the random variable, and spatial interpolation was used to adjust it based on new data. In [110], the number of vehicles in the simulated area was chosen as the generated characteristic. The metric used to assess the statistical similarity between the generated traffic flow data and the real data was \(GEH\):  
\[GEH=\sqrt{\frac{2(M-C)^{2}}{M+C}}, \tag{6}\]  
where \(M\) is hourly traffic volume from model, and \(C\) is a real-world hourly traffic count.  
For all simulated areas, the calibration method specified in [110] showed \(GEH\) values not exceeding a dimensionless value of 5, which was considered acceptable. The results of our algorithm, calculated using the \(GEH\) metric, were as follows:  
* For the signal transmission time from the vehicle to the infrastructure object, the average value is \(GEH\) = 3.4;
* For vehicle speed, the average value is \(GEH\) = 1.55;
* For the angle of rotation of the car relative to the geographic north, the average value is \(GEH\) = 5.98.  
The obtained \(GEH\) values indicate a higher statistical proximity of the data generated by the developed SMTF to real traffic flow data than the results of [110]. It refers to data on the signal transmission time from the vehicle to the infrastructure object and speed. However, the statistical proximity is lower for data on the car's turning angle relative to the geographic north. It indicates that additional research is needed on some categories of vehicle data to improve the statistical proximity of data generation to PTS data.  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Model** & **MAE** & **MSE** & **RMSE** & \(R^{2}\) & **RMSLE** & **MAPE** \\ \hline Trained on SMTF data & 4.1787 & 24.2507 & 4.9245 & \(-\)6.9719 & 0.7595 & 1.4117 \\ before calibration & 0.0318 & 0.0189 & 0.1376 & 0.9938 & 0.0266 & 0.0076 \\ Trained on SMTF data & 0.0318 & 0.0189 & 0.1376 & 0.9938 & 0.0266 & 0.0076 \\ \hline \hline \end{tabular}
\end{table}
Table 1: Average values of cross-validation of ML models on data from ELM327.  
A comparative analysis of the developed SMTF's results with the results presented in [110] show an uneven increase in statistical proximity for different data types. It indicates the need to develop additional preprocessing algorithms for various data types.  
In our future work, we plan to introduce a cluster formation algorithm to enhance the spatial accuracy of the simulation model. This algorithm will be based on the selection of elements of the simulated section of the path. Importantly, it will be designed to adapt their boundaries to the operation of specific VTS algorithms, such as the boundaries of the sectors of the beam steering algorithm of the phased array antenna, which plays a crucial role in our model.  
An essential part of expanding the areas of application of SMTF will be integrating a microscopic traffic model into it, which will allow for simulation of the movement of specific vehicles within and between the cluster.