# Traffic Flow Prediction during the Holidays Based on DFT and SVR

Authors: Xianglong Luo; Danyang Li; Shengrui Zhang
Journal: Journal of Sensors
 (2019)

---

## Abstract

With the implementation of the freeway free policy during the holidays, traffic congestion in the freeway becomes a common phenomenon. In order to alleviate traffic pressure, traffic flow prediction during the holidays has become a problem of great concern. This paper proposes a hybrid prediction methodology combining discrete Fourier transform (DFT) with support vector regression (SVR). The common trend in the traffic flow data is extracted using DFT by setting an appropriate threshold, which is predicted by extreme extrapolation of the historical trend. The SVR method is applied to predict the residual series. The experimental results with measured data collected from the toll stations in Jiangsu province of China show that the proposed algorithm has higher accuracy compared with the traditional method, and it is an efficient method for traffic flow prediction during the holidays.


---

## Body

## 1. Introduction

With the rapid development of the social economy, the present massive road infrastructure still fails to meet people’s traveling demands [1–5] and traffic congestion has become a common phenomenon in the freeway. Especially, freeways often turn into parking lots during the holidays. To solve the problem of traffic congestion during the holidays, intelligent transportation systems (ITS) have been widely implemented. Traffic flow prediction is fundamental for ITS, and it requires the following preconditions: traffic guidance, planning, and control. Traffic flow is affected by people’s willingness to go to a trip, the weather, and many other factors. The implementation of some policies also results in more dramatic changes in traffic flow, such as free charge for cars under 7 seats during important holidays in China, which makes traffic flow prediction more difficult. Moreover, people’s travel is more for leisure and tourism during the holidays, which makes some changes in the composition of traffic flow. The passenger car flow increases obviously, while the truck flow decreases to some extent. Especially, traffic flow around scenic spots is increasing dramatically, and occasional traffic congestions often occur, which results in traffic flow data becoming more stochastic. Traffic flow distribution during the holidays is obviously different from those during workdays. However, most of the existing prediction models are mainly aimed at workdays, and there are relatively few prediction models aimed at the holidays. To improve transportation operation efficiency, accurate traffic flow prediction during the holidays has become a problem of great concern.Traffic flow prediction is a complex issue. A large number of algorithms have been proposed in the past few years. Existing prediction methods can be basically classified into the following three categories: parametric approach, nonparametric approach, and hybrid approach. The parametric approach includes the historical average (HA) method, autoregressive moving average method (ARIMA) [6, 7], seasonal autoregressive integrated moving average method (SARIMA) [8–10], and Kalman filter (KF) [11, 12]. The nonparametric approach includes artificial neural networks (ANNS) [13–17], k-nearest neighbor (KNN) [18–22], support vector regression (SVR) [23, 24], and the Bayesian model [25, 26]. The hybrid approach mainly combines the parametric approach with the nonparametric approach [27–35]. Vlahogianni et al. [36] summarized existing traffic flow prediction algorithms, and readers interested in details of the models that apply to the field of traffic prediction could refer to their review paper as a reference.Traffic flow data presents a certain regularity, which makes it possible to predict the traffic flow. In order to improve the accuracy of traffic flow prediction, it is a very effective method to decompose the traffic flow data into different components. There are various methods to retrieve the different components in traffic flow data, including the simple average trend [37], principle component analysis [38], empirical mode decomposition (EMD) [39, 40], wavelet methods [41], spectral analysis method [42, 43], and the low-pass filter [44]. Since traffic flow data is characterized by stochastic and highly nonlinear patterns during the holidays, the existing traffic flow decomposition methods cannot achieve good performance, and it is difficult to apply traditional prediction methods to traffic prediction. Due to the impact of the economic environment, the traffic flow data is almost increasing year by year. Although the annual growth rate is not the same and there is a certain stochastic fluctuation, the trend component of traffic flow data changes under the same law but slightly increases year by year. In order to improve the accuracy of the traffic flow prediction, it is very necessary to extract the trend component in traffic flow data. Li et al. [45, 46] have discussed the trend modeling for traffic time series and explained the benefit of detrending.Although Dai et al. [47] have specifically studied the traffic flow during the holidays, they focused on the investigation of holiday traffic flow from the spatial and temporal aspects. The ANN model was used to predict the traffic flow, but this method did not aim at the characteristics of traffic flow during the holiday, it still belonged to the traditional prediction model, and it could not meet the requirement of practical engineering. This paper proposes a hybrid prediction methodology combining discrete Fourier transform (DFT) with support vector regression (SVR). Traffic flow time series are decomposed into a common trend and a high-frequency residual time series. The common trend is extracted with the DFT algorithm through setting the appropriate threshold. The common trend reflects the endogenous characteristics, which are approximately stationary. By extreme extrapolation of the historical trend, the common trend of traffic flow time series is predicted. The residual series, which includes fluctuations and bursts, reflects environment-dependent characteristics. As shown in Chen et al. [48] and Li et al. [49], the existence of bursts brings difficulties for prediction models. This paper proposes a method to identify and preprocess bursts, and the prediction of the residual series is estimated by SVR. Finally, the traffic flow in the next holidays is predicted by combining the prediction result of the common trend with the residual series. The tested results with traffic data collected from the toll stations in Jiangsu province of China, show that proposed algorithm has superior accuracy.The rest of this paper is organized as follows. Section2 gives details on a hybrid traffic prediction method based on hybrid DFT and SVR. In Section 3, the dataset used for our numerical experiments is introduced, and the results with different prediction algorithms are presented. Finally, conclusions and the direction for future research are given in Section 4.


