Next Article in Journal
Towards Improving TSCH Energy Efficiency: An Analytical Approach to a Practical Implementation
Next Article in Special Issue
Dynamic Biomechanical Analysis of Vocal Folds Using Pipette Aspiration Technique
Previous Article in Journal
Flexible Virtual Reality System for Neurorehabilitation and Quality of Life Improvement
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Tensor Decomposition for Spatial—Temporal Traffic Flow Prediction with Sparse Data

1
School of Management, Jilin University, Changchun 130012, China
2
College of Computer Science and Technology, Jilin University, Changchun 130012, China
3
School of Electrical and Electronic Engineering, Nanyang Technological University, Singapore 639798, Singapore
4
Faculty of Science, Agriculture, and Engineering, Newcastle University Singapore, Singapore 599493, Singapore
*
Author to whom correspondence should be addressed.
Sensors 2020, 20(21), 6046; https://doi.org/10.3390/s20216046
Submission received: 11 September 2020 / Revised: 16 October 2020 / Accepted: 20 October 2020 / Published: 24 October 2020
(This article belongs to the Special Issue State-of-the-Art Sensors Technology)

Abstract

:
Urban transport traffic surveillance is of great importance for public traffic control and personal travel path planning. Effective and efficient traffic flow prediction is helpful to optimize these real applications. The main challenge of traffic flow prediction is the data sparsity problem, meaning that traffic flow on some roads or of certain periods cannot be monitored. This paper presents a transport traffic prediction method that leverages the spatial and temporal correlation of transportation traffic to tackle this problem. We first propose to model the traffic flow using a fourth-order tensor, which incorporates the location, the time of day, the day of the week, and the week of the month. Based on the constructed traffic flow tensor, we either propose a model to estimate the correlation in each dimension of the tensor. Furthermore, we utilize the gradient descent strategy to design a traffic flow prediction algorithm that is capable of tackling the data sparsity problem from the spatial and temporal perspectives of the traffic pattern. To validate the proposed traffic prediction method, case studies using real-work datasets are constructed, and the results demonstrate that the prediction accuracy of our proposed method outperforms the baselines. The accuracy decreases the least with the percentage of missing data increasing, including the situation of data being missing on neighboring roads in one or continuous multi-days. This certifies that the proposed prediction method can be utilized for sparse data-based transportation traffic surveillance.

1. Introduction

