Next Article in Journal
Unleashing the Moderating Influence of Firms’ Life Cycle Stages and National Income on Capital Structure Targeting Behavior: A Roadmap towards Sustainable Development
Previous Article in Journal
Valuing in the Agrifood System: The Case of Fresh Grain Legumes in Denmark
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Predicting Traffic Casualties Using Support Vector Machines with Heuristic Algorithms: A Study Based on Collision Data of Urban Roads

School of Safety Science and Emergency Management, Wuhan University of Technology, Wuhan 430079, China
*
Author to whom correspondence should be addressed.
Sustainability 2023, 15(4), 2944; https://doi.org/10.3390/su15042944
Submission received: 17 December 2022 / Revised: 24 January 2023 / Accepted: 1 February 2023 / Published: 6 February 2023

Abstract

:
Traffic accidents on urban roads are a major cause of death despite the development of traffic safety measures. However, the prediction of casualties in urban road traffic accidents has not been deeply explored in previous research. Effective forecasting methods for the casualties of traffic accidents can improve the manner of traffic accident warnings, further avoiding unnecessary loss. This paper provides a practicable model for traffic forecast problems, in which ten variables, including time characteristics, weather factors, accident types, collision characteristics, and road environment conditions, were selected as independent factors. A mixed-support vector machine (SVM) with a genetic algorithm (GA), sparrow search algorithm (SSA), grey wolf optimizer algorithm (GWO) and particle swarm optimization algorithm (PSO) separately are proposed to predict the casualties of collisions. Grounded on 4285 valid urban road traffic collisions, the computing results show that the SSA-SVM performs effectively in the casualties forecast compared with the GWO-SVM, GA-SVM and PSO-SVM.

1. Introduction

The gross highway mileage and road density in China have reached 5,280,700 km2 and 55.01 km/100 km2, respectively, and the road construction is still growing rapidly [1]. However, the frequent occurrence of urban traffic accidents has gradually occupied a dominant position in the significant factors limiting the stable development of a city. Facing the increasing number of cars and traffic accidents, we need to speed up the construction of road safety analysis and the road risk prediction system [2]. According to the Global Status of Road Safety reported by the World Health Organization (WHO), the number of people whose lives were cut short due to traffic accidents reaches 1.35 million every year. Pedestrians, bicyclists and electric vehicles account for half of all the deaths in traffic accidents. Therefore, we urgently need to develop solutions aimed at protecting these people [3]. There are about 20 to 50 million people yearly who suffer nonlethal damage on average. Some people unfortunately are disabled due to their injuries. Road traffic accidents cost most countries 3% of their GDP [4]. Worse still, the casualties of a major accident are more serious, and the consequences are greater [5,6]. The severity of urban collisions is regularly neglected compared to other roads [7]. Traffic collisions not only aggravate traffic congestion but may also cause secondary accidents, further increasing traffic congestion and the degree of casualties. Preventing the occurrence of urban collisions and reducing the severity of urban collisions is important to ensure the safe and effective operation of cities. Dealing with urban traffic accidents is an indispensable part of urban operation and a significant assignment of the transportation administrative departments and is an indispensable part of urban operation. An effective forecast model for traffic accidents can boost the operating capability of the transportation administrative departments [8].

1.1. Literature Review

There are many models used to search and identify the element of risk related to the casualties of road traffic accidents, including regression (the ordered probit model, the mixed logit model, etc.) [9,10,11,12,13,14,15,16,17], hierarchical linear modeling [18], quantitative risk assessment [19], latent class clustering analysis [20], partial least squares path model [21], random parameter logit model [22], etc. However, most statistical models have assumed the basic relationship between independent variables and dependent variables [22,23], while machine learning does not require any assumptions about the basic relationship between variables [24]. Some researchers have explored salient features that may affect the severity of automobile accidents [25,26] and have applied machine learning to the prediction and control of intelligent transportation systems (ITS) in previous research. Faruk Serin et al. took bus arrival information as a dataset and adopt a three-layer machine learning architecture which proposed hybrid time series prediction methods, realized the method of learning from mistakes and achieved better results than the traditional single-layer method [27]. Vasilios Plakandaras et al. used Support Vector Regression (SVC) to forecast aviation, road and train transport demand in the United States domestic market from the aspect of econometrics [28]. Yuhan Guo et al. forecasted the traffic demand to guide the online taxi hailing platform to send taxis in advance to areas that may generate orders based on Support Vector Regression (SVR), Random Forest Regression (RFR) and k Nearest Neighbours Regression (kNNR) [29]. Brij Bhooshan Gupta et al. used lightweight and graph-based cryptography to solve authentication and security issues in ITS. Six models including SVM, Logistic Regression, Decision Trees, Random Forest, Gradient Boosting and Multinomial Naive Bayes were introduced to optimize the model [30]. Raed Abdullah Hasan et al. collected the data of physical activities ignored in prior studies as a new feature and used four machine learning methods for prediction (Random Forest, Extreme Gradient Boosting, Artificial Neural Network and Support Vector Machine) and developed predictive modes of transportation through the smartphone and smartwatch data and the machine learning techniques [31]. Joe Diether Cabelin et al. implemented a co-simulation intrusion detection system between MATLAB and NS-3 that identifies false data injection attacks on a vehicular network. They installed an intrusion detection system in an individual vehicle. This system, whose framework is based on the SVM, can processes the information obtained from the packets sent by other vehicles and classify information into trusted or malicious categories [30]. Mapping low-dimensional nonlinear data to high-dimensional spatial data by nonlinear transformation, the nonlinear support vector machine achieved great performance in the majority of the previous studies. To date, an increasing number of SVMs are optimized by nature-inspired metaheuristic methods to solve classification and prediction problems in engineering [32]. Yusen Liu et al. proposed the GWO-SVM to predict the hitch of internal resistance and contact resistance of lead-acid batteries. The experiment shows that the proposed GWO-SVM is more stable and accurate than other diagnostic models when diagnosing the faults of series battery packs [33]. Yanshu Li constructed a fault diagnosis system based on the GA-SVM algorithm. The genetic algorithm upgrades the parameter search of the SVM and boosts the running speed of the classification [34]. Ran Li et al. adopted particle swarm algorithm to optimize the kernel function of the support vector machine to jointly estimate the charging state and health state of batteries [35]. Tuerxun et al. proposed an SSA-SVM to diagnose the hitch of wind turbine via the data obtained from data acquisition and monitoring control systems [36]. In previous studies, support vector machines are optimized by adding parameter terms or other limitations to functions. However, there are two parameters of SVM: C and γ. C is the penalty factor depending upon the soft margin. The higher the value of C is, then the more likely it is to lead to over-fitting, while the lower the value of C is, then more likely it is to lead to under-fitting. The parameter γ represents the ability of mapping the height of low-dimensional data. The classification ability of SVM is often affected by random by the parameters C and γ. If the wrong parameters are selected, then the classification effect of SVM is often poor.