## 2. Methodology

Traffic flow data changes more violently and stochastically, which makes predictions more difficult. In this paper, a hybrid prediction method during the holidays is proposed based on DFT and SVR. The traffic flow data is composed of the common trend and high-frequency residual time series. The traffic flow time series are transformed from the time domain into the frequency domain with DFT, and the trend is extracted through setting the appropriate threshold. Except for the natural growth of the traffic flow during the holiday, the change of the trend component is basically the same. Therefore, the trend component is predicted by extreme extrapolation of the historical trend. For the residual, the fluctuation and burst are defined at first. The mean and variance of the fluctuation are stable, but the burst has great randomness. The burst in the residual component is preprocessed, and then the residual is predicted with SVR. The final prediction result can be obtained by combining the trend with residual prediction result. Our approach is summarized in Figure1.Figure 1
Prediction flowchart for the proposed method.


### 2.1. Decomposition of Traffic Flow Time Series with DFT

The purpose of traffic flow time series decomposition is to extract the trend and residual, which can improve the prediction accuracy. Suppose the sampled traffic flow data onD day holidays can be written as a time series:
(1)XN=xt1,xt1+Δt,xt1+2Δt,…,xt1+n−1Δt,…,xtD,xtD+Δt,xtD+2Δt,…,xtD+n−1Δt,where Δt is the sample time interval, n is the data size in a day, and if Δt is 1h, then n=24. N=nD is the sample data length on D day holidays.The spectrum of the time seriesXN of the traffic data by DFT can be represented as
(2)x^k=∑m=0N−1xme−j2πkm/N,0≤k≤N−1,where xm is the mth sample of XN, x^k is the frequency spectrum of xm, and j is the imaginary unit.Set a thresholdα to remove the high-frequency variations, and the common trend of traffic flow data XT can be extracted.
(3)x~k=x^k,x^k>α,0,x^k≤α,(4)xTm=1N∑k=0N−1x~kej2πkm/N,0≤m≤N−1,where xTm is the mth sample value of the common trend XT.Then, traffic flow data is decomposed into the sum of the common trendXT and the residual Xr:
(5)XN=XT+Xr.


### 2.2. Prediction of the Common Trend

The trend component represents the regular variations of traffic flow data. Commuters are more and more conscientious of the ecological impacts of their trip, and a change of trend in forthcoming years has attracted more attention. For holidays, the trend component of traffic flow data changes under the same law but slightly increases year by year. The increment is also basically the same, although there is a little difference in western countries. Therefore, the trend component is predicted by extreme extrapolation of the historical trend in this paper.Suppose thatX¯TM=XT1,XT2,…,XTM is a common trend in consecutive M years, the maximum value X¯Tmax of the trend component in M year can then be represented as
(6)X¯Tmax=maxXT1,maxXT2,…,maxXTM=xT1max,xT2max,…,xTMmax.The increment of the maximum valueΔx¯Tmax can be computed with (7) as
(7)ΔX¯Tmax=xT2maxxT1max,xT3maxxT2max,…,xTMmaxxTM−1max.The regression analysis is carried out onΔX¯Tmax, and the regression equation is obtained as
(8)CΔxT=β1t+β2,where β1 and β2 are regression coefficients, t is the time variable, and CΔxT is the ratio coefficient of the trend component maximum value compared to that of last year.The predicted trend component inM+1 year is calculated directly with observed traffic flows in consecutive M years.
(9)XTM+1=CΔxTXTM,where CΔxT is the ratio coefficient calculated by (8) and xTM is the trend component in M year.


### 2.3. Prediction of the Residual Component

#### 2.3.1. Prediction Preprocessing

The residual series includes fluctuations and bursts. Suppose that the standard deviationσ is obtained from the square root of the variance for the entire residual time series. As demonstrated in Li et al. [45], a point is defined as a “burst” if the entire residual component is twice larger than the standard deviation σ. Most existing prediction models assume that model inputs have a certain smooth mapping relationship with model outputs. Therefore, the predicted value is near the positive and negative variance σ away from the trend component. That is, existing prediction models have a difficulty in forecasting the bursts. The intraday trend is an M-shaped curve that represents the regular variations of daily traffic flow. The morning and evening rush hours result in the two peaks, while one shallow valley and one deep valley, respectively, appear at noon and midnight. This paper extracts the trend component using DFT, which results in the M-shaped curve being smoothed into a number of sine functions, and traffic flow value being slightly enlarged at noon. In order to improve the accuracy of prediction, a strategy is introduced to preprocess the residual component.
(10)xr=2σ,xr>2σ,xr,xr<−2σ.In the expression in (10), the positive bursts are preprocessed only twice the standard variance σ, and the negative bursts are not changed, which is different from the existing processing methods. The experiments show that the processing algorithm can help suppress the influence of burst disturbance and improve prediction performance.


#### 2.3.2. Support Vector Regression (SVR)