With the prevalence of vehicles traveling on urban roads, the surveillance of transport traffic is an essential and important task for urban transportation management [1]. Obtaining accurate information about near-term future traffic flows of road segments in a traffic network has a wide range of applications, including vehicle navigation, congestion management [2,3,4], and understanding the urban structure [5]. A major problem in getting traffic flow information in real-time is that the vast majority of links are not equipped with traffic sensors, e.g., inductive loop detectors and closed-circuit cameras [6]. It is prohibitive to densely adopt them on the city scale, which consequently limits the coverage of traffic flow surveillance. Though trajectory data generated by probe vehicles for traffic surveillance does exist, there are still roads that are not traveled by GPS (global positioning system) equipped vehicles, on which the traffic cannot be monitored [7]. This directly makes the traffic flow prediction of a road network face the problem of data sparsity [8]. Based on the sparse sensing data, the problem of how to predict traffic flow effectively and efficiently has resulted in a tremendous amount of research. The majority of the previous investigations focus on short-term traffic prediction, using the full data on given road segments or specific areas without considering the data missing on continuous days. Another situation is the data missing on cascading road segments, which have not been well tackled.
Factually, the data sparsity from the spatial–temporal view makes the prevalent transportation traffic prediction method invalid, as it needs as original data (or extracted features) inputs and training process, such as the time series-based methods [9], the machine learning-related methods [10], and even the conventional neural network-based methods [11,12], or the prevalent deep learning methods [13,14].
There have been a significant number of studies investigating traffic dynamics with a focus on describing and understanding the resulting spatial–temporal traffic patterns [15,16]. Urban transportation traffic surveillance and prediction are the basis of transportation congestion identification [17] and travel path recommendation [18]. Researchers have made efforts to combine statistical methods [19] and machine learning methods [20,21]. Data-driven traffic surveillance methods are now mainly faced with the data sparsity problem [22,23], which cannot be solved by statistical models and machine learning methods.
Taking the traffic flow correlation between neighboring roads or directly connected roads into consideration, researchers turn to mining the spatial relationship between road segments [24] and utilizing the correlation findings to model urban transportation traffic [25,26,27]. This correlation analysis identifies the underlying relationship in the road networks, while a few studies have been conducted that make use of these findings to realize traffic prediction and solve the sparsity problems.
Among the effective methods to solve data sparsity are generative models, such as the tensor decomposition method [28]. Tensor decomposition is a generative method that can realize prediction with historical missing data [29]. Owing to the capability of tackling the sparsity problem, the tensor decomposition method has been adopted to model urban road network traffic prediction. Tang K. et al. [30] propose to construct a three-order tensor to model the travel time of different road segments under different traffic conditions in some time slots. This research takes the congestion status of road segments into the travel time modeling, while the temporal pattern is not given enough analysis. The research in [31] utilized the tensor decomposition method to recognize traffic patterns without predicting the future transportation traffic value, which is the main concern of transportation traffic modeling.
Pastor G. et al. [32] capitalize on the definition of rank, called the tensor train, to present a low-rank tensor model for vehicular traffic volume data. The proposed method exploits all the correlations between local structures that are presented in the multiple models. The resulting optimally balanced tensor improves the imputation accuracy of the tensor train rank. However, this research focuses on the tensor rank and the imputation accuracy [33] and is not particularly concerned with traffic flow prediction. With tensor construction and tensor decomposition-based transportation traffic prediction, context-aware information about road network traffic can be captured and can assist in the improvement of traffic flow prediction accuracy [34,35,36,37]. This is the main focus of this paper, and we propose to model transportation traffic with a fourth-order tensor by incorporating the location correlation and the temporal dimension, including the time of day, the day of the week and the week of the month.
By analyzing the historical traffic flow, we observe that the traffic flow presents a spatial pattern and temporal pattern. Specifically, the spatial pattern means that the traffic flow of cascading locations is of a similar variation trend or opposite trends. The temporal pattern is the periodicity and the temporal variation trend. The problem of how to incorporate these spatial and temporal correlations, which are hidden in the original data in traffic flow prediction models, has yet to be solved. Fully incorporating the underlying spatial and temporal correlation of transportation traffic data assists us in grasping the traffic pattern and alleviating the data sparsity problem during the traffic flow prediction process, which is considered in our proposed traffic flow prediction method.
Previous studies about transportation traffic correlation concentrate on the traffic correlation on different road segments [6]. These methods and findings assist us in understanding the road structure and transportation traffic surveillance. However, there is still not a sufficient transportation correlation for traffic flow prediction when faced with the data sparsity problem. The researchers in [15] proposed the utilization of a tensor-based method for modeling traffic data and completing the missing traffic data, whereas our motivation is to predict the traffic flow when the original data have different percentages of missing values. Additionally, the aforementioned study only focused on dealing with the missing traffic data at a single point. The case of missing data from neighboring roads was not considered, so it ignored the spatial correlation of traffic data.
In this paper, we propose to construct a traffic flow tensor that captures the spatial and temporal correlation of transportation traffic. We further propose a tensor decomposition method that predicts future traffic flow with missing data on cascaded road segments or on continuous days to tackle the spatial and temporal data sparsity problem. To be specific, the main contributions of this paper include the following aspects:
(1)
We propose the utilization of a fourth-order tensor to model traffic flows, which can capture the spatial and temporal pattern of transportation traffic. Based on the tensor representation of traffic flows, we further propose a correlation estimation model to estimate the relationship between each pair of dimensions of the fourth-order tensor.
(2)
Based on the constructed fourth-order traffic flow tensor, we propose a gradient descent-based tensor decomposition algorithm for traffic flow prediction, which does not need pre-training and can tackle the data sparsity problem from spatial and temporal perspectives.
(3)
To validate the traffic flow prediction method, case studies on two real-world datasets are constructed. The evaluation results demonstrate that our proposed traffic flow prediction method outperforms other baselines with missing temporal data and missing spatial data.
According to the research problem above, the rest of this paper is organized as follows: the Methods are presented in Section 2. Specifically, the tensor construction, the tensor decomposition, and the prediction algorithm are, respectively, described. The Datasets and Metrics are described in Section 3. Our experimental Results using two real-world datasets are presented in order to evaluate our proposed traffic flow prediction method in Section 4. A Discussion of our conclusions and future works is conducted in Section 5.

2. Methods

2.1. Tensor Construction

By analyzing the traffic flow, we find that the traffic pattern correlates to the road segment location, time of day, day of the week, and the week of the month. In this paper, we construct a fourth-order tensor.
Specifically, we analyze the correlation between the four dimensions to certify the multi-pattern of traffic flow on urban roads, which is suitable for tensor modeling. It also helps to understand the feasibility of tensor-based traffic flow modeling.
Firstly, we incorporate a correlation calculation formula, as shown in Equation (1), to estimate the relationship between each dimension in the constructed tensor.
S n = i j 1 c o l n R n ( i , j ) c o l n ( c o l n 1 ) / 2
where R n represents the correlation matrix after transforming the fourth-order traffic flow tensor into an n-order matrix, c o l n denotes the column number after transforming the traffic flow tensor into an n-order matrix, and S n represents the correlation results of the n-dimension of the traffic flow tensor. A larger value of S n represents a more correlated relation in the dimension. This correlation estimation model can certify that the traffic flow tensor is reasonably constructed and incorporates effective traffic pattern information underlined in the traffic flow data.
After transforming the fourth-order traffic flow tensor X t i m e × d a y × w e e k × l o c a t i o n into a matrix on the n-dimension, the matrix is constructed by columns on the n-dimension to get X ( n ) . Then, the correlation matrix based on this transformed matrix denotes the correlation between these transformed matrices. Elements in the correlation matrix are the quantized relationship between columns. The average value after summing the correlation matrix entries obtains the average correlation.

2.2. Tensor Decomposition

