Abstract
Road traffic safety is essential, therefore in order to predict traffic fatalities effectively and promote the harmonious development of transportation, a traffic fatalities prediction model based on support vector machine is established in this paper. The selection of parameters greatly affects the prediction accuracy of support vector machine. Introducing particle swarm optimization can find the optimal parameters and improve the prediction accuracy of support vector machine by parameter optimization. However, standard particle swarm optimization is easy to trap into the local optimum, so that the best parameter solutions cannot be found. Therefore, the mutation operation of the genetic algorithm is introduced into particle swarm optimization, particle swarm with mutation optimization is generated. It expands the search space and makes parameter selection more accurate. This paper predicts fatalities of traffic accident using small samples and nonlinear data. The results show that compared with particle swarm with mutation optimization back propagation neural network prediction model, particle swarm optimization-support vector machine model, support vector machine, back propagation neural network, K Nearest Neighbor (K-NN), and Bayesian network, the prediction model of traffic fatalities based on particle swarm with mutation optimization-support vector machine has higher prediction precision and smaller errors. It is feasible and effective to use particle swarm with mutation optimization to optimize the parameters of support vector machine, and this model can predict the accident more accurately.
Keywords
Introduction
Background
In recent years, vehicle number and highway mileage are increasing along with the continuous improvement of road infrastructure construction of China. This has contributed to the economic development but also had some negative effects: frequent road traffic accidents. Among all kinds of traffic accidents, the harm of traffic fatality to social life is extremely serious; it is always threatening our personal safety and has become a serious social problem, which is worthy of our attention. However, traffic fatality has strong randomness. The randomness is affected by the factors such as driver and passenger characteristics, vehicle types, traffic conditions, and geometric design characteristics. However, the complex relationship between traffic fatalities and various influencing factors is nonlinear. As the various factors influence each other, it is difficult to use a single factor to explain traffic fatalities. Therefore, it is necessary to summarize and analyze the traffic safety data and find out the inherent laws of traffic fatality. It is of practical significance to forecast the development trend of traffic fatality under existing road traffic conditions, and it provides the basis for further formulating the road traffic safety plan or making the decision.
Literature review
At present, many methods used in traffic fatality prediction have different application conditions and modeling mechanisms. Binomial regression, Bayesian approach, back propagation neural network (BPNN) models, and some new methods are used to fit the accident data. Poch and Mannering 1 estimated a negative binomial regression of the accidents frequency at intersection approaches. Clarke et al. 2 created decision trees with the use of a machine learning method. It distinguishes between personal injury caused by the accident and damage in the general sense. Abdel-Aty and Haleem 3 explored to combine multivariate adaptive regression splines with another machine learning technique (random forest). Xu et al. 4 aimed to build the genetic programming model for real-time crash prediction on freeways and evaluated the application of the model. Ramani and Selvaraj 5 optimized the aggregated feature selection with voting algorithm. An optimal number of significant features with majority votes were selected. Other traffic accident prediction methods can be found in these literatures.6–11
Some studies have also proposed new models of traffic accident prediction. Yasdi 12 and Quek et al. 13 used artificial neural network (ANN) for traffic prediction and applied the model on the road. Xie et al. 14 evaluated the application of Bayesian neural network model in vehicle crash accident prediction. Kunt et al. 15 used 12 accident-related parameters in the genetic algorithm (GA), pattern search, and BPNN modeling methods. These models are used to predict the severity of the highway traffic accident. Deublein et al. 16 used an improved Bayesian network to assess the traffic risk accidents in Switzerland. The number of accidents involving personal injuries on Swiss roads was verified and the forecast tolerance was 25%. This shows the prediction model is effective and efficient, and it provides a theoretical basis for the road network planning and decision-making process. Kunt et al. 17 predicted the severity of freeway traffic accidents in Iran, Tehran in a GA, pattern search, and ANN modeling methods. The prediction model is established by the parameters, which includes the age and sex of the driver, the type of vehicle, the road speed ratio, and collision type. ANN, GA and the combination model of GA and PS are also used in traffic accident predictions. The prediction results of the three models are compared. Although the ANN can distinguish complex nonlinear system, other problems such as the slow convergence speed, overlearning, and local extreme value still exist. The existence of these problems has an impact on their prediction accuracy.
Support vector machine (SVM) has begun to be used in traffic accident prediction in recent years. SVM can be self-learning and optimized based on variable data.
18
Small sample, nonlinear, and local extreme problems can be solved by it. Li et al.
19
used the SVM model to predict motor vehicle collisions. The study results show that the SVM model is more accurate than the traditional negative binomial model in predicting collision data. Li et al.
20
developed a SVM model for predicting the severity of the injury caused by different accidents. They also compared the performance of the model and the ordered probability model. Yang and Zhao
21
introduce the accident rate per 10,000 cars and the accident rate per 10,000 people in the paper. The SVM model needs to be modified and improved. For example, the performance of the SVM depends on the parameters. Before the training phase, there are three parameters
Contributions
There are two main contributions in this paper: First, the traffic accident prediction model based on particle swarm with mutation optimization (PSOM)-SVM is proposed. PSO with mutation operation is introduced to find the optimal parameter combination of SVM. Since the introduction of mutation operation, the PSOM effectively enlarges the search range of optimal solution and avoids the local optimal situation. Traffic fatalities involving death are the most harmful traffic accident and have been highly valued. The statistics of traffic fatalities are more comprehensive, so this paper takes the traffic fatalities indicator as the most comparable indicator in traffic accident. Highway mileage, vehicle number, and population size are put into the model to get the number of traffic fatalities, which is the most comparable indicator in traffic accident; second, the performance of the PSOM-SVM, PSOM-BPNN, PSO-SVM, SVM, BPNN, K-NN, Bayesian network, and neural network prediction model is compared. The ability to fit and predict the model is evaluated by calculating the magnitude of error values.
The rest of the paper is organized as follows: the next section introduces the principle of SVM. The model and process of traffic accident prediction based on PSOM-SVM are described, respectively, in “The prediction model of traffic fatalities based on PSOM-SVM” and “The process of traffic fatalities prediction based on PSOM-SVM” sections; test results and error value comparison of different model are presented in “Numerical test” section; the conclusions and direction for future research are presented in the final section.
The principle of SVM
SVM is a supervised learning model based on VC dimension theory and structural risk minimization principle of statistical learning theory. This method is a learning method in small sample situation, and it is proposed by Vapnik 30 and has been fairly mature. SVM has a better generalization ability to solve machine learning problems in classification and induction. SVM has the advantage that it does not get trapped in a local optima.31,32 Moreover, SVM has the global optimal characteristics, these characteristics make SVM do not need to perform complex nonlinear optimization and not fall into local optima. When solving the nonlinear operation, the corresponding kernel function 33 is defined to greatly simplify the calculation, SVM maps the data in the nonlinear low-dimensional space into linear high-dimensional space, and transfers the search for the optimal linear regression hyperplane algorithm into solving convex programming problem under convex constraint, so as to get the global optimal solution.34,35
When the input training sample is nonlinear, the sample is fitted by the following method to obtain a nonlinear function. And then through this function the nonlinear data are mapped into the high-dimensional feature space, thus a linear regression of these data in the high-dimensional space is got, and then it can be transformed into the nonlinear regression of the original space. The following equation represents the fitting function
36
approximately
ω is for the weight vector; x is input vector; ɛ represents the offset value.
To minimize the following two values through training
c is the penalty factor; ɛ stands for loss function parameter, whose value affects the number of support vector.
Here introduces the slack variables
The final prediction function finished is as follows
The prediction model of traffic fatalities based on PSOM-SVM
To achieve a comprehensive assessment of traffic accidents, the choice of relevant indicators should follow the following three principles: representation, testability, and comparability. Traffic system consisted of three basic factors: people, vehicle, and road. The occurrence of traffic accidents has a strong randomness due to a variety of quantitative factors and qualitative factors. In the literature on traffic accident prediction, highway mileage, vehicle number, lane width, average daily flow, and population are selected as impact factors. 39 The combination of many factors including person, vehicle and road, highway mileage, vehicle number, population size, led to the occurrence of traffic accidents. Traffic fatality is the most serious consequences of traffic accidents, traffic accidents involving the death are highly valued, traffic statistics have few omissions. Therefore, as the output variable, the traffic fatality can be compared with the known real data for accuracy.
The current widely used indicators of traffic accidents are the number of traffic fatalities, the number of injuries, the number of road traffic accidents and economic losses. Because there is no uniform statement about the definition of injury, the road traffic accident statistics about road accidents has not been completed yet. The most comparable traffic accident deaths are selected as predictor index. Therefore, we get the traffic accident prediction model shown in Figure 1.
The structure diagram of traffic fatalities prediction model.
The process of traffic fatalities prediction based on PSOM-SVM
SVM is a theory of machine learning law in small sample situation; it has unique advantages in the small sample and nonlinear problems, especially in terms of prediction. However, in the learning process of SVM, the selection of parameters has a strong subjectivity, which seriously restrains the accuracy and effect of SVM prediction. The value of penalty factor c and kernel parameter σ affects the prediction accuracy of SVM, and finding the optimal c and σ is the priority. At present, these parameters are usually defined artificially based on the specific issues, and the optimal parameter combination is determined by choosing the parameters for many times and comparing with each other. Parameters that are manually set are blind and of low efficiency, so it is needed to adopt swarm intelligence optimization 40 algorithm to improve the parameter choosing of the SVM. At the same time, the design and implementation of PSO algorithm is relatively simple. Not only the convergence speed is fast, but the parameters required to be set are less. 37
PSO algorithm is a kind of population intelligence algorithm proposed on the basis of studying the behavior of birds and fish by Kennedy and Eberhart. 36 The idea comes from the theory of artificial life and evolutionary computation; it imitates the foraging behavior and achieves the optimal group through the bird collective collaboration.
Compared with the evolutionary computation, the PSO algorithm is a global search strategy, which uses the simple operation of the v–s model. PSO has unique memory mechanism, thus it can adjust the search strategy by keeping track of the current search based on real time, which makes PSO an efficient parallel search algorithm. Due to the parameter setting requirements of PSO algorithm, although PSO has fast convergence speed, it exists some limitations of stagnation. Therefore, to further expand the solution space and improve the prediction accuracy of SVM, the mutation operation of GA is introduced into PSO for predicting SVM parameters.
After the algorithm iteration is complete, the optimal result of the memory in the population is the optimal parameter.
Numerical test
Data
Dates of highway mileage, vehicle quantity, population quantity, and traffic fatality are collected from the website of National Bureau of Statistics of China, and the related data are shown in Appendix 1.
Collect the sample data from 1981 to 2012 as the experimental data. Samples of 1981–2006 are training data, while 2007–2012 are test data. In the process of training samples, parameters of PSO are set as follows: The population scale is of 20, the iteration number is N=200. The initial values of accelerating factor
Data normalization
Due to the large difference in data units and magnitude of different variables, different variables must be normalized. If the original data are used directly for the model calculation, it is likely to generate potential data, resulting in a large error. After normalizing, the data will fit well which improves the precision of prediction.
The normalization is done using the following equation
The training of the model
The result analysis is evaluated with two evaluation criteria, including mean absolute percentage error (MSE) and the coefficient of determination. The expression of these criteria is as follows
The model performance is better if the value of MAPE is smaller and R2 is larger.41–44 The traffic fatalities training curve based on SVM prediction model is shown in Figure 2. The black curve represents the actual output, while yellow one represents the predicted fitting output. From the picture we can see that the two curves fit well. The MSE is 3.79% and the measurement coefficient (R2) is 0.973. The results show that the forecasting model of traffic accident based on PSOM-SVM has strong identification ability, and the fitting is stable, the error is small.
Training diagram of SVM prediction model. SVM: support vector machine.
As seen in Figure 2, the blue curve represents the actual value, it links real traffic fatalities from 1981 to 2006 with a smooth curve, expressing the reality of traffic fatalities from 1981 to 2006. While the red curve represents the training curve, it predicts traffic fatalities between 1981 and 2006 through parameters by PSOM-SVM and represents the prediction results in the form of curve. As shown in Figure 2, the two curves are fitting well, so it is shown that the optimized SVM parameters in the training are accurate and can be used in tests.
The prediction of the model
Predict traffic accidents in 2007–2012 using the trained model. The absolute percentage error of traffic accident prediction is shown in Figure 3. The MSE is 3.63% and the measurement coefficient (R2) is 0.973.
Absolute percentage error of the traffic fatalities prediction.
Predict results comparison of PSOM-SVM, PSOM-BPNN, PSO-SVM, SVM, BPNN, K-NN, and Bayesian network.
APE: absolute Percentage Error; BPNN: back propagation neural network; K-NN K Nearest Neighbor; PSO: particle swarm optimization; PSOM: particle swarm with mutation optimization; SVM: support vector machine.