SVR is widely used to deal with nonlinear problems and large-scale prediction algorithms. In this paper, the SVR method is applied to predict the preprocessed residual series. For a given training setT=xi,yi,i=1,2,…,l,xi∈Rn,yi∈Rn, where xi is a dimensional input variable, yi is the corresponding output value, and l represents the size of the training data.Through a nonlinear mapping functionϕ., xi is mapped to a high-dimensional feature space, in which the optimal decision function is constructed as follows:
(11)fx=wTϕx+b,w∈Rn,b∈R,where w is the weight vector and b is the bias value. SVR minimizes the following objective function:
(12)min12w2+C∑i=1lξi+ξi∗s.t.wxi+b−yi≤ε+ξiyi−wxi+b≤ε+ξi∗ξi≥0,ξi∗≥0,ε≥0,where 1/2w2 is the expression for the complexity of the decision function, C is a penalty coefficient, and ξi is the upper training error (ξi∗ is lower) subject to the ε insensitive factor.This optimization problem can be transformed into a dual problem, and its solution is given by (13), where ai∗,ai are the Lagrange multipliers that can be acquired by solving the dual problem and Kxi,x is the Mercer kernel function that equals the inner product of ϕxi with ϕx.
(13)fx=∑i=1lai∗−aiKxi,x+b,s.t.0≤ai∗≤C,0≤ai≤C.The most frequently used Mercer kernel functions are instance sigmoid, polynomial, and radial basis function (RBF). RBF is a common choice for the kernel function because of the need to set very few parameters and excellent overall performance. So, RBF is selected as the kernel function in this paper.


### 2.4. Proposed Prediction Model

Suppose the sampled traffic flow data onD day holidays in consecutive M years can be written as the matrix XMN:
(14)XMN=xt11,xt11+Δt,xt11+2Δt⋯xt11+n−1Δt,⋯,xt1D,xt1D+Δt,xt1D+2Δt⋯xt1D+n−1Δtxt21,xt21+Δt,xt21+2Δt⋯xt21+n−1Δt,⋯,xt2D,xt2D+Δt,xt2D+2Δt⋯xt2D+n−1Δt⋮⋮⋮⋮⋮⋮⋮⋮xtM1,xtM1+Δt,xtM1+2Δt⋯xtM1+n−1Δt,⋯,xtMD,xt2D+Δt,xt2MD+2Δt⋯xtMD+n−1Δt,where Δt is the sample time interval, n is the data size in a day, and N=nD is the sample data length on D day holidays.According to (3), (4), and (5), the traffic flow data in consecutive M years are decomposed into the sum of the trend components and the residuals.
(15)XMN=X¯T+XR=XT1XT2⋮XTM+XR1XR2⋮XRM,where X¯T are the trend components in consecutive M years and XR are the residuals.The predicted traffic flow during the holidays inM+1 year is calculated directly by adding the trend with residual prediction results.
(16)X^M+1=f1X¯T+f2XR,where f1X¯T is the prediction result of the trend component with (9) and f2XR is the prediction result of the residual component with SVR.


## 2.1. Decomposition of Traffic Flow Time Series with DFT

The purpose of traffic flow time series decomposition is to extract the trend and residual, which can improve the prediction accuracy. Suppose the sampled traffic flow data onD day holidays can be written as a time series:
(1)XN=xt1,xt1+Δt,xt1+2Δt,…,xt1+n−1Δt,…,xtD,xtD+Δt,xtD+2Δt,…,xtD+n−1Δt,where Δt is the sample time interval, n is the data size in a day, and if Δt is 1h, then n=24. N=nD is the sample data length on D day holidays.The spectrum of the time seriesXN of the traffic data by DFT can be represented as
(2)x^k=∑m=0N−1xme−j2πkm/N,0≤k≤N−1,where xm is the mth sample of XN, x^k is the frequency spectrum of xm, and j is the imaginary unit.Set a thresholdα to remove the high-frequency variations, and the common trend of traffic flow data XT can be extracted.
(3)x~k=x^k,x^k>α,0,x^k≤α,(4)xTm=1N∑k=0N−1x~kej2πkm/N,0≤m≤N−1,where xTm is the mth sample value of the common trend XT.Then, traffic flow data is decomposed into the sum of the common trendXT and the residual Xr:
(5)XN=XT+Xr.


## 2.2. Prediction of the Common Trend

The trend component represents the regular variations of traffic flow data. Commuters are more and more conscientious of the ecological impacts of their trip, and a change of trend in forthcoming years has attracted more attention. For holidays, the trend component of traffic flow data changes under the same law but slightly increases year by year. The increment is also basically the same, although there is a little difference in western countries. Therefore, the trend component is predicted by extreme extrapolation of the historical trend in this paper.Suppose thatX¯TM=XT1,XT2,…,XTM is a common trend in consecutive M years, the maximum value X¯Tmax of the trend component in M year can then be represented as
(6)X¯Tmax=maxXT1,maxXT2,…,maxXTM=xT1max,xT2max,…,xTMmax.The increment of the maximum valueΔx¯Tmax can be computed with (7) as
(7)ΔX¯Tmax=xT2maxxT1max,xT3maxxT2max,…,xTMmaxxTM−1max.The regression analysis is carried out onΔX¯Tmax, and the regression equation is obtained as
(8)CΔxT=β1t+β2,where β1 and β2 are regression coefficients, t is the time variable, and CΔxT is the ratio coefficient of the trend component maximum value compared to that of last year.The predicted trend component inM+1 year is calculated directly with observed traffic flows in consecutive M years.
(9)XTM+1=CΔxTXTM,where CΔxT is the ratio coefficient calculated by (8) and xTM is the trend component in M year.