After constructing the fourth-order traffic flow tensor, we utilize the Tucker-based tensor decomposition approach to predict future traffic flow values, which could capture the multi-dimensional inherent correlation of traffic flows. The tensor decomposition is shown in Equation (2).
X Φ × 1 U T i m e × 2 U D a y × 3 U W e e k × 4 U L o c a t i o n
where X 288 × 7 × 7 × 10 in the evaluation and we set each time slot as 5 min. Then, the time slot number of a day is equal to 288. The day number of a week is 7, and we select 10 locations. Then, the core tensor is Φ 3 × 3 × 3 × 3 , which reflects the relation between the factor matrix of U T i m e   , U D a y   ,   U W e e k and U L o c a t i o n , which, respectively, denote the components of traffic patterns in terms of time, day, week, and location.
To gradually represent the tensor-based prediction method, we first introduce the matrix filling-based method. Then, this can be extended to the fourth-order tensor decomposition method.
We construct a two-order matrix that maps the spatial and temporal traffic flow, as shown in Figure 1. The dimension consists of location and time. Each entry of the matrix denotes the traffic flow value, and the empty entries mean values that are to be predicted.
Generally, the matrix is represented as X ( α × h + α × p ) × l , where α means the total time length, and h , p , respectively, represent the historical time span and the prediction time span. l denotes the neighbor locations. For the prediction model, we assume that the current time slot is t i , then the prediction problem is transformed to fill the values in the time span [ t i + α , t i + 2 α , , t i + p × α ] given the known values in the time span [ t i , t i α , t i 2 α , , t i h × α ] .
In fact, there has been sufficient research on filling missing values in matrices, such as the widely used SVD (singular value decomposition) algorithm. Matrix filling is generalized as an optimization problem, as shown in Equation (3).
f W ( A , B ) = 1 2 X A B T W 2
where w is the weight matrix of the same size as matrix A . Each entry of w denotes whether the traffic flow exists. Specifically, 0 means a missing value (otherwise, values are 1). A and B are the factor matrices that need to be estimated using the factorizing algorithm.
Progressively, we illustrate a third-order tensor-based prediction method. The constructed tensor is shown in Figure 2. The three dimensions consist of the time, the day and the week.
To incorporate the correlation between locations, we further add the location dimension and construct a fourth-order tensor of traffic flow, as shown in Figure 3. Finally, the constructed traffic flow tensor incorporates the spatial and temporal correlation.

2.3. Prediction Algorithm