1.2. Related Work

To overcome the limitations of the SVM due to the random values of the C and γ parameters to make accurate predictions, in this research four kinds of optimized support vector machines approaches are proposed to predict the traffic casualties for the first time, which include GA-SVM, GWO-SVM, PSO-SVM and SSA-SVM. The rest of this paper is briefly described as follows. In Section 2, the data collected from the Wuhan Traffic Management Bureau are represented. In Section 3, the SVM method and four heuristic algorithms are introduced. In Section 4, the merits and drawbacks of the four models through eight performance indicators are analyzed. Finally, Section 5 presents the main experimental conclusions.

2. Data

There is no authoritative traffic accident database in China. We collected road traffic accident data from the accident management database of the Wuhan Transportation Authority, which contained more than 5000 pieces of data. This traffic accident dataset is administrative data, and its primary function is to collect information on traffic accidents. These data are official and authoritative. Before the experiment, we eliminated the data that do not meet the requirements. Huang and Wang recommended using fewer features in the previous research [37], so the final dataset consists of ten attributes. In order to ensure the availability of the obtained data samples and the reliability of the results, the original dataset was reviewed in terms of integrity and accuracy. The integrity audit is to check whether anything from the dataset is missing. In the original dataset used in this paper, there are five data points missing. The accuracy of the dataset is judged from three aspects: whether the data conform to objectivity, whether the data conform to reality, and whether the content is accurate. Finally, we conduct data cleaning according to the review results. The data-cleaning criteria were as follows: firstly, selecting variables that have significant implications based on correlation analysis and the collision dataset. Then, records with missing data of these variables were excluded. The final total amount of data points consisted of 4825 items. Attributes including Week, Period, Weather, Road Conditions, Alarm Categories, Active Hit (the transportation which actively crashed), Passive Hit (the transportation which was crashed into), Collision Type, Road Section and Road Type were selected as independent factors. The variables are shown in Table 1. Time is divided into eight periods: Late night (00:00–03:00), Dawn (03:00–06:00), Morning (06:00–9:00), Forenoon (9:00–12:00), Noon (12:00–15:00), Afternoon (15:00–18:00), Evening (18:00–21:00), Night (21:00–24:00). The Alarm Categories contain Vehicle (collision between motor vehicles), Vehicle-Non (collision between motor vehicles and non-motor vehicles), Unilateral (unilateral traffic accident), Vehicle-pedestrian (collision between vehicle and pedestrian), Non-Pedestrian (collision between non-motor vehicle and pedestrian), Vehicle-Animal (collision between vehicle and animals), Both-Non (collision between non-motor vehicle and non-motor vehicle), Damage Property (damage to public and private property), Other (other Alarm Categories). Active Hit is the transportation of active impact; Passive Hit is the transportation of passive impact. People identified as a Grade II minor injury by the Chinese Judiciary are defined as the casualties in the experiment. “Probability of Casualties” means the proportion of casualties in the total. The top 10 attributes of casualties-causing rate are shown in Figure 1.

3. Methodology

The classification of datasets is actually a two-classification problem. There are several models have been proposed to deal with two-classification problems. As we discussed earlier, SVM have achieved better performance in the field of transportation. The heuristic algorithm is one of the most important methods to optimize SVM.

3.1. Support Vector Machine