## 2.3. Prediction of the Residual Component

### 2.3.1. Prediction Preprocessing

The residual series includes fluctuations and bursts. Suppose that the standard deviationσ is obtained from the square root of the variance for the entire residual time series. As demonstrated in Li et al. [45], a point is defined as a “burst” if the entire residual component is twice larger than the standard deviation σ. Most existing prediction models assume that model inputs have a certain smooth mapping relationship with model outputs. Therefore, the predicted value is near the positive and negative variance σ away from the trend component. That is, existing prediction models have a difficulty in forecasting the bursts. The intraday trend is an M-shaped curve that represents the regular variations of daily traffic flow. The morning and evening rush hours result in the two peaks, while one shallow valley and one deep valley, respectively, appear at noon and midnight. This paper extracts the trend component using DFT, which results in the M-shaped curve being smoothed into a number of sine functions, and traffic flow value being slightly enlarged at noon. In order to improve the accuracy of prediction, a strategy is introduced to preprocess the residual component.
(10)xr=2σ,xr>2σ,xr,xr<−2σ.In the expression in (10), the positive bursts are preprocessed only twice the standard variance σ, and the negative bursts are not changed, which is different from the existing processing methods. The experiments show that the processing algorithm can help suppress the influence of burst disturbance and improve prediction performance.


### 2.3.2. Support Vector Regression (SVR)

SVR is widely used to deal with nonlinear problems and large-scale prediction algorithms. In this paper, the SVR method is applied to predict the preprocessed residual series. For a given training setT=xi,yi,i=1,2,…,l,xi∈Rn,yi∈Rn, where xi is a dimensional input variable, yi is the corresponding output value, and l represents the size of the training data.Through a nonlinear mapping functionϕ., xi is mapped to a high-dimensional feature space, in which the optimal decision function is constructed as follows:
(11)fx=wTϕx+b,w∈Rn,b∈R,where w is the weight vector and b is the bias value. SVR minimizes the following objective function:
(12)min12w2+C∑i=1lξi+ξi∗s.t.wxi+b−yi≤ε+ξiyi−wxi+b≤ε+ξi∗ξi≥0,ξi∗≥0,ε≥0,where 1/2w2 is the expression for the complexity of the decision function, C is a penalty coefficient, and ξi is the upper training error (ξi∗ is lower) subject to the ε insensitive factor.This optimization problem can be transformed into a dual problem, and its solution is given by (13), where ai∗,ai are the Lagrange multipliers that can be acquired by solving the dual problem and Kxi,x is the Mercer kernel function that equals the inner product of ϕxi with ϕx.
(13)fx=∑i=1lai∗−aiKxi,x+b,s.t.0≤ai∗≤C,0≤ai≤C.The most frequently used Mercer kernel functions are instance sigmoid, polynomial, and radial basis function (RBF). RBF is a common choice for the kernel function because of the need to set very few parameters and excellent overall performance. So, RBF is selected as the kernel function in this paper.


## 2.3.1. Prediction Preprocessing

The residual series includes fluctuations and bursts. Suppose that the standard deviationσ is obtained from the square root of the variance for the entire residual time series. As demonstrated in Li et al. [45], a point is defined as a “burst” if the entire residual component is twice larger than the standard deviation σ. Most existing prediction models assume that model inputs have a certain smooth mapping relationship with model outputs. Therefore, the predicted value is near the positive and negative variance σ away from the trend component. That is, existing prediction models have a difficulty in forecasting the bursts. The intraday trend is an M-shaped curve that represents the regular variations of daily traffic flow. The morning and evening rush hours result in the two peaks, while one shallow valley and one deep valley, respectively, appear at noon and midnight. This paper extracts the trend component using DFT, which results in the M-shaped curve being smoothed into a number of sine functions, and traffic flow value being slightly enlarged at noon. In order to improve the accuracy of prediction, a strategy is introduced to preprocess the residual component.
(10)xr=2σ,xr>2σ,xr,xr<−2σ.In the expression in (10), the positive bursts are preprocessed only twice the standard variance σ, and the negative bursts are not changed, which is different from the existing processing methods. The experiments show that the processing algorithm can help suppress the influence of burst disturbance and improve prediction performance.


## 2.3.2. Support Vector Regression (SVR)