Predict results of different methods.
Conclusions
SVM model has the advantages of strong learning and good generalization ability when solving small sample problem. PSO is easy to fall into the local optimal, the introduced mutation operation can improve the defects above of PSO. PSOM model has less parameters, simple program and fast culate convergence. In this paper, the traffic fatalities prediction model based on PSOM-SVM (PSO with mutation operation) is established, and the parameters of SVM are optimized by this model. The results of example analysis show that the prediction method based on PSOM-SVM model is superior to the prediction method of neural network and BPNN method in terms of the same data, and it overcomes the problem of “overlearning” phenomenon in neural network training progress, avoids the local optimal solution, and has extremely good generalization ability. Therefore, the prediction model based on PSOM-SVM is better than the general forecasting model of traffic accident, and the prediction accuracy is better.
The traffic fatalities prediction using PSOM-SVM can reduce casualties to a certain extent. However, it is limited that only highway mileage, vehicle number, population size, and traffic fatalities are selected as parameters in the model, because the prediction model will produce some unknown factors that cannot be ignored. It will be better that the parameters are supplemented in future studies, and the impact factors are taken into account as much as possible in the prediction.
Footnotes
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This research was supported in National Natural Science Foundation of China 71571026 and 51578112, Liaoning Excellent Talents in University LR2015008, and the central universities DUT16YQ104.
