The world’s leading publication for data science, AI, and ML professionals.

Traffic State Classification Using the Speed Transition Matrices

Novel approach for classification of the traffic state on a city-wide scale

Photo by Alvaro Reyes on Unsplash
Photo by Alvaro Reyes on Unsplash

Speed Transition Matrix (STM) is a novel traffic data technique used for all kinds of traffic-related analysis like traffic state estimation, anomaly detection, etc. This article will show how the STM can be applied to traffic state Classification problems when dealing with GPS data. The full paper can be found here [1] .


Before we continue, give me a second of your time. If you want to support me in my work, you can do it using this secure PayPal link. Thank you 🙂

Pay Leo Tisljaric using PayPal.Me


Intro

Clustering techniques are mostly used to group the unlabeled datasets. When dealing with traffic data, the goal is to cluster data is to groups that follow a similar traffic pattern. With this, the analysis of large traffic datasets is simpler and more interpretable. In this article, we are trying to group the data to represent the different traffic states like "Congestion," "Unstable flow," etc. [2].

Time series are mostly used by researchers when representing the changes of traffic parameters, like speed, delay, or volume. Mostly, aggregation of a lot of data is needed to create this kind of time series. In this step, different problems arise, mostly related to large deviations. The STM is proposed to cope with this problem and provide a way to extract more from traffic data.

To learn more about the STMs, please refer to the following article:

Speed Transition Matrix: Novel road traffic data modeling technique

Methodology

1. Using the center of mass

First step is to represent the STM by using only one point in 2D space. We will do it by estimating the Center Of Mass (COM) for every observed STM:

COM estimation for every STM (Image by: Author)
COM estimation for every STM (Image by: Author)

As we can see in images, COM is a significant feature when dealing with STMs. It shows the most probable speed transition between two consecutive road segments. It represents the normal traffic flow when it is placed in the lower-right corner because vehicles had large speeds on origin and destination links. On the other side, when placed in the upper-left corner, it represents the congestion because speeds are very low on the origin and destination links.

When we calculate COMs for every STM, the result is following:

Result of the COM calculation for every observed STM (Image by: Author [1])
Result of the COM calculation for every observed STM (Image by: Author [1])

2. Clustering

Now, we used some clustering approaches to define the best number of clusters. Every cluster will then represent one traffic state. When hierarchical agglomerative clustering and the knee methods were applied, the resulting number of clusters was three. The images are here:

Results of the hierarhical agglomerative clustering and the knee method (Image by: Author [1])
Results of the hierarhical agglomerative clustering and the knee method (Image by: Author [1])

The labels for the classes were defined as:

  1. "Free Flow" – traffic flow with almost no interactions between vehicles.
  2. "Stable Flow" – traffic flow with some interactions, without serious consequences.
  3. "Congestion" – congested traffic flow resulting in traffic jams.

3. Domain knowledge validation

The validation process is related to comparing the resulting classes with the domain knowledge data. The well-known HCM values of the Level of Service (LoS) represent the specific domain knowledge data for the traffic state estimation process. HCM defines six levels of service for road segments based on driving speed values, from A to F, with LoS A representing the best driving conditions and LoS F the worst. Firstly, the LoS values are merged in three classes in the following way: (i) free-flow traffic conditions represented by the LoS labeled as A and B, (ii) traffic conditions represented by the LoS labeled with C and D are labeled as stable, and (iii) congested traffic conditions that are represented with LoS are labeled with E and F. Then, the test dataset is labeled with three classes. The labeled dataset is then used as a ground truth value and compared to the agglomerative clustering results. The total accuracy resulted in 91%, and the confusion matrix is shown on the image below:

Confusion matrix (Image by: Author [1])
Confusion matrix (Image by: Author [1])

4. Visualization

The image below shows a visualization of the obtained results. The results are represented for a non-rush hour (left) and the rush hour interval (right).

Visualization of the three classes: Congestion (red), Stable Flow (yellow), and Free Flow (green) (Image by: Author)
Visualization of the three classes: Congestion (red), Stable Flow (yellow), and Free Flow (green) (Image by: Author)

Conclusion

With this article, the STM is represented as a novel Traffic Data modeling technique that shows great traffic data representation and analysis potential. Traffic state estimation is only one of the many problems that can be addressed by using the STM. Recent papers [3] and [4] show some interesting applications for detecting traffic anomalies.

This is the first published paper that showed the possibilities of applying the STMs! If you are interested in this kind of research, feel free to follow my articles. This is still research that is a "work in progress," so if you have any questions or suggestions, feel free to comment or contact me!

Linkedin: https://www.linkedin.com/in/leo-tisljaric-28a56b123/

References

[1] L. Tišljarić, T. Carić, B. Abramović, and T. Fratrović, Traffic State Estimation and Classification on Citywide Scale Using Speed Transition Matrices (2020), Sustainability, 12,18:7278–7294

[2] J.C. Herrera, D.B. Work, R. Herring, X.J. Ban, Q. Jacobson, A.M. Bayen, Evaluation of traffic data obtainedvia GPS-enabled mobile phones: The Mobile Century field experiment (2010), Transp. Res. Part Emerg. Technol, 18, 1:568–583.

[3] L. Tišljarić, S. Fernandes, T. Carić, and J. Gama, Spatiotemporal Traffic Anomaly Detection on Urban Road Network Using Tensor Decomposition Method (2020), in Discovery Science. Lecture Notes in Computer Science, A. Appice, G. Tsoumakas, Y. Manolopoulos, and S. Matwin, Eds. Cham: Springer, 12323, 1:674–688.

[4] L. Tišljarić, Ž. Majstorović, T. Erdelić, and T. Carić, Measure for Traffic Anomaly Detection on the Urban Roads Using Speed Transition Matrices (2020), in Proceedings of International Convention on Information and Communication Technology, Electronics and Microelectronics, 268–275.


Related Articles