SVR is widely used to deal with nonlinear problems and large-scale prediction algorithms. In this paper, the SVR method is applied to predict the preprocessed residual series. For a given training setT=xi,yi,i=1,2,…,l,xi∈Rn,yi∈Rn, where xi is a dimensional input variable, yi is the corresponding output value, and l represents the size of the training data.Through a nonlinear mapping functionϕ., xi is mapped to a high-dimensional feature space, in which the optimal decision function is constructed as follows:
(11)fx=wTϕx+b,w∈Rn,b∈R,where w is the weight vector and b is the bias value. SVR minimizes the following objective function:
(12)min12w2+C∑i=1lξi+ξi∗s.t.wxi+b−yi≤ε+ξiyi−wxi+b≤ε+ξi∗ξi≥0,ξi∗≥0,ε≥0,where 1/2w2 is the expression for the complexity of the decision function, C is a penalty coefficient, and ξi is the upper training error (ξi∗ is lower) subject to the ε insensitive factor.This optimization problem can be transformed into a dual problem, and its solution is given by (13), where ai∗,ai are the Lagrange multipliers that can be acquired by solving the dual problem and Kxi,x is the Mercer kernel function that equals the inner product of ϕxi with ϕx.
(13)fx=∑i=1lai∗−aiKxi,x+b,s.t.0≤ai∗≤C,0≤ai≤C.The most frequently used Mercer kernel functions are instance sigmoid, polynomial, and radial basis function (RBF). RBF is a common choice for the kernel function because of the need to set very few parameters and excellent overall performance. So, RBF is selected as the kernel function in this paper.


## 2.4. Proposed Prediction Model

Suppose the sampled traffic flow data onD day holidays in consecutive M years can be written as the matrix XMN:
(14)XMN=xt11,xt11+Δt,xt11+2Δt⋯xt11+n−1Δt,⋯,xt1D,xt1D+Δt,xt1D+2Δt⋯xt1D+n−1Δtxt21,xt21+Δt,xt21+2Δt⋯xt21+n−1Δt,⋯,xt2D,xt2D+Δt,xt2D+2Δt⋯xt2D+n−1Δt⋮⋮⋮⋮⋮⋮⋮⋮xtM1,xtM1+Δt,xtM1+2Δt⋯xtM1+n−1Δt,⋯,xtMD,xt2D+Δt,xt2MD+2Δt⋯xtMD+n−1Δt,where Δt is the sample time interval, n is the data size in a day, and N=nD is the sample data length on D day holidays.According to (3), (4), and (5), the traffic flow data in consecutive M years are decomposed into the sum of the trend components and the residuals.
(15)XMN=X¯T+XR=XT1XT2⋮XTM+XR1XR2⋮XRM,where X¯T are the trend components in consecutive M years and XR are the residuals.The predicted traffic flow during the holidays inM+1 year is calculated directly by adding the trend with residual prediction results.
(16)X^M+1=f1X¯T+f2XR,where f1X¯T is the prediction result of the trend component with (9) and f2XR is the prediction result of the residual component with SVR.


## 3. Case Study

### 3.1. Data Description

Jiangsu is a highly developed province in China. In this paper, the data used to evaluate the performance of the proposed model are collected from the toll stations in Jiangsu province on Tomb-sweeping Day and National Day from 2011 to 2015. The length of the traffic flow data interval has an important influence on the prediction results. An excessively short time interval tends to lead to the instability of the prediction model, but an interval that is too long will lose the inherent characteristics of traffic flow data. As shown in Ma et al. [50], the prediction performance improves as the data aggregation level increases due to less data fluctuation as the time interval becomes longer. The prediction accuracy reaches its maximum when the aggregation level reaches one hour. Therefore, we selected one hour as the sampling time, which can also meet engineering management requirements. There are total of 1200 data points (50 days from 2011 to 2015) in the dataset. The data are divided into two data sets. The first 960 data points (40 days from 2011 to 2014) are used as the training sample, while the remaining 240 data points (10 days in 2015) are employed as the testing sample for measuring the prediction performance of the proposed model. The traffic flow on National Day from 2011 to 2014 is shown in Figure 2. From Figure 2, we can see that the trend of change of the traffic flow is basically consistent every year and the traffic flow value increases around 10% year by year. The traffic flow data are similar during the whole holiday in each year except for the first and end day of the holiday, which shows a sharply increased and decreased flow. The hourly distribution of traffic flow in each day has the same trend with a high value in the daytime and a low value at night. It shows remarkable similarity and strong periodic features, but it also reveals the stochastic properties. It is necessary to decompose the traffic flow data in order to reveal its potential characteristics.Figure 2
The traffic flow on National Day from 2011 to 2014.


### 3.2. Decomposition of Traffic Flow Time Series with DFT

The traffic flow data increases year by year in Figure2, but has similar patterns during the whole holiday from 2011 to 2014. It has been pointed out in literature that the prediction accuracy is greatly affected because of the existence of several trends, and the trends should be removed to improve the prediction performance. DFT is a powerful analytical method to extract the periodic component of the signal. This paper decomposes the traffic flow data into a trend and a residual component with DFT. The spectrum of the traffic flow on National Day in 2011 is shown in Figure 3, and three obvious components can be seen. The sampling period of the testing dataset is one hour, then n=24, the sample data length on D day holidays is N=nD. If the data length is the power of 2, we use DTF directly. Otherwise we will fill the data to make it a power of 2 by adding 0 in the end of the original traffic data, which will not change the frequency resolution and also conform to the calculation condition for DFT. From Figure 3, we can see that there are several peaks in the traffic flow spectrum and the intervals between the peaks are large enough to meet the frequency resolution requirements. The main purpose of DFT is to extract the trend components of traffic flow sequences. This indicates that we need to retain the low-frequency components and suppress high-frequency components. Through experiments, we can extract the trend components of traffic flow data effectively by keeping only the highest peak value component. However, the highest peak is not really an impulse function, so we must set a large threshold to suppress other frequency components. When the threshold alpha is set 0.7 times of the maximum frequency spectrum value, the trend components of the traffic flow sequences can be extracted efficiently according to (3) and (4). The trend components on National Day from 2011 to 2015 are shown in Figure 4. Compared to Figure 2, the law of trend components is more obvious year by year, so it becomes easier to predict the trend component in traffic flow. The traffic flow sequence minus the trend component and the residual series are obtained.Figure 3
The spectrum of traffic flow on National Day in 2011.Figure 4
The trend components on National Day from 2011 to 2014.


### 3.3. Preprocessing of the Residual Series

The residual series includes fluctuations and bursts, and it represents the stochastic component in the traffic flow, which is affected by the weather, traffic incidence, roadway conditions, and other factors. Especially, because of the presence of large bursts, the accuracy of traffic flow prediction is greatly affected. In order to improve the accuracy of the prediction, the residual series are preprocessed according to (10). The original traffic flow series, trend component, residual series, and preprocessed residual series on National Day in 2014 are shown in Figure 5.Figure 5
The original traffic flow series, trend component, residual series, and preprocessed residual series on National Day in 2014.


### 3.4. Prediction Results and Performance Comparison

#### 3.4.1. Measuring Performance of the Proposed Prediction Method

Several standard evaluation measurements are adopted in the experiments to evaluate the proposed method, including the mean absolute error (MAE), mean absolute percentage error (MAPE), and root mean square error (RMSE). Although these indicators are used to evaluate the prediction performance, each indicator has its emphasis on evaluation. In order to evaluate the performance of the proposed model accurately, we have adopted three indicators at the same time to represent the difference between the actual value and the predicted value.(17)MAE=1N∑i=1Nx^i−xi,MAPE=1N∑i=1Nx^i−xixi×100%,RMSE=1N∑i=1Nx^i−xi2,where x^i is the prediction value, xi is the actual observed value, and N is the length of the test series.


#### 3.4.2. Prediction Results

In this section, the traffic flows on Tomb-sweeping Day and National Day in 2015 are predicted with the proposed DFT and SVR model using the traffic flow data from 2011 to 2014. Figures6(a) and 6(b), respectively, exhibit the predicted and real traffic flow on Tomb-sweeping Day and National Day by 4 different models: DFT-SVR, ARIMA, SVR, and EMD-SVR. From this figure, it is apparent that the proposed DFT and SVR model has the best prediction performance, and the prediction value of the proposed method is identical to the real value during most of the hours, especially during the rush hours. The prediction results by ARIMA and EMD-SVR are worse than that of the proposed model. Because holidays are longer on National Day compared to Tomb-sweeping Day, the traffic flow is relatively smooth on National Day. However, Tomb-sweeping Day is a traditional holiday for tomb-sweeping, and traffic flow data during this holiday is very high with a more stochastic characteristic. The prediction accuracy is higher on National Day than on Tomb-sweeping Day in Figure 6.Figure 6
The prediction results by DFT-SVR, ARIMA, SVR, and EMD-SVR (a) on Tomb-sweeping Day and (b) on National Day.
(a)
(b)The prediction performances are shown on Tomb-sweeping Day and National Day in Tables1 and 2. It can be seen that the proposed DFT-SVR method has better prediction performance than ARIMA, SVR, and EMD-SVR on both Tomb-sweeping Day and National Day. All algorithms have better prediction accuracy on long holidays than on short holidays, and the average prediction accuracy is higher at 15.04% on National Day than on Tomb-sweeping Day. The prediction performance of the proposed DFT-SVR method improved at least by 3.69% on National Day, but it improved by at least 17.23% on Tomb-sweeping Day, indicating that the proposed method has more advantages for dealing with stochastic traffic flow data.Table 1
The prediction performance on Tomb-sweeping Day.
MAE
MAPE (%)
RMSE
ARIMA
63.8955
53.2863
0.7967
SVR
43.8453
29.3454
0.3801
EMD-SVR
50.9304
43.6135
0.5995
DFT-SVR
28.004
12.1147
0.3700Table 2
The prediction performance on National Day.
MAE
MAPE (%)
RMSE
ARIMA
37.0084
26.7927
0.4788
SVR
29.0494
13.3154
0.1496
EMD-SVR
32.9437
28.4532
0.4791
DFT-SVR
14.0734
9.6237
0.1386


## 3.1. Data Description

Jiangsu is a highly developed province in China. In this paper, the data used to evaluate the performance of the proposed model are collected from the toll stations in Jiangsu province on Tomb-sweeping Day and National Day from 2011 to 2015. The length of the traffic flow data interval has an important influence on the prediction results. An excessively short time interval tends to lead to the instability of the prediction model, but an interval that is too long will lose the inherent characteristics of traffic flow data. As shown in Ma et al. [50], the prediction performance improves as the data aggregation level increases due to less data fluctuation as the time interval becomes longer. The prediction accuracy reaches its maximum when the aggregation level reaches one hour. Therefore, we selected one hour as the sampling time, which can also meet engineering management requirements. There are total of 1200 data points (50 days from 2011 to 2015) in the dataset. The data are divided into two data sets. The first 960 data points (40 days from 2011 to 2014) are used as the training sample, while the remaining 240 data points (10 days in 2015) are employed as the testing sample for measuring the prediction performance of the proposed model. The traffic flow on National Day from 2011 to 2014 is shown in Figure 2. From Figure 2, we can see that the trend of change of the traffic flow is basically consistent every year and the traffic flow value increases around 10% year by year. The traffic flow data are similar during the whole holiday in each year except for the first and end day of the holiday, which shows a sharply increased and decreased flow. The hourly distribution of traffic flow in each day has the same trend with a high value in the daytime and a low value at night. It shows remarkable similarity and strong periodic features, but it also reveals the stochastic properties. It is necessary to decompose the traffic flow data in order to reveal its potential characteristics.Figure 2
The traffic flow on National Day from 2011 to 2014.


## 3.2. Decomposition of Traffic Flow Time Series with DFT

The traffic flow data increases year by year in Figure2, but has similar patterns during the whole holiday from 2011 to 2014. It has been pointed out in literature that the prediction accuracy is greatly affected because of the existence of several trends, and the trends should be removed to improve the prediction performance. DFT is a powerful analytical method to extract the periodic component of the signal. This paper decomposes the traffic flow data into a trend and a residual component with DFT. The spectrum of the traffic flow on National Day in 2011 is shown in Figure 3, and three obvious components can be seen. The sampling period of the testing dataset is one hour, then n=24, the sample data length on D day holidays is N=nD. If the data length is the power of 2, we use DTF directly. Otherwise we will fill the data to make it a power of 2 by adding 0 in the end of the original traffic data, which will not change the frequency resolution and also conform to the calculation condition for DFT. From Figure 3, we can see that there are several peaks in the traffic flow spectrum and the intervals between the peaks are large enough to meet the frequency resolution requirements. The main purpose of DFT is to extract the trend components of traffic flow sequences. This indicates that we need to retain the low-frequency components and suppress high-frequency components. Through experiments, we can extract the trend components of traffic flow data effectively by keeping only the highest peak value component. However, the highest peak is not really an impulse function, so we must set a large threshold to suppress other frequency components. When the threshold alpha is set 0.7 times of the maximum frequency spectrum value, the trend components of the traffic flow sequences can be extracted efficiently according to (3) and (4). The trend components on National Day from 2011 to 2015 are shown in Figure 4. Compared to Figure 2, the law of trend components is more obvious year by year, so it becomes easier to predict the trend component in traffic flow. The traffic flow sequence minus the trend component and the residual series are obtained.Figure 3
The spectrum of traffic flow on National Day in 2011.Figure 4
The trend components on National Day from 2011 to 2014.


## 3.3. Preprocessing of the Residual Series

The residual series includes fluctuations and bursts, and it represents the stochastic component in the traffic flow, which is affected by the weather, traffic incidence, roadway conditions, and other factors. Especially, because of the presence of large bursts, the accuracy of traffic flow prediction is greatly affected. In order to improve the accuracy of the prediction, the residual series are preprocessed according to (10). The original traffic flow series, trend component, residual series, and preprocessed residual series on National Day in 2014 are shown in Figure 5.Figure 5
The original traffic flow series, trend component, residual series, and preprocessed residual series on National Day in 2014.


## 3.4. Prediction Results and Performance Comparison

### 3.4.1. Measuring Performance of the Proposed Prediction Method

Several standard evaluation measurements are adopted in the experiments to evaluate the proposed method, including the mean absolute error (MAE), mean absolute percentage error (MAPE), and root mean square error (RMSE). Although these indicators are used to evaluate the prediction performance, each indicator has its emphasis on evaluation. In order to evaluate the performance of the proposed model accurately, we have adopted three indicators at the same time to represent the difference between the actual value and the predicted value.(17)MAE=1N∑i=1Nx^i−xi,MAPE=1N∑i=1Nx^i−xixi×100%,RMSE=1N∑i=1Nx^i−xi2,where x^i is the prediction value, xi is the actual observed value, and N is the length of the test series.


### 3.4.2. Prediction Results