Vapnik proposed a nonlinear SVM with soft margins which successfully solve handwritten character recognition in 1995. SVM has already infiltrated various fields of pattern recognition, including human facial image recognition and text classification [38,39]. The mathematical thought of SVM is mapping low-dimensional nonlinear data to high-dimensional spatial data by nonlinear transformation and searching for the optimal hyperplane in high-dimensional space to make data linearly separable. The great performance of SVM is attributed to several outstanding features, including exceptional generalization function, effective avoidance of underfitting and overfitting and low requirements for input dimensions [40]. The optimal hyperplane can be described by the linear equation ω T x + b = 0 , which can be produced by nonlinear mapping. Correct classification of data means the maximum classification margin is searched. For a linear-divisible sample set, the problem of searching the linear separating hyperplane is converted into the objective function and restraint conditions as shown in Equation (1):
{ min     1 2 ω 2 y i ( ω T x i + b ) 1
ω—weighted vector. It is orthogonal to the hyperplane;   x i —sample set. The premise of the dataset is that it can be linearly separable;   y i —unique classification of x i . It is classified into positive and negative categories (+1 and −1); b—offset vector. It determines the deviation of the decision surface from the origin.
In the real world, the hyperplane cannot completely divide the heterogeneous sample. So an additional slack variable ξ i ( ξ i > 0) is put forward to readjust the classification hyperplane, and a penalty factor C is introduced to weight the penalty degree of the slack variable ξ i . This is what we mentioned above as the soft margin SVM as shown in Equation (2).
{ min   1 2 ω 2 + C i = 1 n ξ i y i ( ω T x i + b ) 1 ξ i a C 0 ξ i 0 ; i = 1 , 2 , n
The above formula is a convex quadratic programming problem. By introduced the Lagrange multiplier α, we obtain the dual problem of the above Equation (2). According to the Karush–Kuhn–Tucker conditions (KKT), the goal of searching the linear separating hyperplane is converted into solving the dual quadratic programming problem.
{ max   Q ( α ) = 1 2 i = 1 n j = 1 n α i α j y i y j ( x i x j ) + i = 1 n α i 0 α i C i   i = 1 , 2 ,   , n i = 1 n α i y i = 0
Solving Equation (4), we obtained the optimal classification decision function:
f ( x ) = sgn { i = 1 n α i y i ( x i x j ) + b }
For the nonlinear classification problem, the dataset that was originally linearly indivisible in the low-dimensional space becomes linearly separable after being mapped to the high-dimensional space through the kernel function. An inappropriate kernel function means that the sample is mapped from a high dimension to an unsuitable low-dimensional space, so the selection of kernel function is crucial to the performance of SVM. In this research, we used the Gaussian Radial Basis Kernel Function (RBF), which has demonstrated that the classification obtained the satisfactory performance in previous research. g is Gaussian RMS width, which determines the width of the Gaussian figure.
RBF kernel and optimal classification function with RBF kernel are expressed as:
K ( x i , x j ) = exp ( x i x j 2 2 g 2 )
f ( x ) = sgn { i = 1 n α i y i K ( x i , x j ) + b }

3.2. SVM Optimized by Multiple Heuristic Algorithms

As mentioned above, the penalty factor C and kernel function parameter γ are randomly given. It easily makes the classification performance terrible. Many researchers have conducted a considerable number of swarm intelligence optimization algorithms to optimize the accuracy of SVM parameters, and the research has demonstrated that using the nature-inspired algorithms to optimize the SVM has excellent results in different fields. C and γ are exactly two parameters optimized in heuristic algorithms. In this article, set penalty factor C and kernel function parameter γ as the location information of each generation and four well-known meta-heuristic optimization algorithms were employed to optimize SVM. The optimization flow chart of SVM is summarized in Figure 2. The algorithms have different mathematical thoughts and different parameters which will affect the final result. This experiment refers to the basic parameter settings of other dissertations [41,42,43,44]. The four kinds of improved SVMs and their respective parameters are presented in Table 2, Table 3, Table 4 and Table 5:
(i)
GA
Inspired by the biological natural selection and genetic mechanism, John Holland proposed the genetic algorithm in 1975 [45,46,47,48]. The GA starts with a set of randomly generated locations. In each iteration, a new generation is created by genetic variations, such as crossover and mutation, to produce excellent individuals by mating with the dominant population. Evolution is carried out in genotype iteration, and the best phenotype is selected in the environment according to the corresponding solution to solve the problem. The basic parameter setting in this algorithm is as follows:
Table 2. Parameters setting of GA.
Table 2. Parameters setting of GA.
Maximum evolutionary quantity100
Maximum population size20
Crossover probability0.4
Mutation probability0.01
(ii)
SSA
Drawing on the idea of sparrows’ seeking food and avoiding natural enemies, Xue proposed a new nature-inspired heuristic algorithm-SSA in 2020 [49,50,51]. The algorithm focuses on the sparrows’ behaviors of foraging and defense. There are two types of sparrows in the population: seekers and scroungers. Seekers’ responsibility is searching foraging areas and directions, while scroungers adopt former information to obtain food. The identities of the seekers and scroungers are transformed in a constant proportion. To avoid predators, there are some scrounger monitors called guards who observe the surroundings in the process of foraging. Once they send a warning signal, the population needs to escape immediately and move to another safe place for food [52]. The basic parameter setting in this algorithm is as follow:
Table 3. Parameters setting of SSA.
Table 3. Parameters setting of SSA.
Warning value of sparrow0.8
Search dimension2
Maximum population size20
Maximum evolutionary quantity100
(iii)
GWO
By analyzing and summarizing the population mechanism of wolves, Mirjalili S proposed the grey wolf optimizer algorithm in 2013 [53,54,55]. Similar to other nature-inspired heuristic algorithms, the GWO also starts with a set of randomly generated locations. The optimization model is mainly divided into two parts: social hierarchy and hunting. There are the three wisest wolves in a population named α, β and δ, who guide other wolves in searching for their prey. The three leaders will continue to be eliminated and elected and constantly lead the whole wolf pack to find the best predation site. The remaining wolves (candidate solutions) are defined as ω; they surround α, β or δ to update the location [56]. The basic parameter setting in this algorithm is as follows:
Table 4. Parameters setting of GWO.
Table 4. Parameters setting of GWO.
Value seeking range of wolf2
Maximum evolutionary quantity100
Warning value of sparrow20
(iv)
PSO
It was proposed by Eberhart and Kennedy in 1995 [56,57]. In PSO, the process of searching for the optimal solution from a set of initial solutions is similar to the process of birds constantly adjusting their direction of foraging. The particles search for the optimal position through their own flight experience and group cooperation; that is, they update themselves by two pieces of extremum information [58,59]. The first is the best location that the individual particle has experienced. The other is that the best location experienced by the whole group is called the global extreme value. The basic parameter setting in this algorithm is as follows:
Table 5. Parameters setting of PSO.
Table 5. Parameters setting of PSO.
Search dimension2
Local search ability1.5
Global search ability1.7
Maximum evolutionary quantity100
Maximum population size20

4. Experimental Result

Grid Search is a method of tuning parameters and is actually brute-force search. It searches the best parameters in all the candidate parameters. This means gradually tuning the parameters and iterating through the loop to find the most accurate validation set from all parameters by exhaustive search. The principle of the Grid Search is similar to finding the maximum value in the array [60,61]. As shown in Figure 3, we can obtain the C-γ Heat map through grid search. According to the C-γ Heat map, we set the lower bound for C and γ of four heuristic algorithms as 1.0 and 1e-5 and the upper bound for C and γ of four heuristic algorithms as 10,000 and 1. It will make the optimizer converge faster. The iteration was consistently set as 100 times. The cross validation (CV) can effectively avoid the occurrence of overfitting and underfitting and obtain a more ideal accuracy rate for the prediction of the test set. To achieve the accurate forecasting effect, five-fold cross validation is exploited in the mixed-SVM. The final optimal and corresponding optimal parameters are shown in Table 6.
As we have already remarked, the fitness is determined by the accuracy rate during testing and shows the adjustment of the parameters C and γ. By drawing the fitness curve, we can intuitively observe the differences between the four models and analyze the merits and faults of each model. The fitness curves of GA-SVM, SSA-SVM, GWO-SVM and PSO-SVM are presented in Figure 4, Figure 5, Figure 6 and Figure 7. The fitness curve takes the iteration number as its abscissa, and the ordinate is the fitness. The red line represents the optimal fitness in every generation. With each iteration, the optimal fitness will ceaselessly improve until the optimal conditions are met or the maximum number of iterations is reached. The blue line represents the average fitness in every generation. The average fitness is only related to the current population of each generation, so the curve is not monotonous. We can judge the stability of this model by observing the fluctuation degree of the curve. The optimized running times of GA-SVM, SSA-SVM, GWO-SVM and PSO-SVM are 7.2274 s, 5.5619 s, 6.6663 s and 6.7738 s, respectively. From the optimization results, we can see that the final fitting effects of the four models are consistently efficient after ten runs, but they have different characteristics in the specific iteration process. For the GA-SVM, with the increase in the optimal fitting degree, the average fitting degree also increases. After 30 generations, the optimal fitting degree and average fitting degree tend to be stable, which shows that the GA-SVM has great stability and great convergence speed. For the SSA-SVM, the model obtains a stable optimal value after four visible fitting updates. The optimal fitness reaches 81.84% and is slightly superior to GA-SVM. However, in the iterative process, the average fitting degree performs unstably and frequently fluctuates, and there is no sign of convergence in the end within 100 generations. It manifests that the SSA-SVM is skilled in searching the optimal value but unstable. For the GWO-SVM, the random initial fitness is embarrassed, but it quickly identified the optimal value after six iterations. The average fitness starts to converge after 35 generations and finally reaches 82.17%. For PSO-SVM, after four generations of relatively visible fitness updates, the PSO-SVM began to converge in the 60th generation and achieved the best fitness reaching 84.6%. However, the average fitness does not converge within 100 generations and fluctuated throughout the whole iteration process.
The performance metrics of the SVM in this part is based on the precision rate under test (PRE), the recall rate under test (REC), the F1 score under test (F1), the accuracy rate under test (ACC) and the mean square error (MSE). REC is the proportion of true positive (TP) samples to the correct prediction classification of the model. However, more often than not the proportion of true positive samples to the sample was predicted to be true by the model. PRE represents the prediction accuracy in the positive sample results. The two restrict each other and are incompatible. Therefore, to evaluate a classifier more comprehensively, F1 alleviates the contradiction between REC and PRE. The higher the F1, the higher the classifier quality. Accuracy is the ratio of the number of samples correctly classified by the classifier to the total number of samples. MSE is the weighted mean of the sum of squares of the distances that predicted value deviates from the real value. The five performance metrics are shown in Formulas (7–10). It can be seen from the Figure 8 that the four heuristic algorithms except PRE have improved better than the original SVM, and all indicators are not lower than 80%. Although the PRE of SVM is great, F1 and REC both have poor performance, which is repeated in experiments; SSA-SVM finally achieved the best comprehensive effect; ACC, F1, PRE and REC were better than the other three. The PRE of PSO-SVM has achieved great results, ranking second among the four heuristic algorithms. Generally, scores of GA-SVM and GWO-SVM are close, indicating that the two models have replaceable effects in the application of this study. Combined with the abovementioned classification performance, the SSA-SVM is better than the others.
P R E = T P T P + F P
R E C = T P T P + F N
A C C ˙ = T P + T N T P + T N + F P + F N
M S E ( θ ^ ) = E ( θ ^ θ ) 2
The PRE-REC curve shows the tradeoff between PRE and REC at different thresholds. The X-axis represents the REC; the Y-axis represents the PRE. The large area under the curve indicates the integration of high recall and high precision. We take it as the basis for comprehensive scoring of the comparison model. High scores for both show that the classifier is returning accurate results, as well as returning a majority of all positive results. The results of Figure 9 show that the area under the curve of four optimization algorithms is better than the original SVM and is no less than 80%. The area of SSA-SVM is the largest, reaching 85.64%, indicating that a more stable effect is achieved between PRE and REC, and the robustness will be stronger. The PRE-REC curves of the SSA-SVM, GA–SVM and the PSO–SVM are similar, but they have achieved better results than the GWO-SVM.
The Receiver Operating Characteristic (ROC) curve reflecting the relationship between sensitivity and specificity is the preferred statistical method for an evaluation model in machine learning. The abscissa of the plane is false positive rate (FPR), and the ordinate is true positive rate (TPR). The larger the TPR, the more likely it is to be correct, while FPR is inversely correlated with TPR. The quantitative performance of the ROC curve can be obtained by the area under the curve (AUC). The larger the AUC, the better the classification effect of the model, but it also has a higher risk of over fitting. The best threshold can be obtained from the upper left corner of the graph, and the model has the best comprehensive performance. ROC curves of the four mixed-SVM proposed above is shown in Figure 10.
T P R = T P T P + F N
F P R = F P T N + F P
The curves of the four optimization models have little difference and cross, but they all have a large area, exceeding 0.88, which is better than the 0.7324 of the original SVM. It turns out that the four optimization models have both high prediction accuracy and great stability. Optimizers are demonstrated with great robustness and high authenticity of the detection method.

5. Conclusions

In China, the frequent occurrence of urban road traffic accidents has not only caused economic losses but also caused casualties. Reducing accident casualties that cause great economic and spiritual losses has become a major problem in the transport department. This paper attempts to use traffic accident data to predict the possibility of casualties. SVM has proven to be an effective tool for the forecast of accidents. However, randomly generated penalty factor C and kernel function parameter γ inevitably make the effect of SVM unsatisfactory. This study collects Week, Period, Weather, Road Conditions, Alarm Categories, Active Hit, Passive Hit, Collision Type, Road Section and Road Type as research attributes.
To attack the abovementioned problem, SSA, PSO, GA and GWO heuristic algorithms are implemented to optimize the parameters of the SVM with the RBF to improve the accuracy of classification. The fitness curve, PRE, REC, F1, ACC, MSE, ROC and AUC are introduced as the performance metrics of the classification ability. The final score is shown in Table 7.
The final results show that: for fitness, GWO-SVM is the quickest way of identifying the best fitness, and the average fitness of GA-SVM is the most stable. Combined with the abovementioned classification performance (PRE, REC, F1, ACC and MSE), SSA-SVM performs optimally. For the ROC and AUC, the performances of four kinds of improved SVM all achieved great results and are better than the original SVM. The results show that SSA-SVM, PSO-SVM, GA-SVM and GWO-SVM classify more correctly and stably than the original SVM, especially the omnipotence of performance of SSA-SVM, which illustrates the SVM based on transportation accidents proposed in this paper has practical value and application prospects. This experiment used four algorithms that are widely used in the field of traffic prediction to optimize SVM. Human, vehicle and environment factors were considered in the experiment. There is a poor effect when considering one factor separately; while all factors are taken as samples, the performance of the model is greatly improved. The best performance of the model trained by this dataset is SSA-SVM. However, there are still several limitations, such as long-time running and difficulty in classifying the complicated attributes. Collecting more accurate traffic accident data for training, establishing more trusted evaluation indicators and exploring better methods to extract features and optimize the predicting model will be our major direction of future research. Perhaps there are better heuristic algorithms that can achieve better results, which is also the direction we will explore in the future.

Author Contributions

Conceptualization, W.Z. and L.D.; methodology, W.Z.; software, W.Z.; validation, W.Z.; formal analysis, W.Z.; investigation, W.Z.; resources, L.D.; data curation, L.D.; writing—original draft preparation, W.Z.; writing—review and editing, L.D.; Supervision, L.D.; Visualization, W.Z.; funding acquisition, W.Z. All authors have read and agreed to the published version of the manuscript.

Funding

This research was supported by the Foundation of Social Science and Humanity, China Ministry of Education (Grant No.20YJC630018) and Foundation of National Natural Science Foundation of China (Grant No. 72104190).

Institutional Review Board Statement

Not appliable.

Informed Consent Statement

Not appliable.

Data Availability Statement

The data presented in this study are available on request from the corresponding author.

Conflicts of Interest

The authors declare no conflict of interests.

References

  1. Li, Z.Y.; Hao, T.X.; Zheng, R. The Relationship between Transportation Industry Efficiency, Transportation Structure, and Regional Sustainability Development in China: Based on DEA and PVAR Models. Sustainability 2022, 14, 10267. [Google Scholar] [CrossRef]
  2. Zhang, L.Y.; Zhang, M.; Tang, J.Z.; Ma, J.; Duan, X.K.; Sun, J.; Hu, X.F.; Xu, S.C. Analysis of Traffic Accident Based on Knowledge Graph. J. Adv. Transp. 2022, 2022, 3915467. [Google Scholar] [CrossRef]
  3. Jackisch, J.; Sethi, D.; Mitis, F.; Szymanski, T.; Arra, I. European Facts and the Global Status Report on Road Safety 2015. Inj. Prev. 2016, 22, A29. [Google Scholar] [CrossRef]
  4. Zheng, M.; Li, T.; Zhu, R.; Chen, J.; Ma, Z.F.; Tang, M.J.; Cui, Z.Q.; Wang, Z. Traffic Accident’s Severity Prediction: A Deep-Learning Approach-Based CNN Network. IEEE Access 2019, 7, 39897–39910. [Google Scholar] [CrossRef]
  5. Sabet, F.P.; Tabrizi, K.N.; Khankeh, H.R.; Saadat, S.; Abedi, H.A.; Bastami, A. Road Traffic Accident Victims’ Experiences of Return to Normal Life: A Qualitative Study. Iran. Red Crescent Med. J. 2016, 18, 7. [Google Scholar]
  6. Handayani, A.S.; Putri, H.M.; Soim, S.; Husni, N.L.; Rusmiasih; Sitompul, C.R. Intelligent Transportation System For Traffic Accident Monitoring. In Proceedings of the 3rd International Conference on Electrical Engineering and Computer Science (ICECOS), Batam, Indonesia, 2–3 October 2019; IEEE: Batam, Indonesia, 2019; pp. 156–161. [Google Scholar]
  7. Wongcharoen, S.; Senivongse, T. Twitter Analysis of Road Traffic Congestion Severity Estimation. In Proceedings of the 13th International Joint Conference on Computer Science and Software Engineering (JCSSE), Khon Kaen, Thailand, 13–15 July 2016; IEEE: Khon Kaen, Thailand, 2016; pp. 76–81. [Google Scholar]
  8. Zhang, J.H. Integration Theory and Optimal Application of the Traffic Accident Management System. In Proceedings of the International Conference on Cyber Security Intelligence and Analytics (CSIA), Shenyang, China, 21–22 February 2019; Springer International Publishing Ag: Shenyang, China, 2019; pp. 99–104. [Google Scholar]
  9. Kockelman, K.M.; Kweon, Y.-J. Driver injury severity: An application of ordered probit models. Accid. Anal. Prev. 2002, 34, 313–321. [Google Scholar] [CrossRef] [PubMed]
  10. Kaplan, S.; Prato, C.G. Risk factors associated with bus accident severity in the United States: A generalized ordered logit model. J. Saf. Res. 2012, 43, 171–180. [Google Scholar] [CrossRef]
  11. Eluru, N.; Bhat, C.R.; Hensher, D.A. A mixed generalized ordered response model for examining pedestrian and bicyclist injury severity level in traffic crashes. Accid. Anal. Prev. 2008, 40, 1033–1054. [Google Scholar] [CrossRef]
  12. Al-Ghamdi, A.S. Using logistic regression to estimate the influence of accident factors on accident severity. Accid. Anal. Prev. 2002, 34, 729–741. [Google Scholar] [CrossRef]
  13. Kononen, D.W.; Flannagan, C.A.C.; Wang, S.C. Identification and validation of a logistic regression model for predicting serious injuries associated with motor vehicle crashes. Accid. Anal. Prev. 2011, 43, 112–122. [Google Scholar] [CrossRef]
  14. Milton, J.C.; Shankar, V.N.; Mannering, F. Highway accident severities and the mixed logit model: An exploratory empirical analysis. Accid. Anal. Prev. 2008, 40, 260–266. [Google Scholar] [CrossRef] [PubMed]
  15. Yamamoto, T.; Shankar, V.N. Bivariate ordered-response probit model of driver’s and passenger’s injury severities in collisions with fixed objects. Accid. Anal. Prev. 2004, 36, 869–876. [Google Scholar] [CrossRef] [PubMed]
  16. Vittorias, I.; Lilge, D.; Baroso, V.; Wilhelm, M. Linear and non-linear rheology of linear polydisperse polyethylene. Rheol. Acta 2011, 50, 691–700. [Google Scholar] [CrossRef]
  17. Yau, K.K.W.; Lo, H.P.; Fung, S.H.H. Multiple-vehicle traffic accidents in Hong Kong. Accid. Anal. Prev. 2006, 38, 1157–1161. [Google Scholar] [CrossRef] [PubMed]
  18. Chen, T.Y.; Jou, R.C. Using HLM to investigate the relationship between traffic accident risk of private vehicles and public transportation. Transp. Res. Part A Policy Pract. 2019, 119, 148–161. [Google Scholar] [CrossRef]
  19. Weng, J.X.; Gan, X.F.; Zhang, Z.Y. A quantitative risk assessment model for evaluating hazmat transportation accident risk. Saf. Sci. 2021, 137, 11. [Google Scholar] [CrossRef]
  20. Yuan, Y.L.; Yang, M.; Guo, Y.Y.; Rasouli, S.; Gan, Z.X.; Ren, Y.F. Risk factors associated with truck-involved fatal crash severity: Analyzing their impact for different groups of truck drivers. J. Saf. Res. 2021, 76, 154–165. [Google Scholar] [CrossRef]
  21. Yu, R.J.; Zheng, Y.; Qin, Y.; Peng, Y.C. Utilizing Partial Least-Squares Path Modeling to Analyze Crash Risk Contributing Factors for Shanghai Urban Expressway System. ASCE-ASME J. Risk. Uncertain. Eng. Syst. Part A. Civ. Eng. 2019, 5, 9. [Google Scholar] [CrossRef]
  22. Ye, F.; Cheng, W.; Wang, C.S.; Liu, H.X.; Bai, J.P. Investigating the severity of expressway crash based on the random parameter logit model accounting for unobserved heterogeneity. Adv. Mech. Eng. 2021, 13, 13. [Google Scholar] [CrossRef]
  23. Chang, L.Y.; Wang, H.W. Analysis of traffic injury severity: An application of non-parametric classification tree techniques. Accid. Anal. Prev. 2006, 38, 1019–1027. [Google Scholar] [CrossRef]
  24. de Ona, J.; Mujalli, R.O.; Calvo, F.J. Analysis of traffic accident injury severity on Spanish rural highways using Bayesian networks. Accid. Anal. Prev. 2011, 43, 402–411. [Google Scholar] [CrossRef] [PubMed]
  25. Pearl, J. The Seven Tools of Causal Inference, with Reflections on Machine Learning. Commun. ACM 2019, 62, 54–60. [Google Scholar] [CrossRef]
  26. Chong, M.M.; Abraham, A.; Paprzycki, M. Traffic acci-dent analysis using decision trees and neural networks. arXiv 2004, arXiv:cs/0405050. [Google Scholar]
  27. Plakandaras, V.; Papadimitriou, T.; Gogas, P. Forecasting transportation demand for the US market. Transp. Res. Part. A Policy Pract. 2019, 126, 195–214. [Google Scholar] [CrossRef]
  28. Guo, Y.H.; Zhang, Y.; Boulaksil, Y.; Tian, N. Multi-dimensional spatiotemporal demand forecasting and service vehicle dispatching for online car-hailing platforms. Int. J. Prod. Res. 2022, 60, 1832–1853. [Google Scholar] [CrossRef]
  29. Gupta, B.B.; Gaurav, A.; Marin, E.C.; Alhalabi, W. Novel Graph-Based Machine Learning Technique to Secure Smart Vehicles in Intelligent Transportation Systems. IEEE Trans. Intell. Transp. Syst. 2022. [Google Scholar] [CrossRef]
  30. Hasan, R.A.; Irshaid, H.; Alhomaidat, F.; Lee, S.; Oh, J.S. Transportation Mode Detection by Using Smartphones and Smartwatches with Machine Learning. KSCE J. Civ. Eng. 2022, 26, 3578–3589. [Google Scholar] [CrossRef]
  31. Cabelin, J.D.; Alpano, P.V.; Pedrasa, J.R. SVM-based Detection of False Data Injection in Intelligent Transportation System. In Proceedings of the 35th International Conference on Information Networking (ICOIN), Jeju Island, Republic of Korea, 13–16 January 2021; pp. 279–284. [Google Scholar]
  32. Puspaningrum, A.; Suheryadi, A.; Sumarudin, A. Implementation of cuckoo search algorithm for support vector machine parameters optimization in pre collision warning. In International Symposium on Materials and Electrical Engineering (ISMEE); Iop Publishing Ltd.: Bandung, Indonesia, 2019. [Google Scholar]
  33. Liu, Y.S.; Liu, D.; Heng, X.D.; Li, D.Y.; Bai, Z.Y.; Qian, J. Fault Diagnosis of Series Batteries based on GWO-SVM. In Proceedings of the 16th IEEE Conference on Industrial Electronics and Applications (ICIEA), Chengdu, China, 1–4 August 2021; IEEE: Chengdu, China, 2021; pp. 451–456. [Google Scholar]
  34. Zheng, Y.X.; Zhang, R.F.; Yuan, X.H. Parametric Design of Elevator Car Wall Based on GA-SVM Method. In Proceedings of the 5th Asia-Pacific Conference on Intelligent Robot Systems (ACIRS), Singapore, 17–19 July 2020; pp. 133–137. [Google Scholar]
  35. Li, R.; Xu, S.H.; Zhou, Y.Q.; Li, S.B.; Yao, J.; Zhou, K.; Liu, X.Z. Toward Group Applications of Zinc-Silver Battery: A Classification Strategy Based on PSO-LSSVM. IEEE Access 2020, 8, 4745–4753. [Google Scholar] [CrossRef]
  36. Wumaier, T.; Xu, C.; Guo, H.Y.; Jin, Z.J.; Zhou, H.J. Fault Diagnosis of Wind Turbines Based on a Support Vector Machine Optimized by the Sparrow Search Algorithm. IEEE Access 2021, 9, 69307–69315. [Google Scholar]
  37. Huang, C.L.; Wang, C.J. A GA-based feature selection and parameters optimization for support vector machines. Expert Syst. Appl. 2006, 31, 231–240. [Google Scholar] [CrossRef]
  38. Wahab, O.A.; Mourad, A.; Otrok, H.; Bentahar, J. CEAP: SVM-based intelligent detection model for clustered vehicular ad hoc networks. Expert Syst. Appl. 2016, 50, 40–54. [Google Scholar] [CrossRef]
  39. Lin, J.; Zhang, J. A Fast Parameters Selection Method of Support Vector Machine Based on Coarse Grid Search and Pattern Search. In Proceedings of the 4th Global Congress on Intelligent Systems (GCIS), Hong Kong, China, 3–4 December 2013; IEEE: Hong Kong, China, 2013; pp. 77–81. [Google Scholar]
  40. Ye, X.H.; Li, Y.X.; Tong, L.; He, L. Remote Sensing Retrieval of Suspended Solids in Longquan Lake Based on Ga-Svm Model. In Proceedings of the 2017 IEEE International Geoscience and Remote Sensing Symposium (IGARSS), Fort Worth, TX, USA, 23–28 July 2017; pp. 5501–5504. [Google Scholar]
  41. Clerc, M.; Kennedy, J. The particle swarm—Explosion, stability, and convergence in a multidimensional complex space. IEEE Trans. Evol. Comput. 2002, 6, 58–73. [Google Scholar] [CrossRef]
  42. Gharehchopogh, F.S.; Namazi, M.; Ebrahimi, L.; Abdollahzadeh, B. Advances in Sparrow Search Algorithm: A Comprehensive Survey. Arch. Comput. Method Eng. 2023, 30, 427–455. [Google Scholar] [CrossRef] [PubMed]
  43. Konak, A.; Coit, D.W.; Smith, A.E. Multi-objective optimization using genetic algorithms: A tutorial. Reliab. Eng. Syst. Saf. 2006, 91, 992–1007. [Google Scholar] [CrossRef]
  44. Hou, Y.X.; Gao, H.B.; Wang, Z.J.; Du, C.S. Improved Grey Wolf Optimization Algorithm and Application. Sensors 2022, 22, 3810. [Google Scholar] [CrossRef] [PubMed]
  45. Zhou, T.; Lu, H.L.; Wang, W.W.; Yong, X. GA-SVM based feature selection and parameter optimization in hospitalization expense modeling. Appl. Soft. Comput. 2019, 75, 323–332. [Google Scholar]
  46. Gokulnath, C.B.; Shantharajah, S.P. An optimized feature selection based on genetic approach and support vector machine for heart disease. Clust. Comput. 2019, 22, 14777–14787. [Google Scholar] [CrossRef]
  47. Yin, H.P.; Ren, H.P. Direct symbol decoding using GA-SVM in chaotic baseband wireless communication system. J. Frankl. Inst.-Eng. Appl. Math. 2021, 358, 6348–6367. [Google Scholar] [CrossRef]
  48. Zhu, Y.L.; Yousefi, N. Optimal parameter identification of PEMFC stacks using Adaptive Sparrow Search Algorithm. Int. J. Hydrog. Energy 2021, 46, 9541–9552. [Google Scholar] [CrossRef]
  49. Nagra, A.A.; Mubarik, I.; Asif, M.M.; Masood, K.; Al Ghamdi, G.M.A.; Almotiri, S.H. Hybrid GA-SVM Approach for Postoperative Life Expectancy Prediction in Lung Cancer Patients. Appl. Sci. 2022, 12, 10927. [Google Scholar] [CrossRef]
  50. Xiao, J.H.; Zhu, X.H.; Huang, C.X.; Yang, X.G.; Wen, F.H.; Zhong, M.R. A New Approach for Stock Price Analysis and Prediction Based on SSA and SVM. Int. J. Inf. Technol. Decis. Mak. 2019, 18, 287–310. [Google Scholar] [CrossRef]
  51. Zhang, X.Y.; Zhou, K.Q.; Li, P.C.; Xiang, Y.H.; Zain, A.M.; Sarkheyli-Hagele, A. An Improved Chaos Sparrow Search Optimization Algorithm Using Adaptive Weight Modification and Hybrid Strategies. IEEE Access 2022, 10, 96159–96179. [Google Scholar] [CrossRef]
  52. Duan, Z.Y.; Liu, T.Y. Short-Term Electricity Price Forecast Based on SSA-SVM Model. In Proceedings of the 2nd International Conference on Advanced Intelligent Technologies (ICAIT), Xi’an, China, 15–17 October 2021; pp. 79–88. [Google Scholar]
  53. Mirjalili, S.; Mirjalili, S.M.; Lewis, A. Grey Wolf Optimizer. Adv. Eng. Softw. 2014, 69, 46–61. [Google Scholar] [CrossRef]
  54. Lu, S.Y.; Li, M.J.; Luo, N.; He, W.; He, X.J.; Gan, C.J.; Deng, R. Lithology Logging Recognition Technology Based on GWO-SVM Algorithm. Math. Probl. Eng. 2022, 2022, 11. [Google Scholar] [CrossRef]
  55. Liu, J.; Zhu, X.J.; Zhang, Y.F. Application of DE-GWO-SVM Algorithm in Business Order Prediction Model. In Proceedings of the 11th IEEE International Conference on Software Engineering and Service Science (IEEE ICSESS), Beijing, China, 16–18 October 2020; IEEE: Beijing, China, 2020; pp. 432–435. [Google Scholar]
  56. Kohli, M.; Arora, S. Chaotic grey wolf optimization algorithm for constrained optimization problems. J. Comput. Des. Eng. 2018, 5, 458–472. [Google Scholar] [CrossRef]
  57. Deng, W.; Xu, J.J.; Zhao, H.M.; Song, Y.J. A Novel Gate Resource Allocation Method Using Improved PSO-Based QEA. IEEE Trans. Intell. Transp. Syst. 2022, 23, 1737–1745. [Google Scholar] [CrossRef]
  58. Li, B.; Liu, M.L.; Guo, Z.J.; Ji, Y.M. Application of EWT and PSO-SVM in Fault Diagnosis of HV Circuit Breakers. In Proceedings of the 7th International Conference on Communications, Signal Processing, and Systems (CSPS), Dalian, China, 14–16 July 2018; Springer-Verlag Singapore Pte Ltd.: Dalian, China, 2018; pp. 628–637. [Google Scholar]
  59. Hu, Y.J.; Sun, J.; Peng, W.; Zhang, D.H. A novel forecast model based on CF-PSO-SVM approach for predicting the roll gap in acceleration and deceleration process. Eng. Comput. 2021, 38, 1117–1133. [Google Scholar] [CrossRef]
  60. Zhou, G.F.; Moayedi, H.; Bahiraei, M.; Lyu, Z.J. Employing artificial bee colony and particle swarm techniques for optimizing a neural network in prediction of heating and cooling loads of residential buildings. J. Clean Prod. 2020, 254, 14. [Google Scholar] [CrossRef]
  61. Wang, Z.H.; Chen, W.; Gu, S.; Wang, Y.W.; Wang, J. Evaluation of trunk borer infestation duration using MOS E-nose combined with different feature extraction methods and GS-SVM. Comput. Electron. Agric. 2020, 170, 9. [Google Scholar] [CrossRef]
Figure 1. Top 10 attributes of casualties-causing rate.
Figure 1. Top 10 attributes of casualties-causing rate.
Sustainability 15 02944 g001
Figure 2. The optimization process of SVM.
Figure 2. The optimization process of SVM.
Sustainability 15 02944 g002
Figure 3. C-γ Heat map.
Figure 3. C-γ Heat map.
Sustainability 15 02944 g003
Figure 4. Fitness curve of GA within 100 generations.
Figure 4. Fitness curve of GA within 100 generations.
Sustainability 15 02944 g004
Figure 5. Fitness curve of SSA within 100 generations.
Figure 5. Fitness curve of SSA within 100 generations.
Sustainability 15 02944 g005
Figure 6. Fitness curve of GWO within 100 generations.
Figure 6. Fitness curve of GWO within 100 generations.
Sustainability 15 02944 g006
Figure 7. Fitness curve of PSO within 100 generations.
Figure 7. Fitness curve of PSO within 100 generations.
Sustainability 15 02944 g007
Figure 8. ACC, F1, PRE, REC and MSE of four models.
Figure 8. ACC, F1, PRE, REC and MSE of four models.
Sustainability 15 02944 g008
Figure 9. Precision-recall curve.
Figure 9. Precision-recall curve.
Sustainability 15 02944 g009
Figure 10. ROC curve.
Figure 10. ROC curve.
Sustainability 15 02944 g010
Table 1. Traffic accident factors and conditions table.
Table 1. Traffic accident factors and conditions table.
AttributeRangeNumberNumber of CasualtiesProbability of Casualties
WeekMon63632150.47%
Tues62232051.44%
Wed62329447.19%
Thurs61330449.59%
Fri65630346.19%
Sat56628249.82%
Sun56929251.32%
PeriodEvening74432743.69%
Dawn1174135.04%
Forenoon79947645.30%
Late Night1034559.57%
Night78030162.10%
Afternoon50730459.96%
Morning86339143.95%
Noon37223138.59%
WeatherSunny69434850.14%
Cloudy2122105149.52%
Light-Rain51023846.67%
Moderate-Rain21511553.49%
Heavy-Rain1114742.34%
Overcast48824049.18%
Rainstorm1065854.72%
Thunderstorm391948.72%
Road-ConditionsDry3304163949.61%
Wet98147748.62%
Alarm CategoriesVehicle221263228.57%
Vehicle-Non101784783.28%
Unilateral2928729.79%
Vehicle-Pedestrian19418997.42%
Non-Pedestrian797797.47%
Vehicle-Animal1800%
Both-Non25923891.89%
Damage-Property100%
Other2134621.60%
Active HitVehicle210690042.74%
Pedestrian11100%
Electric-Vehicle60352687.23%
Motorcycle38231983.51%
Truck3139028.75%
Small-Truck712535.21%
Big-Truck892932.58%
Bus752736.00%
Off-Road722230.56%
Van1145750.00%
Taxi1719052.63%
Bicycle362672.22%
Other25241.59%
Passive HitVehicle151719612.92%
Pedestrian29428697.28%
Electric-Vehicle101188487.44%
Motorcycle50442884.92%
Truck1362216.18%
Small-Truck371129.73%
Big-Truck351131.43%
Animal2600%
Bus27518.52%
Bicycle11910184.87%
Off-Road651116.92%
Taxi702231.43%
Van872225.29%
Other35711732.77%
Collision TypeCrash2990164755.08%
Dodge554480.00%
Rollover361336.11%
Scrape101534634.09%
Other1185950.00%
Road SectionProsperous3155155949.41%
Non-Prosperous113055749.29%
Road TypeStraight2849141849.77%
Crossroad143669848.61%
Table 6. Optimal parameters of mixed SVM.
Table 6. Optimal parameters of mixed SVM.
Cγ
GA-SVM87.27690.0481
SSA-SVM1.18580.3559
GWO-SVM146.85440.0127
PSO-SVM1.1940.3270
Table 7. Final score chart Of four models.
Table 7. Final score chart Of four models.
ModelACCF1PRERECMSEAUC
SVM0.600.360.950.220.450.7324
GA-SVM0.840.840.840.840.210.8856
SSA-SVM0.860.860.930.850.160.8889
GWO-SVM0.850.840.940.830.190.8799
PSO-SVM0.850.850.930.840.160.8901
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Zhong, W.; Du, L. Predicting Traffic Casualties Using Support Vector Machines with Heuristic Algorithms: A Study Based on Collision Data of Urban Roads. Sustainability 2023, 15, 2944. https://doi.org/10.3390/su15042944

AMA Style

Zhong W, Du L. Predicting Traffic Casualties Using Support Vector Machines with Heuristic Algorithms: A Study Based on Collision Data of Urban Roads. Sustainability. 2023; 15(4):2944. https://doi.org/10.3390/su15042944

Chicago/Turabian Style

Zhong, Weifan, and Lijing Du. 2023. "Predicting Traffic Casualties Using Support Vector Machines with Heuristic Algorithms: A Study Based on Collision Data of Urban Roads" Sustainability 15, no. 4: 2944. https://doi.org/10.3390/su15042944

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

Article Metrics

Back to TopTop