In this part, a detailed representation of the tensor-based traffic flow prediction is given. As introduced, the tensor is factorized into the core tensor and factor matrices. The objective function is to minimize the original tensor and the multiplication of the core tensor and factor matrices. Note that we focus on sparsity-based traffic flow modeling. Thus, the tensor-based prediction algorithm could be capable of predicting future traffic flow values given several historical or continuous instances of missing data. The objective function used in this paper is shown in Equation (4).
f W ( A , B , C ) = 1 2 W X W Φ ; A , B , C W 2
where W is the weight tensor of the constructed fourth-order traffic flow tensor X with the same size. Each element is defined as in Equation (5):
w i j k = { 0 , i f   x i j k   lost 1 , e l s e ;
According the objective function in Equation (4), the core tensor can be calculated as in Equation (6).
X = Φ ; U ( 1 ) , U ( 2 ) , , U ( N ) Φ = X ; U ( 1 ) T , U ( 2 ) T , , U ( N ) T
To optimize the objective function in Equation (4) and get the factorized results of the core tensor and factor matrix A, B, C, we propose a weighted gradient descent-based optimization algorithm, the Tucker-WGopt (weighted gradient optimization) algorithm. For simplification, we first take a three-order tensor X I × J × K as an example. Then, the objective function described in Equation (4) can be transformed into the formula as shown in Equation (7).
f W ( A , B , C ) = i = 1 I j = 1 J k = 1 K w i j k 2 S S = { x i j k 2 2 x i j k ( p = 1 P q = 1 Q r = 1 R ϕ p q r a i p b j q c k r ) + ( p = 1 P q = 1 Q r = 1 R ϕ p q r a i p b j q c k r ) 2 }
Then, the gradient of the factor tensor A can be calculated as shown in Equation (8).
f A = f a i p = 2 j = 1 J k = 1 K w i j k 2 S S = { ( x i j k + l = 1 P m = 1 Q n = 1 R ϕ i m n a i l b j m c k r ) ( q = 1 Q r = 1 R ϕ p q r b j q c k r ) }
To simplify the representation in Equation (8), we introduce temporary variables, including a tensor Y , Y = W X , and Z = W Φ ; A , B , C , then the objective function shown in Equation (4) can be transformed into Equation (9).
f W ( A , B , C ) = 1 2 Y Z W 2
Here, the temporary tensor Y can be pre-calculated to decrease the computation time and speed up the prediction algorithm. The gradient of each factor matrix can be represented as in Equation (10).
f A = 2 ( Z ( 1 ) Y ( 1 ) ) ( Φ   × 2 B   × 3 C ) ( 1 ) T   ; f B = 2 ( Z ( 2 ) Y ( 2 ) ) ( Φ   × 1 A   × 3 C ) ( 2 ) T   ; f C = 2 ( Z ( 3 ) Y ( 3 ) ) ( Φ   × 1 A   × 2 B ) ( 3 ) T   ;
After extending it to the N-order tensor, the prediction algorithm is presented in Algorithm 1. The traffic flow value in the time span to be predicted is removed, and a certain percentage of the historical data before the prediction horizon are lost, meaning a sparse traffic flow tensor. The proposed traffic flow prediction algorithm can realize traffic flow forecasting by tackling this data sparsity problem.
Algorithm 1. Dynamic Traffic Flow Prediction
Input: sparse traffic flow tensor X with data removed in the prediction horizon.
Output: traffic prediction tensor X ˜ .
1. Set the order of the core tensor Φ .
2. Initialize the core tensor Φ .
3. Initialize each factor matrix A ( 1 ) , A ( 2 ) , , A ( N ) ;
4. Utilize the factor matrices to calculate the core tensor Φ , according to the formula in (6).
5. Pre-calculate the tensor Y = W X with norm γ = Y .
6. Calculate tensor Z = W Φ ; A ( 1 ) , , A ( N ) .
7. Calculate the tensor T = Y - Z .
8. Calculate f = 1 2 γ < Y , Z > + 1 2 Z 2 .
9. Calculate the gradient matrix as G ( n ) = T ( n ) ( Φ × 1 A ( 1 ) × × n 1 A ( n 1 ) × n + 1 A ( n + 1 ) × × N A ( N ) ) ( n ) T
10. Utilizing the gradient decent algorithm to get the core tensor Φ and the factor matrices A ( 1 ) , , A ( N ) .
11. Calculate the filled tensor
      X ˜ = Φ × 1 A ( 1 ) × 2 A ( 2 ) × × N A ( N )
12. Return X ˜

3. Datasets and Metrics

In this section, we present the datasets in this study to verify the traffic prediction approach. Additionally, the metrics for measuring the prediction accuracy are elaborately described.

3.1. Datasets

In order to ensure the feasibility, repeatability, and usability of our model, we utilize two real-world datasets to test the performance of our traffic flow prediction algorithm.
Our dataset is the expressway traffic flow collected from the PeMS (performance measurement system) in California, which is a free way performance measurement system for all of California. It contains I-5 North roads, and the time spans from 1 March 2017 to 30 April 2017. Each time slot is 5 min, and the time span consists of 288 time slots. The dataset contains 11 locations. The first six-week dataset is used to train the model, and the last two-week dataset is applied to test the performance of prediction algorithms. For visualization, examples of two locations in the two months (60 days) are shown in Figure 4.
This shows that the traffic flow of a location presents a variation pattern in the time of day and the day of the month, which can be captured using our proposed fourth-order tensor construction model.
Another dataset is the traffic flow on two cascading urban roads in Changchun, China. The traffic flow is obtained from urban taxi cabs traveling on roads. The GPS trajectories generated by the taxi cabs are utilized to extract the vehicle number on a road in a given time slot. The real dataset contains 1929 taxi cabs, and the trajectory data are generated from 1 May 2017 to 29 July 2017 with a total of 90 days of traffic flow data. The road network, together with the trajectory data of one day, are shown in Figure 5. In order to incorporate the spatial correlation of traffic flow between locations, we select two roads in the major area.

3.2. Performance Metrics

To quantify the prediction of traffic flow prediction algorithms, we apply four metrics, MAE (mean absolute error), MAPE (mean absolute percentage error), RMSE ((root mean square error)), and TCA (traffic capacity accuracy), which are shown from Equation (11) to Equation (14).
M A E = 1 n t = 1 n | x t x ^ t |
M A P E = 1 n t = 1 n | x t x ^ t | x t × 100 %
R M S E = 1 n t = 1 n ( x t x ^ t ) 2
T C A = 1 ( I W ) ( X X ^ ) ( I W ) X
where x t denotes the ground truth of traffic flow, x ^ t denotes the prediction value, and n is the sample number. X ^ is the predicted tensor where the prediction horizon is along the timeline. Note that a smaller value of either MAE, MAPE, or RMSE indicates a better prediction. A bigger value of TCA instead represents a better prediction. Compared to the other three metrics, i.e., MAE, MAPE and RMSE, TCA incorporates the missing data information into measuring the prediction performance, which leads to its capability of verifying the prediction accuracy in terms of different levels of missing data in the model inputs.
To demonstrate the advantage of our proposed traffic flow prediction algorithm, Tucker-WGopt, four baselines are adopted in the experiment. The baselines include Tucker-ALS (alternating least squares), CP (CANDECOMP/PARAFAC)-ALS, SVR (support vector regression), and the traditional time series model ARIMA (auto regressive integrated moving average).

4. Results and Analysis

In this section, we present the prediction performances for both the complete data and the sparse data in terms of prediction accuracy measured by the metrics. Moreover, we look into and compare time consumption for different methods in this section. Two real-world datasets are utilized in the experiment. The dataset for the Changchun, China, only contains two cascading roads, and the PeMS dataset contains 11 locations. In the experimental part, to evaluate the prediction performance on the complete data, we utilize both complete datasets. For evaluating the prediction accuracy in terms of sparse data, we utilize the PeMS dataset, as we should evaluate missing data in neighboring locations, and the PeMS dataset contains more neighboring locations.

4.1. Correlation of Tensor Dimension Analysis

In this section, we present the correlation of the fourth-order tensor of traffic flow using our proposed correlation estimation model. The correlation calculation results are shown in Table 1.
It can be found that the correlation in the location dimension is calculated to be the largest value. The temporal traffic pattern in the day of the week and the week of the month presents an adequate correlation, whereas the correlation in the time dimension has the smallest value. By looking into the real-world situation, this underlines that the traffic flow of a given day is a bit stochastic. When it comes to the long-term traffic pattern, say daily or weekly, the traffic instead presents a characteristically more stable pattern. Such stable patterns are captured in the tensor construction, and could facilitate the traffic prediction.

4.2. Prediction Performance with the Complete Data

We first test the prediction performance of the proposed model on the original datasets. Both original datasets are complete, meaning that no elements are missing. Such an evaluation helps us know how the model performs for a dataset where no elements are missing. Measured by three metrics, i.e., MAPE, RMSE, and TCA, the prediction results on the PeMS dataset and the trajectory dataset in Changchun, i.e., TraCC (trajectory dataset of Changchun, China), are shown in Table 2.
The results in Table 2 show that the proposed algorithm, Tucker-WGopt, obtains the smallest prediction error measured by two metrics, namely MAPE and RMSE. The results of the two datasets are quite similar. In addition, it achieves the largest TCA value. This means that Tucker-WGopt outperforms other methods in terms of prediction accuracy. Compared to Tucker-ALS, the proposed Tucker-WGopt also obtains improvements, which verify the effectiveness of incorporating weighed gradient optimization into the Tucker-based tensor decomposition. Note that the TCA value obtained by the proposed method also performs the best when considering the missing data weight matrix. Further testing of the prediction performance with the sparse data is presented in the next part of this section. Aside from the prediction accuracy, we further show the performance from the perspective of computation time, which is shown in Table 3.
Table 3 shows that the proposed prediction algorithm, Tucker-WGopt, consumes less time compared to ARIMA. However, it does not show an advantage in terms of computing speed compared to Tucker-ALS, CP-ALS, or SVR. The advantage of the tensor decomposition or matrix decomposition models is that they do not require a training process. Moreover, the tensor-based methods are capable of tackling sparse data for value prediction. Sparse data mean that a certain number of entries in the tensor are missing, and the tensor decomposition method keeps being capable of predicting the future values even with these empty entries; meanwhile, such empty entries can be filled after utilizing the prediction algorithm. In the next section, we further verify the performance of traffic prediction when different levels of missing data exist.

4.3. Verifying with Sparse Data

As we need calculate the prediction accuracy of the model, we have collected datasets where the original data are not missing. The missing data are constructed by randomly removing data, which is carried out to test the model’s robustness in terms of missing data. Thus, the location of missing data exists randomly in the road network, and such stochastically generalized locations could help ensure the robustness of missing data for randomly selected roads.
To further test the performance of our model with different amounts of missing data, we randomly remove values in the tensor. The percentage of removed data spans from 10% to 90%. Under such a situation, the prediction accuracy, measured by TCA, is as shown in Figure 6.
As shown in Figure 6, we found that the prediction accuracy decreases with the percentage of missing data increasing. The TCA values keep being larger than 0.8 even when 90 percent of data have been removed. This demonstrates that the proposed tensor decomposition-based method realizes an effective traffic flow prediction; moreover, it outperforms two other baselines under all percentages of missing data.
In a real situation, missing data may exist in continuous time slots. For instance, where the data for a day are completely missing. To further verify the capability of tackling the missing data phenomenon for traffic prediction in the proposed method, we then delete the data in the day dimension, meaning that a whole day of data is missing. Measured by MAE, the results of continuous missing data in one day are shown in Figure 7.
Measured by MAE, we find that the proposed method effectively predicts traffic flow values with small errors. For further testifying the robustness of the model in terms of tackling sparse data for prediction, we remove data for continuous days. Measured by MAPE, the results of three tensor-based methods are shown in Figure 8. We find that the results of the three methods are similar when the missing data are from less than three continuous days, whereas, with data removed for continuous days, the prediction errors of Tucker-ALS and CP-ALS increase substantially. However, the proposed prediction method, Tucker-WGopt, keeps a similar prediction accuracy, which is much smaller than the results of other two baselines. Such observations demonstrate that the proposed Tucker-WGopt algorithm facilitates the tensor decomposition to capture more spatiotemporal information on traffic flows for future traffic prediction. Hereby, the proposed method presents advantages over two other baselines for tackling data missing in continuous days.
Another missing data scenario is that the data are missing on neighboring road segments. Here, we further test the prediction of our proposed method in this situation; the result is shown in Figure 9. This shows that the prediction algorithm effectively fits real traffic flow.

5. Discussion

This paper presents a tensor decomposition-based urban transportation traffic prediction method, which incorporates the location correlation of road segments in the road network and the temporal correlation into tensor construction. The temporal correlation contains the time of day, the day of the week, and the week of the month. In addition to the location of a road, a fourth-order tensor is constructed. Before tensor construction, we propose a traffic correlation estimation method to certify the rationality of the constructed tensor. After constructing the fourth-order traffic flow tensor, we further propose a tensor decomposition-based traffic flow prediction algorithm, which is capable of tackling missing data on neighboring road segments and on continuous days. Evaluating real-world datasets of traffic flow, it demonstrates that the proposed traffic flow method outperforms the existing baselines with different levels of data sparsity.
The proposed fourth-order tensor can be transformed into a fifth-order tensor only when we have multiple months of traffic data. By adding the dimension of the month, the temporal pattern in different months can be captured to predict traffic flows. Similarly, if we can obtain access to a dataset that covers more seasons or more years, the seasonal dimension or the yearly dimension can also be added. Such verification experiments could only be carried out when a much bigger dataset is available. Additionally, testing the approach on more road networks in other countries or cities may help further evaluate the effectiveness, a task which is left to our future studies.
In conclusion, this paper proposed to utilize tensor decomposition to model traffic flow and proposed a traffic flow prediction algorithm. The proposed method is designed mainly to tackle traffic flow prediction with missing data. In future studies, we will focus on fifth-order or sixth-order tensor modeling for traffic flow prediction. On the other hand, the context-aware information of traffic congestion status could also be incorporated into modeling the traffic flow at the road network level.

Author Contributions

Conceptualization, F.Y. and G.L.; methodology, F.Y.; software, L.H.; validation, C.S.C., G.L. and L.H.; formal analysis, F.Y.; investigation, L.H.; resources, G.L.; data curation, C.S.C.; writing—original draft preparation, F.Y.; writing—review and editing, F.Y.; visualization, L.H.; supervision, L.H. All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported by the National Natural Science Foundation of China (61772230, 6170215), the Changchun Science and Technology Development Program (18DY005), and the Special Fund for Industrial Innovation Project of Jilin Province (2017C031-1).

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Abadi, A.; Rajabioun, T.; Ioannou, P.A. Traffic Flow Prediction for Road Transportation Networks with Limited Traffic Data. IEEE Trans. Intell. Transp. Syst. 2014, 16, 1–10. [Google Scholar] [CrossRef]
  2. Çolak, S.; Lima, A.; González, M.C. Understanding congested travel in urban areas. Nat. Commun. 2016, 7, 10793. [Google Scholar] [CrossRef]
  3. Olmos, L.E.; Çolak, S.; Shafiei, S.; Saberi, M.; González, M.C. Macroscopic dynamics and the collapse of urban traffic. Proc. Natl. Acad. Sci. USA 2018, 115, 12654–12661. [Google Scholar] [CrossRef] [Green Version]
  4. Zeng, G.; Li, D.; Guo, S.; Gao, L.; Gao, Z.; Stanley, H.E.; Havlin, S. Switch between critical percolation modes in city traffic dynamics. Proc. Natl. Acad. Sci. USA 2018, 116, 23–28. [Google Scholar] [CrossRef] [Green Version]
  5. Huang, L.; Yang, Y.; Gao, H.; Zhao, X.; Du, Z. Comparing Community Detection Algorithms in Transport Networks via Points of Interest. IEEE Access 2018, 6, 29729–29738. [Google Scholar] [CrossRef]
  6. Liu, Z.; Li, Z.; Li, M.; Xing, W.; Lu, D. Mining Road Network Correlation for Traffic Estimation via Compressive Sensing. IEEE Trans. Intell. Transp. Syst. 2016, 17, 1880–1893. [Google Scholar] [CrossRef]
  7. Quddus, M.; Washington, S. Shortest path and vehicle trajectory aided map-matching for low frequency GPS data. Transp. Res. Part C Emerg. Technol. 2015, 55, 328–339. [Google Scholar] [CrossRef] [Green Version]
  8. Huang, L.; Yang, Y.; Zhao, X.; Ma, C.; Gao, H. Sparse Data-Based Urban Road Travel Speed Prediction Using Probabilistic Principal Component Analysis. IEEE Access 2018, 6, 44022–44035. [Google Scholar] [CrossRef]
  9. Luo, X.; Niu, L.; Zhang, S. An Algorithm for Traffic Prediction Based on Imporved SARMA and GA. KSCE J. Civ. Eng. 2018, 22, 4107–4115. [Google Scholar] [CrossRef]
  10. Tang, K.; Chen, S.; Khattak, A.J. A Spatial–Temporal Multitask Collaborative Learning Model for Multistep Traffic Flow Prediction. Transp. Res. Rec. J. Transp. Res. Board 2018, 2672, 1–13. [Google Scholar] [CrossRef]
  11. Tang, J.; Liu, F.; Zou, Y.; Zhang, W.; Wang, Y. An Improved Fuzzy Neural Network for Traffic Speed Prediction Considering Periodic Characteristic. IEEE Trans. Intell. Transp. Syst. 2017, 18, 2340–2350. [Google Scholar] [CrossRef]
  12. Ma, Z.; Koutsopoulos, H.N.; Ferreira, L.; Mesbah, M. Estimation of trip travel time distribution using a generalized Markov chain approach. Transp. Res. Part C Emerg. Technol. 2017, 74, 1–21. [Google Scholar] [CrossRef]
  13. Wu, Y.; Tan, H.; Qin, L.; Ran, B.; Jiang, Z. A hybrid deep learning based traffic flow prediction method and its understanding. Transp. Res. Part C Emerg. Technol. 2018, 90, 166–180. [Google Scholar] [CrossRef]
  14. Zhao, J.; Gao, Y.; Bai, Z.; Lu, S.; Wang, H. Traffic speed prediciton under non-recurrent congesion: Based on LSTM method and Beidou navigation satellite system data. IEEE Intell. Transpotatrion Syst. Mag. 2019, 11, 70–81. [Google Scholar] [CrossRef]
  15. Tan, H.; Feng, G.; Feng, J.; Wang, W.; Zhang, Y.-J.; Li, F. A tensor-based method for missing traffic data completion. Transp. Res. Part C Emerg. Technol. 2013, 28, 15–27. [Google Scholar] [CrossRef] [Green Version]
  16. Zhong, C.; Manley, E.; Arisona, S.M.; Batty, M.; Schmitt, G. Measuring variability of mobility patterns from multiday smart-card data. J. Comput. Sci. 2015, 9, 125–130. [Google Scholar] [CrossRef]
  17. Li, D.; Fu, B.; Wang, Y.; Lu, G.; Berezin, Y.; Stanley, H.E.; Havlin, S. Percolation transition in dynamical traffic network with evolving critical bottlenecks. Proc. Natl. Acad. Sci. USA 2014, 112, 669–672. [Google Scholar] [CrossRef] [Green Version]
  18. Wang, Y.; Zheng, Y.; Xue, Y. Travel time estimation of a path using sparse trajectories. In Proceedings of the 20th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining-KDD ’14, Association for Computing Machinery (ACM), New York, NY, USA, 24–27 August 2014; pp. 25–34. [Google Scholar]
  19. Li, Z.; Jiang, S.; Li, L.; Li, Y. Building sparse models for traffic flow prediciton: An empirical comparison between statistical heuristics and geometric heuristics for Bayesian network approaches. Transp. B-Transp. Dyn. 2019, 7, 107–123. [Google Scholar]
  20. Nicholas, G.; Dokolov, V. Deep learning for short-term traffic flow prediction. Transp. Res. Part C 2017, 79, 1–17. [Google Scholar]
  21. Lin, F.; Xu, Y.; Yang, Y.; Ma, H. A Spatial-Temporal Hybrid Model for Short-Term Traffic Prediction. Math. Probl. Eng. 2019, 2019, 1–12. [Google Scholar] [CrossRef]
  22. Lu, L.; Wang, J.; He, Z.; Chan, C.-Y. Real-time estimation of freeway travel time with recurrent congestion based on sparse detector data. IET Intell. Transp. Syst. 2018, 12, 2–11. [Google Scholar] [CrossRef]
  23. Mulla, A.K.; Joshi, A.; Chavan, R.; Chakraborty, D.; Manjunath, D. A Microscopic Model for Lane-Less Traffic. IEEE Trans. Control. Netw. Syst. 2018, 6, 415–428. [Google Scholar] [CrossRef]
  24. Peng, S.; Shen, Y.; Zhu, Y.; Chen, Y. A Frequency-Aware Spatio-Temporal Network for Traffic Flow Prediction. In DASFAA 2019: Database Systems for Advanced Applications; Springer: Cham, Switzerland, 2019; pp. 697–712. [Google Scholar] [CrossRef]
  25. Yang, Z.; Bing, Q.; Lin, C.; Yang, N.; Mei, D. Research on Short-Term Traffic Flow Prediction Method Based on Similarity Search of Time Series. Math. Probl. Eng. 2014, 2014, 1–8. [Google Scholar] [CrossRef] [Green Version]
  26. Wang, Q.; Wang, J.; Yuan, Y. Locality constraint distance metric learning for traffic congesiton detection. Pattern Recognit. 2018, 75, 272–281. [Google Scholar] [CrossRef]
  27. Min, W.; Wynter, L. Real-time road traffic prediction with spatio-temporal correlations. Transp. Res. Part C Emerg. Technol. 2011, 19, 606–616. [Google Scholar] [CrossRef]
  28. Lin, L.; Li, J.; Chen, F.; Ye, J.; Huai, J. Road traffic Speed Preediction: A Probabilistic Model Fusing Multi-Source Data. IEEE Trans. Knowl. Data Eng. 2017, 30, 1310–1323. [Google Scholar] [CrossRef]
  29. Shao, W.; Chen, L. License Plate Recognition Data-Based Traffic Volume estimation Using Collaborative Tensor Decomposition. IEEE Trans. Intellignet Transp. Syst. 2018, 19, 3439–3448. [Google Scholar] [CrossRef]
  30. Tang, K.; Chen, S.; Liu, Z. Citywide Spatial-Temporal Travel Time Estimation Using Big and Sparse Trajectories. IEEE Trans. Intell. Transp. Syst. 2018, 19, 4023–4034. [Google Scholar] [CrossRef]
  31. Zhong, H.; Qi, G.; Guan, W.; Hua, X. Application of Nonnegative Tensor Factorization for Intercity Rail–Air Transport Supply Configuration Pattern Recognition. Sustainability 2019, 11, 1803. [Google Scholar] [CrossRef] [Green Version]
  32. Pastor, G.; Giancarlo, P. A Low-Rank Tensor Model for Imputation of Missing Vehicular Traffic Volume. IEEE Trans. Veh. Technol. 2018, 67, 8934–8938. [Google Scholar] [CrossRef] [Green Version]
  33. Chen, X.; He, Z.; Sun, L. A Bayesian tensor decomposition approach for spatiotemporal traffic data imputation. Transp. Res. Part C Emerg. Technol. 2019, 98, 73–84. [Google Scholar] [CrossRef]
  34. Tang, K.; Chen, S.; Khattak, A. Personalized travel time estimation for urban road networks: A tensor-based context-aware approach. Expert Syst. Appl. 2018, 103, 118–132. [Google Scholar] [CrossRef]
  35. Arena, F.; Ticali, D. The development of autonomous driving vehicles in tomorrow’s smart cities mobility. In Proceedings of the International Conference of Computational Methods in Sciences and Engineering 2018, Thessaloniki, Greece, 14–18 March 2018; p. 140007. [Google Scholar]
  36. Arena, F.; Pau, G.; Severino, A. An Overview on the Current Status and Future Perspectives of Smart Cars. Infrastructures 2020, 5, 53. [Google Scholar] [CrossRef]
  37. Zhao, J.; Gao, Y.; Tang, J. Highway Travel Time Prediction Using Sparse Tensor Completion Tactics and-Nearest Neighbor Pattern Matching Method. J. Adv. Transp. 2018, 2018. [Google Scholar] [CrossRef] [Green Version]
Figure 1. Traffic flow matrix.
Figure 1. Traffic flow matrix.
Sensors 20 06046 g001
Figure 2. Third-order tensor.
Figure 2. Third-order tensor.
Sensors 20 06046 g002
Figure 3. Fourth-order traffic flow tensor.
Figure 3. Fourth-order traffic flow tensor.
Sensors 20 06046 g003
Figure 4. Traffic flow of two express ways.
Figure 4. Traffic flow of two express ways.
Sensors 20 06046 g004
Figure 5. Case study area in Changchun, China, and the taxi trajectory distribution. The background is the road network, and the red points are the trajectory points (GPS points) generated by the taxi cabs. The trajectory is utilized to extract the traffic flow on a road.
Figure 5. Case study area in Changchun, China, and the taxi trajectory distribution. The background is the road network, and the red points are the trajectory points (GPS points) generated by the taxi cabs. The trajectory is utilized to extract the traffic flow on a road.
Sensors 20 06046 g005
Figure 6. TCA (traffic capacity accuracy) with different percentages of missing data.
Figure 6. TCA (traffic capacity accuracy) with different percentages of missing data.
Sensors 20 06046 g006
Figure 7. Prediction of our method measured by MAE (mean absolute error) with continuous missing data in one day.
Figure 7. Prediction of our method measured by MAE (mean absolute error) with continuous missing data in one day.
Sensors 20 06046 g007
Figure 8. Prediction accuracy measured by MAPE (mean absolute percentage error) with continuous missing data in multi-days.
Figure 8. Prediction accuracy measured by MAPE (mean absolute percentage error) with continuous missing data in multi-days.
Sensors 20 06046 g008
Figure 9. Prediction results with missing data on neighboring roads.
Figure 9. Prediction results with missing data on neighboring roads.
Sensors 20 06046 g009
Table 1. Correlation between dimensions.
Table 1. Correlation between dimensions.
Dimension.Matrix SizeCorrelation
Time 288 × ( 7 × 7 × 10 ) 0.41
Day 7 × ( 288 × 7 × 10 ) 0.88
Week 7 × ( 288 × 7 × 10 ) 0.96
location 10 × ( 288 × 7 × 7 ) 0.98
Table 2. Effectiveness of different prediction methods.
Table 2. Effectiveness of different prediction methods.
MethodMAPERMSETCA
PeMSTraCCPeMSTraCCPeMSTraCC
Tucker-WGopt0.0913920.0913186.21386.20930.98660.9874
Tucker-ALS0.0972510.0970398.86948.84390.97830.9832
CP-ALS0.0993680.0992308.72448.71930.97740.9796
SVR0.1001350.1001419.12569.1231not applicable
ARIMA0.1024380.1021749.36959.3597not applicable
Table 3. Efficiency of different methods.
Table 3. Efficiency of different methods.
MethodTime (s)Training Needed
Tucker-WGopt5.1N
Tucker-ALS0.7391N
CP-ALS0.6773N
SVR0.3158Y
ARIMA13.7808Y
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Yang, F.; Liu, G.; Huang, L.; Chin, C.S. Tensor Decomposition for Spatial—Temporal Traffic Flow Prediction with Sparse Data. Sensors 2020, 20, 6046. https://doi.org/10.3390/s20216046

AMA Style

Yang F, Liu G, Huang L, Chin CS. Tensor Decomposition for Spatial—Temporal Traffic Flow Prediction with Sparse Data. Sensors. 2020; 20(21):6046. https://doi.org/10.3390/s20216046

Chicago/Turabian Style

Yang, Funing, Guoliang Liu, Liping Huang, and Cheng Siong Chin. 2020. "Tensor Decomposition for Spatial—Temporal Traffic Flow Prediction with Sparse Data" Sensors 20, no. 21: 6046. https://doi.org/10.3390/s20216046

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop