Research Article | Open Access
Qichun Bing, Dayi Qu, Xiufeng Chen, Fuquan Pan, Jinli Wei, "Short-Term Traffic Flow Forecasting Method Based on LSSVM Model Optimized by GA-PSO Hybrid Algorithm", Discrete Dynamics in Nature and Society, vol. 2018, Article ID 3093596, 10 pages, 2018. https://doi.org/10.1155/2018/3093596
Short-Term Traffic Flow Forecasting Method Based on LSSVM Model Optimized by GA-PSO Hybrid Algorithm
Short-term traffic flow forecasting is one of the key issues in the field of dynamic traffic control and management. Because of the uncertainty and nonlinearity, short-term traffic flow forecasting remains a challenging task. In order to improve the accuracy of short-term traffic flow forecasting, a short-term traffic flow forecasting method based on LSSVM model optimized by GA-PSO hybrid algorithm is put forward. Firstly, the LSSVM model is constructed with combined kernel function. Then the GA-PSO hybrid optimization algorithm is designed to optimize the kernel function parameters efficiently and effectively. Finally, case validation is carried out using inductive loop data collected from the north-south viaduct in Shanghai. The experimental results demonstrate that the proposed GA-PSO-LSSVM model is superior to comparative method.
Real-time and accurate traffic flow forecasting information can provide the theoretical and data supports for the advanced traffic management system (ATMS) and advanced traffic information service system (ATIS). Because of its importance in both theoretical and empirical aspects of ITS, short-term traffic flow forecasting has generated great interest among researchers. With the development of traffic surveillance systems, more and more real-time traffic data become available in every couple of minutes or seconds. The short-term traffic flow forecasting generally means that the observation period is less than 15 minutes. The traffic flow forecasting, especially the short-term traffic flow forecasting, has been recognized as a critical need for the intelligent transportation systems. In the past decades, numerous studies have been applied to the traffic flow forecasting by researchers. The forecasting methods in the literatures can be broadly divided into parametric methods and nonparametric methods . The parametric methods mainly include autoregressive integrated moving average (ARIMA) model [2–5], time series model [6–9], Kalman filtering model [10–13], parametric regressive model[14–16].This kind of method can get better forecasting effect if the traffic flow data varies temporally. However, these methods often assume a number of harsh conditions, such as the normality of residuals and a predefined model structure, which are seldom satisfied due to the stochastic and nonlinear characteristics of traffic flow. To overcome the limitations of parametric models, lots of researches have used nonparametric methods, such as nonparametric regressive model [17–19], spectral analysis model [20, 21], artificial neural networks (ANN) models [22–25], support vector machine (SVM) models [26–29], and so on. Particularly, the SVM model has great generalization ability and global minima for sample data, which has gained special attention in recent years. This paper is motivated to build the short-term traffic flow forecasting model based on SVM model due to its ability in dealing with the dynamic, nonlinear, and complex traffic flow time series.
Nevertheless, besides its advantages, there are some insufficiencies of the SVM based forecasting models. One is the choice of the kernel function. The traditional selection of kernel functions is single kernel function and generally dependents on experience. In view of this problem, we construct a combined kernel function to overcome the limitation of single kernel function. In addition, the parameters determination of SVM model remains a difficult yet important challenge. At present, the commonly used parameter optimization methods mainly include cross validation method  and grid search method . But these methods are easy to fall into local optimum and have large amount of calculation. In order to obtain rational parameters, intelligent optimization algorithms have been pursued by many researchers. Particle swarm optimization (PSO) and genetic algorithm (GA) are the most popular intelligent optimization algorithms. Genetic algorithm (GA)  is a heuristic scientific method based on Darwin’s biological evolutionism, which can search parallel from a population of points. Therefore, it has the ability to avoid being trapped in local optimal solution. Particle swarm optimization (PSO) [33, 34] is a swarm intelligent optimization algorithm, which is derived from the study of bird predation behavior. Compared with genetic algorithm, the PSO algorithm has a simpler structure because it has no selection, crossover, and mutation operation. However, because the PSO algorithm evolves by comparing its own position and the surrounding position and the current optimal position in the group particle, therefore the convergence speed of the PSO algorithm is slow in the later calculation stage and easy to fall into local optimum value. Comparatively speaking, because of crossover, mutation, and other evolutionary patterns, GA can improve the diversity of solution. But GA often leads to a large number of redundant iterations when calculated to a certain extent, which reduces the computational efficiency.
Taking into account the above reasons and with the goal of improving the accuracy of short-term traffic flow forecasting, we put forward a short-term traffic flow forecasting method based on LSSVM model optimized by GA-PSO hybrid algorithm. The remainder of this paper is structured as follows: in section “Modeling of LSSVM Model”, the principle of LSSVM model and the construction of combined kernel function are presented. In section “GA-PSO Hybrid Optimization Algorithm Design”, the process of GA-PSO hybrid optimization algorithm is described. In section “Experiment Setup and Case Study”, empirical analysis is carried out, and the forecasting results of different approaches are presented and discussed. In section “Discussion and Conclusions”, a brief review and future research are presented.
2. Modeling of LSSVM Model
2.1. The Principle of LSSVM Model
LSSVM is an improved algorithm based on SVM. By introducing the method of equality constraint and least square loss function, the optimization problem is changed into a linear equation, and the complexity of the algorithm is reduced by avoiding the two programming problem. Regression forecasting based on LSSVM can be described as follows.
Considering a given training data set . The relationship between and is usually nonlinear, so is mapped into high-dimensional feature space. The regression function of LSSVM is defined as subject to
where w is the weight vector, C is the penalty factor, is the approximation error, is the nonlinear mapping function, and b is the offset. To solve the optimization problem, the Lagrange function can be introduced as follows:
where is the Lagrange multiplier. According to the Karush-Kuhn-Tucker(KKT) conditions, the following formula can be obtained by partial derivatives with respect to , , , and .
By eliminating and , the equations can be written as
where , , , and is kernel matrix with . Considering , the expressions of and can be written as
Therefore, the regression model of LSSVM can be obtained as
where is the kernel function which satisfies Mercer condition.
2.2. The Construction of Combined Kernel Function
SVM model is built based on the principle of structural risk minimization, whose core idea is to introduce kernel functions. The SVM model with different kernel functions could have different learning and generalization ability. Therefore, how to select the appropriate kernel function is a major problem encountered in the field of short-term traffic flow forecasting.
At present, the commonly used kernel functions can be roughly divided into two categories, such as local kernel function and global kernel function. The Gaussian kernel function is typical local kernel function, which has strong learning ability and weak generalization ability. The polynomial kernel function is typical global kernel function, which has strong generalization ability and weak learning ability. Therefore, taking into account the advantages of Gaussian kernel function and polynomial kernel function, this paper will construct a new combination kernel function. The combination kernel function will not only have the local learning ability of Gauss kernel function but also has strong generalization ability of polynomial kernel function. The form of combination kernel function is as follows:
where is weight coefficient, , is the kernel width of Gaussian kernel function, and is the order of polynomial kernel function.
When approaches 0, the combined kernel function approximates the polynomial kernel function. Although it has good fitting ability to the sample data far away from the test point, the data fitting effect near the test point is poor. When approaches 1, the combined kernel function is close to the Gaussian kernel function, of which the global generalization ability is weak. In short, different kernel functions have different advantages, if the choice of weight coefficient is inappropriate, and the performance of combination kernel function may be lower than single kernel function. Therefore, proper weight coefficient is of great importance for the combined kernel function.
3. GA-PSO Hybrid Optimization Algorithm Design
The construction of the combined kernel function increases the parameters that need to be optimized. This paper designs a new GA-PSO hybrid optimization algorithm to obtain the optimal parameters of LSSVM model. The main idea of the GA-PSO hybrid optimization algorithm is as follows: first of all, the PSO algorithm is carried out, and the optimal M particles are retained. Then, pop_size-M individuals are obtained by copying operations based on the position value of the M particles, and the crossover and mutation operations of GA are carried out. Finally, the position value of M particles retained by PSO and the pop_size-M obtained by GA form a new particle population and perform the next generation of evolutionary computing. Figure 1 gives the GA-PSO hybrid optimization schematic.
The main differences between this new algorithm and the traditional hybrid algorithm are as follows: The combination of GA and PSO is hierarchical. Firstly, all individuals of the population perform PSO evolutionary operations, then the optimal M particles are selected to perform genetic evolution. Two-information transmission is completed during mixing process. The initial population of GA is generated by the optimal individuals in PSO; after genetic operation, the speed and position of all individuals are updated by PSO. The specific steps are as follows.
Step 1. Initialize the parameters: the number of particles pop_size, the number of particles retained after PSO evolution M, PSO weight factors c1 and c2, the crossover probability , the mutation probability , the maximum velocity of a particle V_max, the maximum evolutionary generations k_max, and the general evolutionary generations of hybrid algorithm max_gen.
Step 2. Generate the initial pop_size particles in the feasible domain and calculate the fitness function value. The fitness function is defined as the mean absolute percentage error of the fivefold validation method on the training data set.
Step 3. Set gen=1.
Step 5. Set k=1.
Step 7. Update the position and speed of the particles.
Step 8. If k=k+1, implement Step 6.
Step 9. The pop_size particles are sorted by the value of the fitness function, and the M particles with the least fitness value are selected.
Step 10. According to the position of the retained M particles, the pop_size-M GA individuals are generated by copying operations.
Step 11. Crossover and mutation operations are carried out with probabilities and .
Step 12. A new pop_size particle is formed by combining the pop_size-M individual with M particles.
Step 13. If gen=gen+1, implement Step 4.
Step 14. Output the optimal fitness function value and the parameters optimization results.
The process of GA-PSO hybrid optimization algorithm is shown in Figure 2.
4. Experiment Setup and Case Study
4.1. Data Description
An arterial segment of the north-south viaduct expressway from Gonghe Road interchange to Yanan East Road interchange in Shanghai, China, is selected as experimental section. The graph of the experimental area is shown in Figure 3, with four lanes for each direction. Figure 4 gives the layout of detectors for four lanes in one direction. The 10-kilometer long arterial has the commonality to represent the corridors in Shanghai, which ensures the model to be transferable to other areas. This segment includes 24 mainline detecting sections and 30 ramp detecting sections, equipped with 88 mainline loop detectors and 60 ramp loop detectors, respectively. The experimental data are collected on five consecutive Mondays from September 1st, 2008 to September 29th, 2008. The original time interval of collected data is 20s. Because the traffic flow data collected per 20s have large stochastic volatility, the original traffic flow data have been aggregated into five-minute intervals.
4.2. Data Analysis
The determination of input data has a direct impact on the short-term traffic flow forecasting. Traditional traffic flow forecasting methods mainly focus on the time correlation of traffic flow data and ignore the spatial correlation, which has some limitations. Through the analysis of a large number of traffic flow data, it found that there is a strong temporal and spatial correlation for traffic flow data. Figure 5 gives the traffic flow data of the same detector for five consecutive Monday. Figure 6 gives the traffic flow data of different detection sections in the same lane. Figure 7 gives the traffic flow data of different lanes at the same detection cross section. As we can see, traffic flow data has strong spatial and temporal correlation, and the spatiotemporal correlation characteristics provide effective data support for short-term traffic flow forecasting.
Through the above analysis (Figures 5, 6, and 7), this paper will make full use of the multimodal spatio-temporal correlation information to determine the input variables of the forecasting model. Taking detector NBDX16 as example, where NBDX denotes the main line of east side on the north-south viaduct expressway, 16 denotes the number of detection sections, denotes the number of the detection lane, and the input variables are shown in Table 1.
4.3. Comparison of GA-PSO Algorithm Performance
In order to compare the effect of parameter optimization, GA algorithm, PSO optimization algorithm, and traditional GA-PSO algorithm  are used for comparative analysis. The K-fold cross validation method is used to prevent overfitting and under-fitting. The training data set is randomly divided into K subset. The LSSVM model is built using subset as the training set. The performance of the parameters is checked on the subset. In this paper, fivefold cross validation method is used. The parameters of each optimization algorithm are shown in Table 2.
Figure 8 gives the convergence process of different algorithms. As we can see from Figure 8, the fitness curve of proposed GA-PSO hybrid optimization algorithm is obviously better than three other algorithms. The convergence speed of the proposed GA-PSO hybrid optimization algorithm is faster than the three other algorithms. The ideal effect is achieved basically around 20 iterations. In summary, the parameter optimization effect of proposed GA-PSO hybrid optimization algorithm is better than GA algorithm, PSO algorithm, and the traditional GA-PSO algorithm.
In order to further verify the superiority of the proposed algorithm, comparative analysis was carried out from the aspect of fitness value, the average convergence algebra, and the average computation time. The experimental environment is as follows: Computer processor is Intel(R) Core(TM) i5-2450M CPU 2.50GHZ. Memory capacity is 4GB. Operating system is Windows 7. Table 3 gives the comparison results of different algorithms.
4.4. Influence Analysis of the Number of Retained Particles
In the GA-PSO hybrid algorithm proposed in the third section, there is an important parameter M, which represents the size of the particles retained after the PSO optimization and also the original population of the GA genetic manipulation. In Section 4.3, we set up M=0.4×pop_size. In order to analyze the influence of M on the performance of the algorithm, M=r×pop_size is adopted, where r is set to 0.1,0.2,0.3, 0.4, 0.5, 0.6, 0.7, 0.8, and 0.9, respectively. The 20 random trials were carried out. The average convergence generations are compared. The contrast result is shown in Figure 9.
From Figure 9, it can be seen that the value of r has no significant influence on the average convergence algebra. With the increase of the value of r, the average convergence algebra is relatively stable.
4.5. Performance Evaluation Index
In order to evaluate the efficiency of the proposed approach, three different types of statistical indices are utilized to measure the forecasting accuracy. These indices are the mean absolute error (MAE), mean absolute percent error (MAPE), and equal coefficient (EC). The equations of these indices are as follows:
where denotes the actual value for the time interval, denotes the predicted value for the time interval, and is the total number of time intervals.
4.6. Model Performance and Analysis
In order to evaluate the forecasting performance of the proposed approach, the training dataset selects traffic data collected on April 28th, May 5th, May 12th, and May 19th, and the test dataset selects traffic data collected on May 26th. Figure 10 presents the forecasting results of east mainline detector NBDX16. Figure 11 presents the forecasting results of west mainline detector NBXX10. The green line stands for the forecasting results, and the blue line stands for the original traffic flow data.
As shown in Figures 10 and 11, the forecasting results by the proposed approach track closely to the actual data, which instructs that the proposed approach is able to predict short-term traffic flow data with small errors in most situations.
To further demonstrate the superiority of the proposed approach, the GA-LSSVM model and PSO-LSSVM model are compared using the same dataset. Figure 12 presents the forecasting results by each approach for east mainline detector NBDX11, and Figure 13 presents the forecasting results by each approach for west mainline detector NBXX15.
As shown in Figures 12 and 13, the GA-PSO-LSSVM model successfully captures the changing tendency of traffic flow data and has the best fitting performance comparing to the other approaches, which proves that the proposed approach could accurately forecast short-term traffic flow data and outperforms the other two approaches.
Table 4 presents the evaluation results of different methods. It can be found that the lowest forecasting errors are achieved by the proposed method. The proposed method has strong generalization ability because it could achieve good forecasting performance both on east mainline and on west mainline. Overall, the proposed approach works well for short-time traffic flow forecasting, which can achieve satisfactory forecasting results.
5. Discussion and Conclusions
In this paper, we propose a short-term traffic flow forecasting method based on LSSVM model optimized by GA-PSO hybrid algorithm. The main contribution of this paper is that we provide the new idea to the LSSVM model on how to build a combined kernel function for the short-term traffic flow forecasting model and how to optimize the kernel function parameters efficiently and effectively. Validation of the short-term traffic flow forecasting has been carried out using traffic flow data collected from the north-south viaduct expressway in Shanghai. The validation results indicate that the GA-PSO-LSSVM model has good potential to be developed and is suitable for short-term traffic flow forecasting.
Further improvement on the accuracy of short-term traffic flow forecasting could be made when more influence factors are considered, such as morning and evening peak, off-peak, adverse weather, and traffic accidents. In addition, traffic data collected at different time intervals are interested to be test in the model.
The urban expressway traffic data used to support the findings of this study are included within the article
Conflicts of Interest
The authors declare that there are no conflicts of interest regarding the publication of this paper.
This research has been jointly supported by the National Natural Science Foundation of China (Grant no. 51678320).
- Yuhan Jia, Jianping Wu, and Ming Xu, “Traffic Flow Prediction with Rainfall Impact Using a Deep Learning Method,” Journal of Advanced Transportation, vol. 2017, Article ID 6575947, 10 pages, 2017.
- M. Van der Voort, M. Dougherty, and S. Watson, “Combining Kohonen maps with ARIMA time series models to forecast traffic flow,” Transportation Research Part C: Emerging Technologies, vol. 4, no. 5, pp. 307–318, 1996.
- S. Lee and D. B. Fambro, “Application of subset autoregressive integrated moving average model for short-term freeway traffic volume forecasting,” Transportation Research Record, vol. 1678, pp. 179–188, 1999.
- B. M. Williams, “Multivariate vehicular traffic flow prediction: evaluation of ARIMAX modeling,” Transportation Research Record, no. 1776, pp. 194–200, 2001.
- B. M. Williams and L. A. Hoel, “Modeling and forecasting vehicular traffic flow as a seasonal ARIMA process: theoretical basis and empirical results,” Journal of Transportation Engineering, vol. 129, no. 6, pp. 664–672, 2003.
- S. Ishak and H. Al-Deek, “Performance evaluation of short-term time-series traffic prediction model,” Journal of Transportation Engineering, vol. 128, no. 6, pp. 490–498, 2002.
- J. Yeon, L. Elefteriadou, and S. Lawphongpanich, “Travel time estimation on a freeway using Discrete Time Markov Chains,” Transportation Research Part B: Methodological, vol. 42, no. 4, pp. 325–338, 2008.
- W. Min and L. Wynter, “Real-time road traffic prediction with spatio-temporal correlations,” Transportation Research Part C: Emerging Technologies, vol. 19, no. 4, pp. 606–616, 2011.
- Zhaosheng Yang, Qichun Bing, Ciyun Lin, Nan Yang, and Duo Mei, “Research on Short-Term Traffic Flow Prediction Method Based on Similarity Search of Time Series,” Mathematical Problems in Engineering, vol. 2014, Article ID 184632, 8 pages, 2014.
- I. Okutani and Y. J. Stephanedes, “Dynamic prediction of traffic volume through Kalman filtering theory,” Transportation Research Part B: Methodological, vol. 18, no. 1, pp. 1–11, 1984.
- Y. Wang and M. Papageorgiou, “Real-time freeway traffic state estimation based on extended Kalman filter: a general approach,” Transportation Research Part B: Methodological, vol. 39, no. 2, pp. 141–167, 2005.
- S. Jin, D.-H. Wang, C. Xu, and D.-F. Ma, “Short-term traffic safety forecasting using Gaussian mixture model and Kalman filter,” Journal of Zhejiang University SCIENCE A, vol. 14, no. 4, pp. 231–243, 2013.
- J. Guo, W. Huang, and B. M. Williams, “Adaptive Kalman filter approach for stochastic short-term traffic flow rate prediction and uncertainty quantification,” Transportation Research Part C: Emerging Technologies, vol. 43, pp. 50–64, 2014.
- H. Sun, H. Liu, H. Xiao, R. He, and B. Ran, “Use of Local Linear Regression Model for Short-Term Traffic Forecasting,” Transportation Research Record, vol. 1836, pp. 143–150, 2003.
- X. Zhang and J. A. Rice, “Short-term travel time prediction,” Transportation Research Part C: Emerging Technologies, vol. 11, no. 3-4, pp. 187–210, 2003.
- Y. Kamarianakis, H. Oliver Gao, and P. Prastacos, “Characterizing regimes in daily cycles of urban traffic using smooth-transition regressions,” Transportation Research Part C: Emerging Technologies, vol. 18, no. 5, pp. 821–840, 2010.
- G. A. Davis and N. L. Nihan, “Nonparametric regression and short-term freeway traffic forecasting,” Journal of Transportation Engineering, vol. 117, no. 2, pp. 178–188, 1991.
- B. L. Smith, B. M. Williams, and R. K. Oswald, “Comparison of parametric and nonparametric models for traffic flow forecasting,” Transportation Research Part C: Emerging Technologies, vol. 10, no. 4, pp. 303–321, 2002.
- S. Clark, “Traffic prediction using multivariate nonparametric regression,” Journal of Transportation Engineering, vol. 129, no. 2, pp. 161–168, 2003.
- H. Nicholson and C. D. Swann, “The prediction of traffic flow volumes based on spectral analysis,” Transportation Research, vol. 8, no. 6, pp. 533–538, 1974.
- Y. Zhang and A. Haghani, “A hybrid short-term traffic flow forecasting method based on spectral analysis and statistical volatility model,” Transportation Research Part C: Emerging Technologies, vol. 43, no. 1, pp. 65–78, 2013.
- S. Ishak, P. Kotha, and C. Alecsandru, “Optimization of Dynamic Neural Network Performance for Short-Term Traffic Prediction,” Transportation Research Record, no. 1836, pp. 45–56, 2003.
- E. I. Vlahogianni, M. G. Karlaftis, and J. C. Golias, “Optimized and meta-optimized neural networks for short-term traffic flow prediction: a genetic approach,” Transportation Research Part C: Emerging Technologies, vol. 13, no. 3, pp. 211–234, 2005.
- X. Jiang and H. Adeli, “Dynamic wavelet neural network model for traffic flow forecasting,” Journal of Transportation Engineering, vol. 131, no. 10, pp. 771–779, 2005.
- J. Z. Zhu, J. X. Cao, and Y. Zhu, “Traffic volume forecasting based on radial basis function neural network with the consideration of traffic flows at the adjacent intersections,” Transportation Research Part C: Emerging Technologies, vol. 47, no. 2, pp. 139–154, 2014.
- C.-H. Wu, J.-M. Ho, and D. T. Lee, “Travel-time prediction with support vector regression,” IEEE Transactions on Intelligent Transportation Systems, vol. 5, no. 4, pp. 276–281, 2004.
- Y. Zhang and Y. Xie, “Forecasting of short-term freeway volume with v-support vector machines,” Transportation Research Record, vol. 2024, no. 1, pp. 92–99, 2007.
- G. Fu, G. Q. Han, and F. Lu, “Short-term traffic flow forecasting model based on support vector machine regression,” Journal of South China University of Technology (Natural Science Edition), vol. 41, no. 9, pp. 71–76, 2013.
- J. Wang and Q. Shi, “Short-term traffic speed forecasting hybrid model based on chaos–wavelet analysis-support vector machine theory,” Transportation Research Part C: Emerging Technologies, vol. 27, no. 1, pp. 219–232, 2013.
- Y. L. Zhang and Y. H. Yang, “Cross-validation for selecting a model selection procedure,” Journal of Econometrics, vol. 187, no. 1, pp. 95–112, 2015.
- X. Liu, D. Jia, and H. Li, “Research on kernel parameter optimization of support machine in speaker recognition,” in Science Technology and Engineering, vol. 10, pp. 1669–1673, 2010.
- J. H. Holland, Adaptation in Natural and Artificial Systems: An Introductory Analysis with Applications to Biology, Control, and Artificial Intelligence, University of Michigan Press, Oxford, UK, 1975.
- J. Kennedy and R. Eberhart, “Particle swarm optimization,” in Proceedings of the IEEE International Conference on Neural Networks, pp. 1942–1948, Perth, Australia, December 1995.
- R. C. Eberhart and J. Kennedy, “A new optimizer using particle swarm theory,” in Proceedings of the 6th International Symposium on Micromachine and Human Science, pp. 39–43, Nagoya, Japan, October 1995.
- Y.-T. Kao and E. Zahara, “A hybrid genetic algorithm and particle swarm optimization for multimodal functions,” Applied Soft Computing, vol. 8, no. 2, pp. 849–857, 2008.
Copyright © 2018 Qichun Bing et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.