In this section, the traffic flows on Tomb-sweeping Day and National Day in 2015 are predicted with the proposed DFT and SVR model using the traffic flow data from 2011 to 2014. Figures6(a) and 6(b), respectively, exhibit the predicted and real traffic flow on Tomb-sweeping Day and National Day by 4 different models: DFT-SVR, ARIMA, SVR, and EMD-SVR. From this figure, it is apparent that the proposed DFT and SVR model has the best prediction performance, and the prediction value of the proposed method is identical to the real value during most of the hours, especially during the rush hours. The prediction results by ARIMA and EMD-SVR are worse than that of the proposed model. Because holidays are longer on National Day compared to Tomb-sweeping Day, the traffic flow is relatively smooth on National Day. However, Tomb-sweeping Day is a traditional holiday for tomb-sweeping, and traffic flow data during this holiday is very high with a more stochastic characteristic. The prediction accuracy is higher on National Day than on Tomb-sweeping Day in Figure 6.Figure 6
The prediction results by DFT-SVR, ARIMA, SVR, and EMD-SVR (a) on Tomb-sweeping Day and (b) on National Day.
(a)
(b)The prediction performances are shown on Tomb-sweeping Day and National Day in Tables1 and 2. It can be seen that the proposed DFT-SVR method has better prediction performance than ARIMA, SVR, and EMD-SVR on both Tomb-sweeping Day and National Day. All algorithms have better prediction accuracy on long holidays than on short holidays, and the average prediction accuracy is higher at 15.04% on National Day than on Tomb-sweeping Day. The prediction performance of the proposed DFT-SVR method improved at least by 3.69% on National Day, but it improved by at least 17.23% on Tomb-sweeping Day, indicating that the proposed method has more advantages for dealing with stochastic traffic flow data.Table 1
The prediction performance on Tomb-sweeping Day.
MAE
MAPE (%)
RMSE
ARIMA
63.8955
53.2863
0.7967
SVR
43.8453
29.3454
0.3801
EMD-SVR
50.9304
43.6135
0.5995
DFT-SVR
28.004
12.1147
0.3700Table 2
The prediction performance on National Day.
MAE
MAPE (%)
RMSE
ARIMA
37.0084
26.7927
0.4788
SVR
29.0494
13.3154
0.1496
EMD-SVR
32.9437
28.4532
0.4791
DFT-SVR
14.0734
9.6237
0.1386


## 3.4.1. Measuring Performance of the Proposed Prediction Method

Several standard evaluation measurements are adopted in the experiments to evaluate the proposed method, including the mean absolute error (MAE), mean absolute percentage error (MAPE), and root mean square error (RMSE). Although these indicators are used to evaluate the prediction performance, each indicator has its emphasis on evaluation. In order to evaluate the performance of the proposed model accurately, we have adopted three indicators at the same time to represent the difference between the actual value and the predicted value.(17)MAE=1N∑i=1Nx^i−xi,MAPE=1N∑i=1Nx^i−xixi×100%,RMSE=1N∑i=1Nx^i−xi2,where x^i is the prediction value, xi is the actual observed value, and N is the length of the test series.


## 3.4.2. Prediction Results

In this section, the traffic flows on Tomb-sweeping Day and National Day in 2015 are predicted with the proposed DFT and SVR model using the traffic flow data from 2011 to 2014. Figures6(a) and 6(b), respectively, exhibit the predicted and real traffic flow on Tomb-sweeping Day and National Day by 4 different models: DFT-SVR, ARIMA, SVR, and EMD-SVR. From this figure, it is apparent that the proposed DFT and SVR model has the best prediction performance, and the prediction value of the proposed method is identical to the real value during most of the hours, especially during the rush hours. The prediction results by ARIMA and EMD-SVR are worse than that of the proposed model. Because holidays are longer on National Day compared to Tomb-sweeping Day, the traffic flow is relatively smooth on National Day. However, Tomb-sweeping Day is a traditional holiday for tomb-sweeping, and traffic flow data during this holiday is very high with a more stochastic characteristic. The prediction accuracy is higher on National Day than on Tomb-sweeping Day in Figure 6.Figure 6
The prediction results by DFT-SVR, ARIMA, SVR, and EMD-SVR (a) on Tomb-sweeping Day and (b) on National Day.
(a)
(b)The prediction performances are shown on Tomb-sweeping Day and National Day in Tables1 and 2. It can be seen that the proposed DFT-SVR method has better prediction performance than ARIMA, SVR, and EMD-SVR on both Tomb-sweeping Day and National Day. All algorithms have better prediction accuracy on long holidays than on short holidays, and the average prediction accuracy is higher at 15.04% on National Day than on Tomb-sweeping Day. The prediction performance of the proposed DFT-SVR method improved at least by 3.69% on National Day, but it improved by at least 17.23% on Tomb-sweeping Day, indicating that the proposed method has more advantages for dealing with stochastic traffic flow data.Table 1
The prediction performance on Tomb-sweeping Day.
MAE
MAPE (%)
RMSE
ARIMA
63.8955
53.2863
0.7967
SVR
43.8453
29.3454
0.3801
EMD-SVR
50.9304
43.6135
0.5995
DFT-SVR
28.004
12.1147
0.3700Table 2
The prediction performance on National Day.
MAE
MAPE (%)
RMSE
ARIMA
37.0084
26.7927
0.4788
SVR
29.0494
13.3154
0.1496
EMD-SVR
32.9437
28.4532
0.4791
DFT-SVR
14.0734
9.6237
0.1386


## 4. Conclusions

This paper presents a traffic flow prediction method for the holidays based on DFT and SVR. The trend components are extracted from holiday traffic flow data with DFT, and the trend can be predicted by extreme extrapolation with historical data. The residual component is further analyzed by a preprocessing method and SVR. The final prediction result is obtained by combining the trend with the residual prediction result. Real traffic data, collected from toll stations in Jiangsu province from 2011 to 2015, are used to evaluate prediction performances of the proposed DFT-SVR model. The test results show that the proposed DFT-SVR model has the best performance compared with ARIMA, SVR, and EMD-SVR, and prediction accuracy is higher on long holidays than on short holidays. Since the traffic flow data during the holidays is affected by weather and other factors, the impact of weather factors on traffic flow will also be further studied, so as to improve the prediction accuracy.



---

*Source: 6461450-2019-01-20.xml*