# Presentation of Machine Learning Approaches for Predicting the Severity of Accidents to Propose the Safety Solutions on Rural Roads

Authors: Mohammad Habibzadeh; Mahmoud Ameri; Hassan Ziari; Neda Kamboozia; Seyede Mojde Sadat Haghighi
Journal: Journal of Advanced Transportation
 (2022)

---

## Abstract

The aim of the current research was to develop models to predict the severity of accidents on rural roads in Tehran province, Iran. In this regard, using accident data from 2017 to 2020, the machine learning algorithms, including multiple logistic regression, multilayer perceptron neural network (MLPNN), and radial basis function neural network (RBFNN) models, as well as statistical methods, including Kolmogorov–Smirnov test, Friedman test, and factor analysis, were implemented to determine the contributory factors in the severity of accidents. Thus, nine variables affecting the severity of accidents were considered in modeling, and then the effect of each variable was calculated. By comparing the results of artificial neural network (ANN) models and the Friedman test, it was indicated that the human factor had a remarkable effect on accident severity. In addition, both machine learning and statistical methods can be served as guidance for safety authorities to provide safety solutions, thereby leading to reducing accidents. Finally, the performances of ANN models were analyzed by other mathematical models built by MATLAB programming.


---

## Body

## 1. Introduction

Road traffic accidents have been considered one of the most important issues among other topics in today’s lives and are regarded as the 8th leading cause of death in the world [1]. Based on the statistics, every year, 1.35 million citizens are killed in highway accidents, and 20–50 million are injured around the world due to traffic accidents [2]. The safety of rural roads is related to the road users, which is the result of each person’s thinking and approach. Therefore, there is an urgent need to identify and analyze these issues that can be led to the understanding of traffic behaviors [3].The traffic system is considered one of the most complex and dangerous systems that people should be faced with it in society, and today, the danger of traffic accidents made by humans threatens the lives of people more than other factors such as pathogenicity [4–8]. Due to the high number of traffic accidents and imposing costs on society, it is important to evaluate and understand the variables, which affect the accident occurrence, helping governments and safety authorities to take preventive and corrective measures [9–11]. With respect to the high number of accidents on the rural roads of Tehran province, Iran, it is necessary to evaluate the contributory factors to the severity of accidents, including property damage only (PDO) and fatal/injury, which can lead to finding solutions in reducing accidents and increasing safety.Modeling accident severity in terms of their significant variables makes it possible to predict accident occurrence that requires relief equipment. In this regard, different statistical analyses and machine learning methods can be employed. Moreover, using these methods, the influence of each variable in intensifying traffic accidents can be evaluated. This approach will lead to the possibility of formulating traffic safety plans for traffic engineers, and they may also have a better understanding of the parameters having a negative or positive effect on accident severity. This study examined the risk factors in the severity of vehicle accidents on Tehran rural roads by the use of various methods to detect more precisely the factors that affect the severity of accidents. Results provide insight with respect to the relationship between the various risk factors and the severity of accidents for improving traffic safety on these roads. The original idea of this study was to develop optimum models that have a robust and accurate capability to calculate the influence of each independent variable affecting the severity of accidents.


### 1.1. Literature Review

A lot of efforts have been made using machine learning methods to identify different contributing factors in accident occurrence. In this section, some of the research carried out in some countries are explained.In a study conducted by Abdelwahab and Abdel-Aty, the performances of multilayer perceptron neural network (MLPNN) and radial basis function neural network (RBFNN) models were compared with calibrated logit models by the use of road accident data. The results of this research indicated that the RBFNN model was more robust in analyzing the severity of driver injuries. In addition, based on the RBFNN model, the likelihood of older drivers involved in injury accidents was more than younger drivers, and female drivers accounted for a higher percentage of injured accidents compared to males [12]. Xie et al. found out that the ANN model is more strong in predicting travel mode compared to other alternatives such as decision tree (DT) and multinomial logit (MNL) models [13]. Kim et al. developed the MNL model to predict the variables affecting motor vehicle accidents. They focused on four categories of collisions, which included fatal, incapacitating, nonincapacitating, possible, and no injury. The study represented that the variables of the truck vehicle, consuming alcohol by driver or cyclist, high speed, inclement weather, the age group related over 55 years old for the cyclist, and head-on collisions increased the probability of injury accidents, leading to fatal [14].Boodlal et al. using the two MNL models in predicting the probability of total and fatal/injury accidents evaluated the combination effects of lane and shoulder widths on rural roads in Illinois and Minnesota, USA. The results of this research indicated that the geometry features had no effect on the severity of accidents and only affected their occurrence [15]. Omrani utilized four types of machine learning methods, which included RBFNN, MLPNN, support vector machines (SVM), and MNL models, to assess the prediction of the individuals’ travel mode in the city of Luxembourg. The results illustrated that the performance of ANN models was better [16]. Huang et al. aimed at investigating the prediction of accidents and identifying risk parameters important to accident occurrence by the use of the RBFNN model. By comparing the results of backpropagation neural network (BPNN), RBFNN, and negative binomial (NB) models, it was indicated that the RBFNN model had better performance [17]. Alkedher et al. applied the MLPNN model to predict the severity of accidents divided into three classes using the k-means algorithm to improve the prediction accuracy. The clustering of the accidents data led to a substantial enhancement in the accuracy of predicting accidents [18].Behbahani et al. compared four types of artificial neural network (ANN) methods, including MLPNN, RBFNN, probabilistic neural network (PNN), and extreme learning machine (ELM). The results of this study showed that the ELM technique was recognized to be the fastest algorithm, and also, this method was very accurate in predicting accidents. In addition, the RBFNN algorithm identified the most effective factors in the prediction of accidents [19]. Rezapour et al. developed and then compared a single-layer perceptron neural network (SLPNN) with a recurrent neural network to predict the frequency and severity of motorbike accidents. The SLPNN was employed to investigate accident research as a distance-based pattern matching technique to detect the correct road segment [20]. Najafi Moghaddam Gilani et al. (2021) provided a study to identify the influential variables on vehicle accident occurrence. They designed machine learning methods such as ANN and logistic regression models to recognize the variables affecting the severity of accidents in two types of injury/fatal and PDO in Rasht city, Iran. The results indicated that the variables of accidents time (18:00 to 24:00) and KIA Pride vehicle were found as the most important variables in accident occurrence. Moreover, the performance of the ANN model was more capable of predicting the severity of accidents in comparison with logistic regression in terms of accuracy and efficacy [21].Thus, the results of these previous studies have indicated that using machine learning methods can be a proper approach for understanding the contributory factors and provide better predictive accuracy for accident occurrence. So, in this study, the Kolmogorov–Smirnov test was used to examine the normality of data. Then, the Friedman test and factor analysis were applied to prioritize the variables and detect the underlying variables, respectively. The machine learning approach was then employed to recognize the contributory factors in accident occurrence. In this method, the multiple logistic regression, multilayer perceptron neural network (MLPNN), and radial basis function neural network (RBFNN) models were built to detect the importance of each variable in the severity of accidents. By comparing these techniques, the most effective variables in the severity of accidents were identified, and the best model with a higher accuracy was chosen for accidents occurring in Tehran province rural roads, Iran. While various studies have used machine learning approaches to predict the severity of accidents, limited studies have studied to measure the effectiveness of education rate, type of collision, type of vehicles, and other variables. To address this gap, in this study, we considered 9 variables split into 64 variables, which have been rarely considered in previous studies, providing safety authorities with practical safety approaches. In this study, we try to make an effort to answer these research questions: what are the most influential variables that affect accident severity on rural roads in Iran? What are the optimum models to predict accident severity? What is the percentage of importance of each independent variable in predicting accident severity? This helps recognize gaps and enhance public safety toward promoting the overall highway safety situation of rural roads in Iran.


## 1.1. Literature Review

A lot of efforts have been made using machine learning methods to identify different contributing factors in accident occurrence. In this section, some of the research carried out in some countries are explained.In a study conducted by Abdelwahab and Abdel-Aty, the performances of multilayer perceptron neural network (MLPNN) and radial basis function neural network (RBFNN) models were compared with calibrated logit models by the use of road accident data. The results of this research indicated that the RBFNN model was more robust in analyzing the severity of driver injuries. In addition, based on the RBFNN model, the likelihood of older drivers involved in injury accidents was more than younger drivers, and female drivers accounted for a higher percentage of injured accidents compared to males [12]. Xie et al. found out that the ANN model is more strong in predicting travel mode compared to other alternatives such as decision tree (DT) and multinomial logit (MNL) models [13]. Kim et al. developed the MNL model to predict the variables affecting motor vehicle accidents. They focused on four categories of collisions, which included fatal, incapacitating, nonincapacitating, possible, and no injury. The study represented that the variables of the truck vehicle, consuming alcohol by driver or cyclist, high speed, inclement weather, the age group related over 55 years old for the cyclist, and head-on collisions increased the probability of injury accidents, leading to fatal [14].Boodlal et al. using the two MNL models in predicting the probability of total and fatal/injury accidents evaluated the combination effects of lane and shoulder widths on rural roads in Illinois and Minnesota, USA. The results of this research indicated that the geometry features had no effect on the severity of accidents and only affected their occurrence [15]. Omrani utilized four types of machine learning methods, which included RBFNN, MLPNN, support vector machines (SVM), and MNL models, to assess the prediction of the individuals’ travel mode in the city of Luxembourg. The results illustrated that the performance of ANN models was better [16]. Huang et al. aimed at investigating the prediction of accidents and identifying risk parameters important to accident occurrence by the use of the RBFNN model. By comparing the results of backpropagation neural network (BPNN), RBFNN, and negative binomial (NB) models, it was indicated that the RBFNN model had better performance [17]. Alkedher et al. applied the MLPNN model to predict the severity of accidents divided into three classes using the k-means algorithm to improve the prediction accuracy. The clustering of the accidents data led to a substantial enhancement in the accuracy of predicting accidents [18].Behbahani et al. compared four types of artificial neural network (ANN) methods, including MLPNN, RBFNN, probabilistic neural network (PNN), and extreme learning machine (ELM). The results of this study showed that the ELM technique was recognized to be the fastest algorithm, and also, this method was very accurate in predicting accidents. In addition, the RBFNN algorithm identified the most effective factors in the prediction of accidents [19]. Rezapour et al. developed and then compared a single-layer perceptron neural network (SLPNN) with a recurrent neural network to predict the frequency and severity of motorbike accidents. The SLPNN was employed to investigate accident research as a distance-based pattern matching technique to detect the correct road segment [20]. Najafi Moghaddam Gilani et al. (2021) provided a study to identify the influential variables on vehicle accident occurrence. They designed machine learning methods such as ANN and logistic regression models to recognize the variables affecting the severity of accidents in two types of injury/fatal and PDO in Rasht city, Iran. The results indicated that the variables of accidents time (18:00 to 24:00) and KIA Pride vehicle were found as the most important variables in accident occurrence. Moreover, the performance of the ANN model was more capable of predicting the severity of accidents in comparison with logistic regression in terms of accuracy and efficacy [21].Thus, the results of these previous studies have indicated that using machine learning methods can be a proper approach for understanding the contributory factors and provide better predictive accuracy for accident occurrence. So, in this study, the Kolmogorov–Smirnov test was used to examine the normality of data. Then, the Friedman test and factor analysis were applied to prioritize the variables and detect the underlying variables, respectively. The machine learning approach was then employed to recognize the contributory factors in accident occurrence. In this method, the multiple logistic regression, multilayer perceptron neural network (MLPNN), and radial basis function neural network (RBFNN) models were built to detect the importance of each variable in the severity of accidents. By comparing these techniques, the most effective variables in the severity of accidents were identified, and the best model with a higher accuracy was chosen for accidents occurring in Tehran province rural roads, Iran. While various studies have used machine learning approaches to predict the severity of accidents, limited studies have studied to measure the effectiveness of education rate, type of collision, type of vehicles, and other variables. To address this gap, in this study, we considered 9 variables split into 64 variables, which have been rarely considered in previous studies, providing safety authorities with practical safety approaches. In this study, we try to make an effort to answer these research questions: what are the most influential variables that affect accident severity on rural roads in Iran? What are the optimum models to predict accident severity? What is the percentage of importance of each independent variable in predicting accident severity? This helps recognize gaps and enhance public safety toward promoting the overall highway safety situation of rural roads in Iran.


## 2. Methodology

In the current study, various statistical methods have been examined and then compared to determine the factors that affect accident severity, each of which has its own unique characteristics and can be applied based on its functions. Comparing the results of the different methods can enable the researcher to adopt suitable measures to reduce accident occurrence. In the first step, the K-S test was utilized to examine the data distribution normality and select the appropriate tests. After that, the Friedman test and factor analysis were used to determine the priority of factors and the underlying variables, respectively. In the last section, machine learning approaches such as logit regression, MLPNN, and RBFNN models were considered in order to recognize and measure the importance of independent variables in accident severity. Finally, comparing the statistical methods and the machine learning approach provides suitable solutions for reducing accidents and increasing safety on Tehran province rural roads.


### 2.1. Data Collection

The current research was conducted in the Tehran metropolis, which is the capital of the Tehran province, Iran. Tehran is the most populous metropolis in the country and western Asia and includes 22 districts spread across 730 square kilometers and is located at 51°17′ to 51°33′ E and 35°36′ to 35°44′ N and 900 to 1,800 meters above sea level. Based on the official census in 2016, the population of this city was 8,693,706, of which 4,369,551 were female, and the population density of females was recorded as 5,986 per square. The influential parameters on increasing the likelihood of accidents might be different from city to city; due to high traffic interferences with other flows in several parts of this city and the congested traffic flow on ring roads [22], a separate research is needed to be done in the Tehran metropolis. Because of provided information and numerous traffic interferences and a very dense urban texture between passing vehicles and nonmotorized users, there is a clear need to recognize the most effective parameters for the severity of accidents and create a model with higher accuracy for future accidents. As it is mentioned earlier, many efforts have aimed at evaluating the number and severity of accidents, which considered the particular condition of accidents, which included accidents with unknown severity, high severity accidents, or the severity of accidents that may be expected to happen sometime in the future. In this research, however, due to a balanced number of datasets in terms of three classes of fatal, injury, and damage accidents, we analyzed and developed prediction models using machine learning methods, including logit, ANN models, and statistical methods. To conduct the research, on road safety improvements, accident data, including parameters such as accident time, environmental characteristics, human characteristics, and type of collision should be precisely gathered. The information related to 36-month was obtained from visiting Tehran Traffic Police Statistic Center. The data used in this study were gathered over three periods of 2017 to 2020, which included accident severity, accident time, accident day, reason of accident, gender of the driver, collision type, driver age, vehicle type, education rate, and weather condition. In total, 2,585 accidents data were collected from police accident reports of Tehran province, of which 2,013 cases (77.9%) were damage accidents, and 572 cases (22.1%) were fatal and injury ones. The dependent variable in this research was accident severity, divided into three classes: damage, fatal, and injury accidents. Because the amount of fatal accidents was small compared to whole accidents, the goodness of fit and the significance of the models cannot be satisfied regarding the three types of dependent variables; injury accidents were combined with fatal accidents; and the dependent variable was classified into two groups of damage and fatal/injury accidents.


#### 2.1.1. Data Description

Table1 represents the variables affecting accident severity in Tehran province as well as the suitable coding set for the variables in developing models.Table 1
Description and coding of each variable used in the study.
VariableVariable levelsAccident severity(1) Damage(2) Injury/fatalReason of accident(1) Not paying attention to the front(2) Failure to observe the longitudinal distance(3) Failure to observe the transverse distance(4) Fatigue and drowsiness(5) Exceeding the lawful speed(6) Failure to yield the right-of-way(7) Violating the left lane law(8) Deviating the left lane(9) Traveling in opposite directions(10) Defections of pavement(11) Turning in a forbidden place(12) Changing lanes dramatically(13) Inability to control the vehicle(14) Not paying attention to travel with reverse gear(15) Technical defect in the vehicleGender of the driver(1) Male(2) FemaleType of collision(1) Single vehicle(2) Vehicle-vehicle(3) Vehicle-pedestrian(4) Vehicle-motorcycle(5) Motorcycle-motorcycle(6) Motorcycle-pedestrian(7) Overturning vehicle(8) Overturning motorcycle(9) Vehicle-objectTime of accident(1) 00:00 to 06:00(2) 06:00 to 12:00(3) 12:00 to 18:00(4) 18:00 to 24:00Day of accident(1) Start of the week(2) Middle of the week(3) WeekendAge(1) Less or than equal to 18(2) 18 to 30(3) 30 to 45(4) 45 to 60(5) 60 and overVehicle(1) Motorcycle(2) KIA pride(3) Samand(4) Peugeot(5) Paykan(6) Taxi(7) Pickup(8) Truck(9) Trailer(10) Bus(11) Minibus(12) Other vehiclesEducation rate(1) Illiterate(2) Elementary(3) High school(4) Diploma(5) Associate degree(6) Bachelor’s(7) Master’s(8) PhDWeather conditions(1) Clear(2) Cloudy(3) Rainy(4) Snowy(5) Frost(6) Stormy


### 2.2. Statistical Methods

#### 2.2.1. Kolmogorov–Smirnov (K-S) Test

The Kolmogorov–Smirnov test is utilized to recognize the normality of samples [23]. The comparison of the result of the K-S test called sig. with a critical value of 0.05 determines the normal distribution of the data. If the sig. amount (p value) is greater than the critical value (0.05) for a fixed significance level, the null hypothesis of normality rejects, indicating that the normality assumption of the desired distribution is rejected [24].


#### 2.2.2. Friedman Test

The Friedman test is a nonparametric test utilized to detect the difference between related data. This test is equal to the parametric two-factor analysis of variance. The null hypothesis of Friedman’s two-way analysis of variance based on ranks describes that the K repeated measures or matched categories came from populations with the same median or the same population. The Friedman test is an analysis of variance based on ranks, which means that rank values or observed rank values are obtained by numerical outcomes or ordering ordinal, and is applied when there is no motivation to provide robust distributional assumptions [25].


#### 2.2.3. Factor Analysis (FA)

The FA is an important statistical technique applied in the modeling process the covariation between a set of data. When there are many number variables and there are no established relationships among them, the FA is utilized to recognize the contributory factors. Using the FA leads to recognizing the most effective parameters in forming the phenomena and declining the dimensions of factors observed. In general, the FA is split into two types: confirmatory factor analysis (CFA) and exploratory factor analysis (EFA). The EFA is utilized to recognize the hidden structures once the structure of the relationships between the parameters is unknown and to develop hypotheses about their possible structures, and in the CFA method, the determination of parameters is performed by the use of dimensions [26]. In the current research, EFA was used.


### 2.3. Machine Learning Approach

Machine learning methods such as ANN and logistic regression models have the ability to solve traffic accident problems, including the nonlinear relationships between input variables as well as presenting reliable and fast techniques for designing models. In addition, in developing these models, there is no need to consider the statistical distribution of the data and knowing knowledge about the relationships between the variables applied in the modeling.


#### 2.3.1. Multiple Logistic Regression

The multiple logistic regression model is one of the most applicable and common models used to find the relationships between contributory factors and the dependent variable. This model can represent a closed form in suggesting the possibility of selecting choices interpreted. In order to create this model, two fundamental assumptions must be provided. The first assumption is that each independent variable is unique, which means that a unit value is for each variable. Second, the dependent variable is not entirely predictable from the independent variables. The independent assumption of variables is not required in this model [27, 28]. Logistic regression is another type of logit model employed for dichotomous dependent variables. This model is applied to predict accidents based on continuous and/or categorical independent variables. Since the occurrence of the dependent variable is binary (0 and 1), the logistic binary can be applied. The chances are calculated as follows [29]:(1)odds=Pi1−Pi,where Pi is the probability of an event and 1 − Pi is the probability of the lack of an event.Logarithm or logit related to success’s chance is achieved by performing the logarithm of equation (2) as follows:(2)LogitPi=LogPi1−Pi.The reverse transfer function, called antilogistics, is applied in computing likelihood in terms of logistics from [29] as follows:(3)LogitZi−1=ezi1−ezi.


#### 2.3.2. Neural Network

ANN models have been recognized as one of the most common and applicable techniques of artificial intelligence (AI) in predicting the number and severity of accidents [30, 31]. Based on the recent studies carried out by some researchers on the safety of roads, neural network models had an acceptable level of accuracy in predicting road accidents over other techniques such as zero-inflated negative binomial, zero-inflated Poisson, negative binomial, and Poisson regression [32]. They are promising tools for evaluating complicated data and computing complex nonlinear problems. Because the internal structure of ANN models that do not give insights into the causal relationships between inputs and outputs, they are regarded as a black-box method [33–35]. Because of their accuracy and efficiency in recognizing the importance and amount of factors that affect accident severity, ANN models were considered a reliable tool in modeling techniques. In the present study, developing and comparing two ANN models, which include multilayer perceptron neural network (MLPNN) and radial basis function neural network (RBFNN), were considered.(1) MLPNN. The MLPNN has been one of the most common types of feedforward backpropagation neural networks that each neuron in one layer has directed connections to the neurons of the subsequent layer and the gradient of the loss function is computed with respect to the weights of the network for a single input-output example [36, 37], which have been used to predict the occurrence of traffic accidents. The framework of the MLPNN is as same as the single-layer perceptron neural network (SLPNN) with more hidden layers. At least three-node layers that include input, hidden, and output layers have usually been considered in the MLP model. In general, a supervised learning method called backpropagation is applied to train the model. In order for the model validation, the softmax activation function (AF) at the output layer and cross-entropy as the error function were used. The outputs are computed at the output layer as follows [38]:(4)yx=W0+∑j=1nWjfWj0+∑i=11λijXi,where W=W0,...,Wn and λ=λ10,...,λnI illustrate the weights in the second and first layers, respectively, and f is the AF. The hyperbolic tangent was used as an AF in the hidden layer as follows [38]:(5)fxj=tanhxj=e−xj−e−xje−xj+exj.Softmax was also applied as an AF in the output layer as follows:(6)fxj=exj∑exk.(2) RBFNN. The structure of the RBFNN model is similar to the structure of the MLPNN; however, the major difference between them is that the hidden layer of the RBFNN model includes nodes called RBF units. Two main parameters in the RBFNN models illustrate the position of its width or deviation and the function center. The hidden layer of the RBFNN model calculates the distance between the center of its RBF and an input data vector. The RBF has its peak by the zero distance between the input data vector and the RBF center and reducing progressively by increasing the distance; the output of the network is built as follows [39]:(7)yjx=∑i=1mwjifix+w0,where m is the number of hidden nodes, x = (x1 = vehicle type, x2 = driver age, …, xm = collision type) is the input data, wji illustrates the weight related to the ith hidden node to the jth output node, w0 is the bias value, and fi is the basis function of unit j. The Gaussian is one of the most common types of RBFNN [39].(8)fix=e−x−ci2/2σi,wherex is the input data, cj is the center for neuron j, and r is the spread of the basis function. A normalized RBF (NRBF) network is one of the Gaussian RBFNN types, using the softmax function; accordingly, the activations are normalized in the hidden units until the sum of them gets the value of one. An NRBF network with equal heights and unequal widths is written as follows [39]:(9)fixsoftmax=ehi∑i=1mehi,(10)hi=−∑k=12xk−cik22σi2,where xk is the input data (damage, and injury/fatal), cik is the center of the i-th hidden node related to the kth (k = 1, 2) input data, and softmax function (hi) is the output vector of the i-th hidden node.


### 2.4. Performance Evaluation

To compare the predictive performance of the developed models, five criteria of root mean square error (RMSE), mean square error (MSE), mean absolute error (MAE), mean absolute percentage error (MAPE), and average absolute deviation (MAD) were employed. The RMSE, MSE, MAE, MAPE, and MAD indicate the differences between predicted and actual values. In comparing, the lower values of RMSE, MSE, MAE, MAPE, and MAD, the better performance of the model. Equations (11)–(15) define the RMSE, MSE, MAE, MAPE, and MAD, respectively. To evaluate the performance of models with different architectures, we calculated each criterion for models to determine which one reaches the greatest accuracy [40–48].(11)RMSE=∑i=1nPi−Ai2N,(12)MSE=1N∑i=1nPi−Ai2,(13)MAE=1N∑i=1nPi−Ai,(14)MAPE=1N∑i=1nAi−Pi2Ai,(15)MAD=1N∑i=1nPi−Ai,where N is the amount of data for the training set and P, A, and Ai¯ are actual values, predicted values, and the average of actual values, respectively.


## 2.1. Data Collection

The current research was conducted in the Tehran metropolis, which is the capital of the Tehran province, Iran. Tehran is the most populous metropolis in the country and western Asia and includes 22 districts spread across 730 square kilometers and is located at 51°17′ to 51°33′ E and 35°36′ to 35°44′ N and 900 to 1,800 meters above sea level. Based on the official census in 2016, the population of this city was 8,693,706, of which 4,369,551 were female, and the population density of females was recorded as 5,986 per square. The influential parameters on increasing the likelihood of accidents might be different from city to city; due to high traffic interferences with other flows in several parts of this city and the congested traffic flow on ring roads [22], a separate research is needed to be done in the Tehran metropolis. Because of provided information and numerous traffic interferences and a very dense urban texture between passing vehicles and nonmotorized users, there is a clear need to recognize the most effective parameters for the severity of accidents and create a model with higher accuracy for future accidents. As it is mentioned earlier, many efforts have aimed at evaluating the number and severity of accidents, which considered the particular condition of accidents, which included accidents with unknown severity, high severity accidents, or the severity of accidents that may be expected to happen sometime in the future. In this research, however, due to a balanced number of datasets in terms of three classes of fatal, injury, and damage accidents, we analyzed and developed prediction models using machine learning methods, including logit, ANN models, and statistical methods. To conduct the research, on road safety improvements, accident data, including parameters such as accident time, environmental characteristics, human characteristics, and type of collision should be precisely gathered. The information related to 36-month was obtained from visiting Tehran Traffic Police Statistic Center. The data used in this study were gathered over three periods of 2017 to 2020, which included accident severity, accident time, accident day, reason of accident, gender of the driver, collision type, driver age, vehicle type, education rate, and weather condition. In total, 2,585 accidents data were collected from police accident reports of Tehran province, of which 2,013 cases (77.9%) were damage accidents, and 572 cases (22.1%) were fatal and injury ones. The dependent variable in this research was accident severity, divided into three classes: damage, fatal, and injury accidents. Because the amount of fatal accidents was small compared to whole accidents, the goodness of fit and the significance of the models cannot be satisfied regarding the three types of dependent variables; injury accidents were combined with fatal accidents; and the dependent variable was classified into two groups of damage and fatal/injury accidents.


### 2.1.1. Data Description

Table1 represents the variables affecting accident severity in Tehran province as well as the suitable coding set for the variables in developing models.Table 1
Description and coding of each variable used in the study.
VariableVariable levelsAccident severity(1) Damage(2) Injury/fatalReason of accident(1) Not paying attention to the front(2) Failure to observe the longitudinal distance(3) Failure to observe the transverse distance(4) Fatigue and drowsiness(5) Exceeding the lawful speed(6) Failure to yield the right-of-way(7) Violating the left lane law(8) Deviating the left lane(9) Traveling in opposite directions(10) Defections of pavement(11) Turning in a forbidden place(12) Changing lanes dramatically(13) Inability to control the vehicle(14) Not paying attention to travel with reverse gear(15) Technical defect in the vehicleGender of the driver(1) Male(2) FemaleType of collision(1) Single vehicle(2) Vehicle-vehicle(3) Vehicle-pedestrian(4) Vehicle-motorcycle(5) Motorcycle-motorcycle(6) Motorcycle-pedestrian(7) Overturning vehicle(8) Overturning motorcycle(9) Vehicle-objectTime of accident(1) 00:00 to 06:00(2) 06:00 to 12:00(3) 12:00 to 18:00(4) 18:00 to 24:00Day of accident(1) Start of the week(2) Middle of the week(3) WeekendAge(1) Less or than equal to 18(2) 18 to 30(3) 30 to 45(4) 45 to 60(5) 60 and overVehicle(1) Motorcycle(2) KIA pride(3) Samand(4) Peugeot(5) Paykan(6) Taxi(7) Pickup(8) Truck(9) Trailer(10) Bus(11) Minibus(12) Other vehiclesEducation rate(1) Illiterate(2) Elementary(3) High school(4) Diploma(5) Associate degree(6) Bachelor’s(7) Master’s(8) PhDWeather conditions(1) Clear(2) Cloudy(3) Rainy(4) Snowy(5) Frost(6) Stormy


## 2.1.1. Data Description

Table1 represents the variables affecting accident severity in Tehran province as well as the suitable coding set for the variables in developing models.Table 1
Description and coding of each variable used in the study.
VariableVariable levelsAccident severity(1) Damage(2) Injury/fatalReason of accident(1) Not paying attention to the front(2) Failure to observe the longitudinal distance(3) Failure to observe the transverse distance(4) Fatigue and drowsiness(5) Exceeding the lawful speed(6) Failure to yield the right-of-way(7) Violating the left lane law(8) Deviating the left lane(9) Traveling in opposite directions(10) Defections of pavement(11) Turning in a forbidden place(12) Changing lanes dramatically(13) Inability to control the vehicle(14) Not paying attention to travel with reverse gear(15) Technical defect in the vehicleGender of the driver(1) Male(2) FemaleType of collision(1) Single vehicle(2) Vehicle-vehicle(3) Vehicle-pedestrian(4) Vehicle-motorcycle(5) Motorcycle-motorcycle(6) Motorcycle-pedestrian(7) Overturning vehicle(8) Overturning motorcycle(9) Vehicle-objectTime of accident(1) 00:00 to 06:00(2) 06:00 to 12:00(3) 12:00 to 18:00(4) 18:00 to 24:00Day of accident(1) Start of the week(2) Middle of the week(3) WeekendAge(1) Less or than equal to 18(2) 18 to 30(3) 30 to 45(4) 45 to 60(5) 60 and overVehicle(1) Motorcycle(2) KIA pride(3) Samand(4) Peugeot(5) Paykan(6) Taxi(7) Pickup(8) Truck(9) Trailer(10) Bus(11) Minibus(12) Other vehiclesEducation rate(1) Illiterate(2) Elementary(3) High school(4) Diploma(5) Associate degree(6) Bachelor’s(7) Master’s(8) PhDWeather conditions(1) Clear(2) Cloudy(3) Rainy(4) Snowy(5) Frost(6) Stormy


## 2.2. Statistical Methods

### 2.2.1. Kolmogorov–Smirnov (K-S) Test

The Kolmogorov–Smirnov test is utilized to recognize the normality of samples [23]. The comparison of the result of the K-S test called sig. with a critical value of 0.05 determines the normal distribution of the data. If the sig. amount (p value) is greater than the critical value (0.05) for a fixed significance level, the null hypothesis of normality rejects, indicating that the normality assumption of the desired distribution is rejected [24].


### 2.2.2. Friedman Test

The Friedman test is a nonparametric test utilized to detect the difference between related data. This test is equal to the parametric two-factor analysis of variance. The null hypothesis of Friedman’s two-way analysis of variance based on ranks describes that the K repeated measures or matched categories came from populations with the same median or the same population. The Friedman test is an analysis of variance based on ranks, which means that rank values or observed rank values are obtained by numerical outcomes or ordering ordinal, and is applied when there is no motivation to provide robust distributional assumptions [25].


### 2.2.3. Factor Analysis (FA)

The FA is an important statistical technique applied in the modeling process the covariation between a set of data. When there are many number variables and there are no established relationships among them, the FA is utilized to recognize the contributory factors. Using the FA leads to recognizing the most effective parameters in forming the phenomena and declining the dimensions of factors observed. In general, the FA is split into two types: confirmatory factor analysis (CFA) and exploratory factor analysis (EFA). The EFA is utilized to recognize the hidden structures once the structure of the relationships between the parameters is unknown and to develop hypotheses about their possible structures, and in the CFA method, the determination of parameters is performed by the use of dimensions [26]. In the current research, EFA was used.


## 2.2.1. Kolmogorov–Smirnov (K-S) Test

The Kolmogorov–Smirnov test is utilized to recognize the normality of samples [23]. The comparison of the result of the K-S test called sig. with a critical value of 0.05 determines the normal distribution of the data. If the sig. amount (p value) is greater than the critical value (0.05) for a fixed significance level, the null hypothesis of normality rejects, indicating that the normality assumption of the desired distribution is rejected [24].


## 2.2.2. Friedman Test

The Friedman test is a nonparametric test utilized to detect the difference between related data. This test is equal to the parametric two-factor analysis of variance. The null hypothesis of Friedman’s two-way analysis of variance based on ranks describes that the K repeated measures or matched categories came from populations with the same median or the same population. The Friedman test is an analysis of variance based on ranks, which means that rank values or observed rank values are obtained by numerical outcomes or ordering ordinal, and is applied when there is no motivation to provide robust distributional assumptions [25].


## 2.2.3. Factor Analysis (FA)

The FA is an important statistical technique applied in the modeling process the covariation between a set of data. When there are many number variables and there are no established relationships among them, the FA is utilized to recognize the contributory factors. Using the FA leads to recognizing the most effective parameters in forming the phenomena and declining the dimensions of factors observed. In general, the FA is split into two types: confirmatory factor analysis (CFA) and exploratory factor analysis (EFA). The EFA is utilized to recognize the hidden structures once the structure of the relationships between the parameters is unknown and to develop hypotheses about their possible structures, and in the CFA method, the determination of parameters is performed by the use of dimensions [26]. In the current research, EFA was used.


## 2.3. Machine Learning Approach

Machine learning methods such as ANN and logistic regression models have the ability to solve traffic accident problems, including the nonlinear relationships between input variables as well as presenting reliable and fast techniques for designing models. In addition, in developing these models, there is no need to consider the statistical distribution of the data and knowing knowledge about the relationships between the variables applied in the modeling.


### 2.3.1. Multiple Logistic Regression

The multiple logistic regression model is one of the most applicable and common models used to find the relationships between contributory factors and the dependent variable. This model can represent a closed form in suggesting the possibility of selecting choices interpreted. In order to create this model, two fundamental assumptions must be provided. The first assumption is that each independent variable is unique, which means that a unit value is for each variable. Second, the dependent variable is not entirely predictable from the independent variables. The independent assumption of variables is not required in this model [27, 28]. Logistic regression is another type of logit model employed for dichotomous dependent variables. This model is applied to predict accidents based on continuous and/or categorical independent variables. Since the occurrence of the dependent variable is binary (0 and 1), the logistic binary can be applied. The chances are calculated as follows [29]:(1)odds=Pi1−Pi,where Pi is the probability of an event and 1 − Pi is the probability of the lack of an event.Logarithm or logit related to success’s chance is achieved by performing the logarithm of equation (2) as follows:(2)LogitPi=LogPi1−Pi.The reverse transfer function, called antilogistics, is applied in computing likelihood in terms of logistics from [29] as follows:(3)LogitZi−1=ezi1−ezi.


### 2.3.2. Neural Network

ANN models have been recognized as one of the most common and applicable techniques of artificial intelligence (AI) in predicting the number and severity of accidents [30, 31]. Based on the recent studies carried out by some researchers on the safety of roads, neural network models had an acceptable level of accuracy in predicting road accidents over other techniques such as zero-inflated negative binomial, zero-inflated Poisson, negative binomial, and Poisson regression [32]. They are promising tools for evaluating complicated data and computing complex nonlinear problems. Because the internal structure of ANN models that do not give insights into the causal relationships between inputs and outputs, they are regarded as a black-box method [33–35]. Because of their accuracy and efficiency in recognizing the importance and amount of factors that affect accident severity, ANN models were considered a reliable tool in modeling techniques. In the present study, developing and comparing two ANN models, which include multilayer perceptron neural network (MLPNN) and radial basis function neural network (RBFNN), were considered.(1) MLPNN. The MLPNN has been one of the most common types of feedforward backpropagation neural networks that each neuron in one layer has directed connections to the neurons of the subsequent layer and the gradient of the loss function is computed with respect to the weights of the network for a single input-output example [36, 37], which have been used to predict the occurrence of traffic accidents. The framework of the MLPNN is as same as the single-layer perceptron neural network (SLPNN) with more hidden layers. At least three-node layers that include input, hidden, and output layers have usually been considered in the MLP model. In general, a supervised learning method called backpropagation is applied to train the model. In order for the model validation, the softmax activation function (AF) at the output layer and cross-entropy as the error function were used. The outputs are computed at the output layer as follows [38]:(4)yx=W0+∑j=1nWjfWj0+∑i=11λijXi,where W=W0,...,Wn and λ=λ10,...,λnI illustrate the weights in the second and first layers, respectively, and f is the AF. The hyperbolic tangent was used as an AF in the hidden layer as follows [38]:(5)fxj=tanhxj=e−xj−e−xje−xj+exj.Softmax was also applied as an AF in the output layer as follows:(6)fxj=exj∑exk.(2) RBFNN. The structure of the RBFNN model is similar to the structure of the MLPNN; however, the major difference between them is that the hidden layer of the RBFNN model includes nodes called RBF units. Two main parameters in the RBFNN models illustrate the position of its width or deviation and the function center. The hidden layer of the RBFNN model calculates the distance between the center of its RBF and an input data vector. The RBF has its peak by the zero distance between the input data vector and the RBF center and reducing progressively by increasing the distance; the output of the network is built as follows [39]:(7)yjx=∑i=1mwjifix+w0,where m is the number of hidden nodes, x = (x1 = vehicle type, x2 = driver age, …, xm = collision type) is the input data, wji illustrates the weight related to the ith hidden node to the jth output node, w0 is the bias value, and fi is the basis function of unit j. The Gaussian is one of the most common types of RBFNN [39].(8)fix=e−x−ci2/2σi,wherex is the input data, cj is the center for neuron j, and r is the spread of the basis function. A normalized RBF (NRBF) network is one of the Gaussian RBFNN types, using the softmax function; accordingly, the activations are normalized in the hidden units until the sum of them gets the value of one. An NRBF network with equal heights and unequal widths is written as follows [39]:(9)fixsoftmax=ehi∑i=1mehi,(10)hi=−∑k=12xk−cik22σi2,where xk is the input data (damage, and injury/fatal), cik is the center of the i-th hidden node related to the kth (k = 1, 2) input data, and softmax function (hi) is the output vector of the i-th hidden node.


## 2.3.1. Multiple Logistic Regression

The multiple logistic regression model is one of the most applicable and common models used to find the relationships between contributory factors and the dependent variable. This model can represent a closed form in suggesting the possibility of selecting choices interpreted. In order to create this model, two fundamental assumptions must be provided. The first assumption is that each independent variable is unique, which means that a unit value is for each variable. Second, the dependent variable is not entirely predictable from the independent variables. The independent assumption of variables is not required in this model [27, 28]. Logistic regression is another type of logit model employed for dichotomous dependent variables. This model is applied to predict accidents based on continuous and/or categorical independent variables. Since the occurrence of the dependent variable is binary (0 and 1), the logistic binary can be applied. The chances are calculated as follows [29]:(1)odds=Pi1−Pi,where Pi is the probability of an event and 1 − Pi is the probability of the lack of an event.Logarithm or logit related to success’s chance is achieved by performing the logarithm of equation (2) as follows:(2)LogitPi=LogPi1−Pi.The reverse transfer function, called antilogistics, is applied in computing likelihood in terms of logistics from [29] as follows:(3)LogitZi−1=ezi1−ezi.


## 2.3.2. Neural Network

ANN models have been recognized as one of the most common and applicable techniques of artificial intelligence (AI) in predicting the number and severity of accidents [30, 31]. Based on the recent studies carried out by some researchers on the safety of roads, neural network models had an acceptable level of accuracy in predicting road accidents over other techniques such as zero-inflated negative binomial, zero-inflated Poisson, negative binomial, and Poisson regression [32]. They are promising tools for evaluating complicated data and computing complex nonlinear problems. Because the internal structure of ANN models that do not give insights into the causal relationships between inputs and outputs, they are regarded as a black-box method [33–35]. Because of their accuracy and efficiency in recognizing the importance and amount of factors that affect accident severity, ANN models were considered a reliable tool in modeling techniques. In the present study, developing and comparing two ANN models, which include multilayer perceptron neural network (MLPNN) and radial basis function neural network (RBFNN), were considered.(1) MLPNN. The MLPNN has been one of the most common types of feedforward backpropagation neural networks that each neuron in one layer has directed connections to the neurons of the subsequent layer and the gradient of the loss function is computed with respect to the weights of the network for a single input-output example [36, 37], which have been used to predict the occurrence of traffic accidents. The framework of the MLPNN is as same as the single-layer perceptron neural network (SLPNN) with more hidden layers. At least three-node layers that include input, hidden, and output layers have usually been considered in the MLP model. In general, a supervised learning method called backpropagation is applied to train the model. In order for the model validation, the softmax activation function (AF) at the output layer and cross-entropy as the error function were used. The outputs are computed at the output layer as follows [38]:(4)yx=W0+∑j=1nWjfWj0+∑i=11λijXi,where W=W0,...,Wn and λ=λ10,...,λnI illustrate the weights in the second and first layers, respectively, and f is the AF. The hyperbolic tangent was used as an AF in the hidden layer as follows [38]:(5)fxj=tanhxj=e−xj−e−xje−xj+exj.Softmax was also applied as an AF in the output layer as follows:(6)fxj=exj∑exk.(2) RBFNN. The structure of the RBFNN model is similar to the structure of the MLPNN; however, the major difference between them is that the hidden layer of the RBFNN model includes nodes called RBF units. Two main parameters in the RBFNN models illustrate the position of its width or deviation and the function center. The hidden layer of the RBFNN model calculates the distance between the center of its RBF and an input data vector. The RBF has its peak by the zero distance between the input data vector and the RBF center and reducing progressively by increasing the distance; the output of the network is built as follows [39]:(7)yjx=∑i=1mwjifix+w0,where m is the number of hidden nodes, x = (x1 = vehicle type, x2 = driver age, …, xm = collision type) is the input data, wji illustrates the weight related to the ith hidden node to the jth output node, w0 is the bias value, and fi is the basis function of unit j. The Gaussian is one of the most common types of RBFNN [39].(8)fix=e−x−ci2/2σi,wherex is the input data, cj is the center for neuron j, and r is the spread of the basis function. A normalized RBF (NRBF) network is one of the Gaussian RBFNN types, using the softmax function; accordingly, the activations are normalized in the hidden units until the sum of them gets the value of one. An NRBF network with equal heights and unequal widths is written as follows [39]:(9)fixsoftmax=ehi∑i=1mehi,(10)hi=−∑k=12xk−cik22σi2,where xk is the input data (damage, and injury/fatal), cik is the center of the i-th hidden node related to the kth (k = 1, 2) input data, and softmax function (hi) is the output vector of the i-th hidden node.


## 2.4. Performance Evaluation

To compare the predictive performance of the developed models, five criteria of root mean square error (RMSE), mean square error (MSE), mean absolute error (MAE), mean absolute percentage error (MAPE), and average absolute deviation (MAD) were employed. The RMSE, MSE, MAE, MAPE, and MAD indicate the differences between predicted and actual values. In comparing, the lower values of RMSE, MSE, MAE, MAPE, and MAD, the better performance of the model. Equations (11)–(15) define the RMSE, MSE, MAE, MAPE, and MAD, respectively. To evaluate the performance of models with different architectures, we calculated each criterion for models to determine which one reaches the greatest accuracy [40–48].(11)RMSE=∑i=1nPi−Ai2N,(12)MSE=1N∑i=1nPi−Ai2,(13)MAE=1N∑i=1nPi−Ai,(14)MAPE=1N∑i=1nAi−Pi2Ai,(15)MAD=1N∑i=1nPi−Ai,where N is the amount of data for the training set and P, A, and Ai¯ are actual values, predicted values, and the average of actual values, respectively.


## 3. Results

### 3.1. Frequency Analysis

#### 3.1.1. The Evaluation of Accident Year

As shown in Figure1(a), vehicle accidents had an overall upward trend. The highest percentage of accidents happened in 2019–2020 (n = 947), and the lowest rate of accidents occurred in 2017–2018 (n = 775). Overall, from 2017 to 2020, 2,585 vehicle accidents occurred, of which 77.9% (2013) were damaged, and 22.1% (571) were injury/dead accidents. As shown in Figure 1(b), the greatest rate of male and female accidents occurred in 2019–2020 (36.35%) and 2017–2018 (1.61%), respectively. Figure 1(c) represents that the rural accidents in Tehran often resulted in damage. The greatest percentage of damage (29.57%) and fatal/injury (7.43%) accidents happened in 2019–2020.Figure 1
Statistics of vehicle accidents based on: (a) accident year, (b) severity of accidents and accident year, and (c) gender of the driver and accident year.
(a)(b)(c)


#### 3.1.2. The Evaluation of Accident Time

As shown in Figure2(a), the greatest percentage of traffic accidents for both males and females (41.6%) happened from 12:00 to 18:00, of which 40.36% were males and the rest (1.24%) were females. Given Figure 2(b), 28.84% of vehicle accidents as the largest percentage resulted in damages, and the rest (12.8%) resulted in fatalities and injuries between 12:00 and 18:00.Figure 2
Statistics of vehicle accidents based on accident time: (a) gender of the driver and (b) severity of accidents.
(a)(b)


#### 3.1.3. Evaluation of Collision Type

As shown in Figure3(a), 62.19% of traffic accidents were related to single vehicle as the largest percentage, of which 60.30% were males and 1.89% were females, and the minimum percentages of vehicle accidents were related to overturning motorcycle. Based on Figure 3(b), the largest and the least percentage of fatal/injury was related to single-vehicle (13.04%) and overturning motorcycle (0.18%), respectively.Figure 3
Statistics of vehicle accidents based on collision type: (a) gender of the driver and (b) severity of accidents.
(a)(b)


#### 3.1.4. Evaluation of Accident Day

Figure4(a) shows that the largest percentage of accidents (48.9%) occurred in the middle of the week, of which 47.2% were male drivers and 1.69% were female drivers. The least accident occurred on weekends (22.3%), of which 21.8% and 0.5% were males and females, respectively. According to Figure 4(b), from these days, 38.88% of accidents resulted in damage accidents, and 10.02% were fatal/injury.Figure 4
Statistics of vehicle accidents based on accident day: (a) gender of the driver and (b) severity of accidents.
(a)(b)


#### 3.1.5. Evaluation of Accident Reason

As shown in Figure5(a), the highest percentage in males and females (27.3%) was related to not paying attention to the front (males and females accounted for 26.98% and 0.31%, respectively). The least percentage in males and females was related to fatigue and drowsiness, which was 0.43% and 0.07%, respectively. Also, Figure 5(b) indicates fatigue and drowsiness had the least percentage of damage (0.43%) and fatal/injury (0.07%) accidents.Figure 5
Statistics of vehicle accidents based on the reason of accident: (a) gender of the driver and (b) severity of accidents.
(a)(b)


#### 3.1.6. Evaluation of Age

As shown in Figure6(a), the highest accident rates of males and females were in the age group of 30 to 45 (46.68% and 1.31%, respectively). The lowest accident rate was 2.3%, with the age group less than or equal to 18, of which 2.07% were males, and the rest (0.23%) were females. According to Figure 6(b), the age group 30–45 years had the highest percentage of damage (38.44%) and fatal/injury (9.56%).Figure 6
Statistics of vehicle accidents based on age: (a) gender of the driver and (b) severity of accidents.
(a)(b)


#### 3.1.7. Evaluation of Type of Vehicle Accidents

As shown in Figure7(a), truck vehicles had the largest percentage among other types of vehicles involved in road accidents, of which 21.83% of accidents were males, and only 0.57% of accidents were females. The results of Figure 7(b) show that the largest portion of both fatal/injury and damage (22.39%) accidents was related to truck vehicles (18.07% for damage and 4.32% for fatal/injury).Figure 7
Statistics of vehicle accidents based on vehicle type: (a) gender of the driver and (b) severity of accidents.
(a)(b)


#### 3.1.8. Evaluation of Education Rate

According to Figure8(a), most of the accidents (43.9%) occurred by people having diploma degrees, of which 42.78% were males and 1.12% were females. As shown in Figure 8(b), the largest percentage of traffic accidents that resulted in damage and fatal/injury accidents was also related to people having diploma degrees (33.22%, and 10.6%, respectively).Figure 8
Statistics of vehicle accidents based on education rate: (a) gender of the driver and (b) severity of the accident.
(a)(b)


#### 3.1.9. Evaluation of Weather Conditions

According to Figure9(a), the greatest accident rates for males and females were recorded in clear weather (81.22% for males and 1.27% for females), and stormy weather had the least accident rate for both males and females (0.63% and 0.07%, respectively). Figure 9(b) shows that the largest percentage (82.5%) of accidents was related to clear weather (63.66% for damage and 18.83% for fatal/injury).Figure 9
Statistics of vehicle accidents based on the condition of weather: (a) gender of the driver and (b) severity of the accident.
(a)(b)


### 3.2. Kolmogorov–Smirnov Test

A related statistical test is needed to evaluate the data normality. So the K-S test was utilized to check the normality of the data. The results of the K-S test are indicated in Table2. Based on Table 2, all significance levels in the K-S test were less than 0.05, and regarding the 5% error, the null hypothesis (H0) was rejected, indicating that the natural distribution of variables and H1 was accepted. Therefore, because of the lack of data normality, the nonparametric tests could have been applied.Table 2
The Kolmogorov–Smirnov test results.
Most extreme differencesNumberVariablesAbsolutePositiveNegativeTest statisticAsymp. sig. (2-tailed)1Reason of accident0.1730.173−0.1518.8150.02Gender of the driver0.5390.539−0.43127.3810.03Time of accident0.2300.186−0.23011.6740.04Type of collision0.3620.362−0.26018.3910.05Day of accident0.2490.241−0.24912.6350.06Age0.2450.245−0.23512.4500.07Vehicle type0.1810.145−0.1819.1290.08Education rate0.2490.249−0.19112.6490.09Weather condition0.4740.474−0.35124.1100.0


### 3.3. Friedman Test

In the presented paper, the Friedman test was used to analyze the rank of each variable. The FT was applied to examine the rank equality related to parameter levels. The level of significance, chi-square value, degrees of freedom, and statistical significance of the statistical sample volume, andα that is illustrated by sig. are reported in Table 3.Table 3
Results of the Friedman test.
Number of dataChi-squareDegrees of freedomAsymp. sig.2,5859,735.06480.0As shown in Table3, the significance level of less than 5% is indicative of rejecting H0, and equal rank claims for these four named parameters were not accepted. Thus, ratings were inconsistent. Table 4 reports the ranking condition of each variable, representing the average score for independent variables: the lower the average rating, the more influential the variable.Table 4
Mean rank in the Friedman test.
VariablesMeanRankGender of the driver2.171Weather condition2.712Collision type4.123Accident day4.124Accident time5.745Driver age5.816Education rate6.487Accident reason6.628Vehicle type7.249Table4 indicates that the parameters of gender of the driver, weather condition, collision type, and accident day were considered the most significant parameters on accident severity, respectively, with values of 2.17, 2.71, and 4.12, respectively. On the other hand, the variables of education rate, accident reason, and vehicle type had the least influence on accident occurrence. It can be concluded that gender of the driver had a significant influence on accident severity, which means that the role of humans should be considered as an important factor, and the condition of weather was recognized as the second most factor that increased accident rate. The collision type and accident day parameters were also detected as the third and fourth factors, which affected accident severity.


### 3.4. Factor Analysis

Table5 reports the results of the Kaiser–Meyer–Olkin (KMO) index and Bartlett’s test in the factor analysis. The closer the value of the KMO index to 1, the better the result of factor analysis. Based on Table 5, the value of the KMO index was 0.524, which shows that the factor analysis is appropriate. Bartlett’s test confirms that there is no correlation between variables achieved from the significant level of chi-square. The chi-square value was much greater than 5. Also, the significant level was lower than 0.05; in other words, it means that the alternative hypothesis was affirmed, and a significant correlation existed among the parameters. Thus, all factors in the study affected accident occurrence.Table 5
The KMO and Bartlett’s test.
KMO measure of sampling adequacy0.524Approx. chi-squareApprox. chi-square479.993df36Sig.0.00Table6 reports the variance and eigenvalues corresponding to components. In order for the remaining components in the model, it is required for each component to have values that are greater than 1. As shown in Table 6, components 1 to 4 had values larger than 1. The first block included three columns with labels of initial eigenvalues related to the eigenvalues of the correlation matrix. Eigenvalues are the values estimated by special factors, and the total variance for each test is equal to 100%. The eigenvalue for the first factor was 1.335. Other eigenvalues for later factors are reported in Table 6. The four components that had values greater than 1 could estimate the variability of variables and variances containing about 53% of the variance. The second block included the three columns with labels of extraction total of squared loadings, and rotation total of squared loadings are not represented. Table 6 also displays the rotation matrix of the remaining components. The principal component analysis is the extraction technique used for both matrices, and the method of rotation is Equamax using Kaiser normalization. The values of the correlation degree of the proper parameters related to components are represented in Table 6.Table 6
Total variance explained.
Initial eigenvaluesExtraction sums of squared loadingsRotation sums of squared loadingsComponentTotal% of varianceCumulative %Total% of varianceCumulative %Total% of varianceCumulative %11.33514.83414.8341.33514.83414.8341.30814.52814.52821.28714.29529.1291.28714.29514.2951.27114.12328.65231.14912.76841.8971.14912.76841.8971.17913.10241.75441.03611.50653.4031.03611.50653.4031.04811.65053.40350.99510.60964.01260.8999.98773.99970.8229.13483.13380.7778.63691.76990.7418.231100.00Table7 represents the components matrix, which includes nine variables in eight factors extracted. Once these factors have no correlation with each other, these factors are the same correlation coefficients between variables in factors. Therefore, the closer the absolute value is to 1, the greater the role of the desired factor in the total variance of numbers. In order to decline the difficulty of interpreting nonrotating component loads, the component matrix was rotated. The aim of the rotated component matrix was to create a new condition for factors to make a better interpretation. The effect of variables on the severity of accidents is explained in the factor analysis, and the higher the absolute value of variables, the more influential the relevant component in the total changes of variables.Table 7
Component matrix before rotation.
ComponentVariables1234Reason of accident0.1220.5820.1500.359Gender of the driver0.1210.2640.7550.055Collision type0.411−0.347−0.085−0.087Accident time0.5000.454−0.0130.075Accident day0.4750.284−0.045−0.300Driver age0.629−0.3180.058−0.072Vehicle type0.512−0.2820.0430.199Education rate−0.0150.070−0.0380.874Weather condition0.0430.5330.756−0.061The results of Table8 indicated that driver age, vehicle type, and collision type variables were under the first component, and the coefficients of significance between the first component and each parameter were 0.719, 0.637, and 0.528 positives, respectively. Thus, driver age, vehicle type, and collision type variables were recognized as the most influential factors, which affect accident severity on Tehran province rural roads. In addition, accident time, accident day, and reason of accident variables with positive values of 0.755, 0.641, and 0.508, respectively, under the second most component had a significant impact on increasing the severity of accidents. Similarly, the variables of weather condition and gender of the driver with scores of 0.756, and 0.755, respectively, were under the third component, and then education rate with a coefficient of 0.874 was considered the most influential parameter in increasing the severity of accidents on rural roads of Tehran province.Table 8
Rotated component matrix.
ComponentVariables1234Reason of accident−0.2240.5080.1500.359Gender of the driver0.131−0.1010.7550.055Collision type0.528−0.010−0.085−0.087Accident time0.0740.755−0.0130.075Accident day0.1140.641−0.045−0.300Driver age0.7190.0760.058−0.072Vehicle type0.6370.0090.0430.199Education rate0.048−0.029−0.0380.874Weather condition−0.1360.1200.756−0.061


### 3.5. Logit Model

Multiple logistic regression was applied in the presented research to predict the severity of accidents. In designing the logit model, 64 independent variables and 2 dependent variables were set and then modeled. Generally, there are three techniques to enter the variables in developing the model. The common method used for modeling is the entering method; however, it has its own disadvantages, in which the model cannot process the data correctly and recognize the effective variables. So, because of this limitation, the forward and backward stepwise methods are commonly utilized in processing the data. Afterward, two criteria ofR2 and the correct percentage were considered to choose the superior method. As shown in Table 9, the values of the correct percentage and the goodness of fit of the backward were greater than the forward. Due to its accuracy in predicting accident severity, the backward method with the correct percentage of 78.5% and the R2 value of 0.324 was chosen as a superior method to create the logit model on rural roads of Tehran province.Table 9
Summary of the forward and backward methods of accident severity.
NumberLogit regression methodsCorrect percentageGoodness of fit (R2)1Forward stepwise78.10.2132Backward stepwise78.50.324Table10 shows that out of 2013 damage accidents, 1,996 accidents were correctly predicted, and out of 572 fatal and injury accidents, only 33 cases were properly predicted by the model. The predictive values of the logit model related to damage and fatal/injury accidents were measured to be 99.2% and 5.8%, respectively. Accordingly, the model’s capability was better to classify and separate the damage accidents in comparison to fatal/injuries ones. Also, the overall percentage of the model in recognizing accident severity was 78.5%. The poor ability of the model to predict fatal and injury accidents does not mean that this model is inaccurate.Table 10
Classification table in the logit model.
ObservedPredictedAccident severityPercentage correctDamageFatal and injuryAccident severityDamage1,9961799.2Fatal and injury539335.8Overall percentage78.5For modeling the severity of accidents, 64 independent variables were fitted into the model by the use of the backward method and then reduced to include 12 independent variables found as the significant variables in predicting accident severity. As shown in Table11, the statistics of each variable indicate that the variables of exceeding lawful speed, vehicle-motorcycle, overturning-motorcycle, 12:00 to 18:00, KIA Pride vehicle, Samand vehicle, pickup vehicle, trailer vehicle, bus vehicle, and education rate of elementary, high school, and diploma had the greatest effect on the severity of accidents leading to damage and injury/fatal accidents in Tehran. Moreover, the most significant factors that increase the severity of accidents were 12:00 to 18:00 time, pickup vehicles, KIA Pride vehicles, and education rate of elementary, diploma, and high school. On the other hand, the most influential variable reducing accident occurrence was exceeding lawful speed. The result of the logit model represented that the impact of 12:00 to 18:00 time variable had the highest on increasing the likelihood of vehicle accidents and then pickup vehicles had the most influence on increasing the accident rate. Therefore, regarding the high rate of accidents at 12:00 to 18:00 time, the presence and controlling police at this time may have a suitable impact on reducing the occurrence of accidents. In addition, installing strong lighting along the road at the time of 12:00 to 18:00, especially in the winter (due to the darkness of the air at 17:00), can be considered an effective way to reduce the severity of the accidents. Considering the vehicle manufacturers to design the vehicles with high and safe quality as well as address their technical problems will have a direct impact on declining the severity of these accidents.Table 11
The results of logit analysis in the first step.
VariablesβS.E.WaldSigExp (β)Exceeding lawful speed−1.6180.7085.2150.0220.198Vehicle motorcycle0.4610.2682.9550.0861.585Overturning motorcycle1.1560.6732.9460.0863.17712:00 to 18:000.9720.13651.2200.0002.644KIA Pride0.4860.2274.5840.0321.625Samand0.6350.3403.4910.0621.887Pickup0.6790.2308.6810.0031.972Trailer0.4210.2413.0490.0811.524Bus1.1830.6313.5190.0613.265Elementary2.1331.0414.1990.0408.442High school2.0481.0333.9300.0477.754Diploma2.1061.0324.1640.0418.214Constant−4.5601.33511.6650.0010.010Table12 reports the values of significance (sig.), degree of freedom (df), and chi-square of the backward method in the first step of the modeling process. The chi-square value of the logit model related to step 1 was 217.333 with a significant value of less than 5%, which means that the predictive power of the model for accidents was affirmed.Table 12
The backward stepwise model results.
Chi-squareDfSig.Step 1Step217.333560.00Block217.333560.00Model217.333560.00


### 3.6. ANN Models

#### 3.6.1. MLPNN

In the current research, the number of accidents leading to damage, and fatal injury was developed by the MLPNN model. In designing the model, 70% of the data were selected to train the network, and the remaining 30% were considered for testing. The number of input variables entered in the MLPNN model was 9, each of which was divided into different categories. The numbers of neurons in the input and output layers were 64 and 2, respectively. The automatic architecture was applied to develop the model, which computed six neurons in the hidden layer and selected one hidden layer for the model. Table13 represents the correct percentage of the MLPNN model for each category. Table 13 reports that among 1,426 cases related to damage accidents, 1,409 cases were accurately predicted by the MLPNN model, and out of 403 cases related to fatal-injury accidents, only 37 cases were accurately classified by the model. Overall, in the training sample, 98.8% of cases were predicted, and 1.2% of cases related to damage accidents were not accurately predicted. Moreover, the cross-entropy error was considered a criterion to evaluate the MLPNN model in predicting accidents. The results showed that the values of training and testing samples were 860, 985, and 383.342, respectively. According to Figure 10, the receiver operating characteristic (ROC) curve is a plot of the sensitivity versus specificity of a diagnostic test utilized to visualize and organize the classification of the model in forecasting each category of accidents. The value of the area under the curve (AUC) can be different from 0 to 1; the closer the value to 1, the more precise classification of the model (27). In addition, the value of AUC should not be less than 0.5. According to Table 14, in this model, the likelihood of accidents that led to damage and fatal/injury was calculated to be 0.693, larger than 0.5, meaning that the classification of the model was in a good range. Figure 11 also represents the relative importance of independent variables for the MLPNN model, which indicates the extent of the effect of the independent variables in predicting accidents. Normalization of this significance was achieved by dividing the importance values by their highest value and defined as a percentage. As shown in Figure 11, the variables of gender of the driver, accident time, weather condition, driver age, and education rate were found as the most significant variables of the severity of accidents, respectively. Moreover, Figure 11 shows that gender of the driver had the greatest indication of all parameters, which affect accident severity.Table 13
Classification in the MLPNN model.
PredictedSampleObservedDamageFatal and injuryCorrect percentage (%)TrainingDamage1,4091798.8Fatal and injury366379.2Overall percentage (%)97.03.079.1TestingDamage5771098.3Fatal and injury157127.1Overall percentage (%)97.12.977.9Figure 10
The ROC curve for the MLPNN model.Table 14
The area under the curve for the MLPNN model.
AreaAccident severityDamage0.693Fatal/injury0.693Figure 11
Independent variable importance chart in the MLPNN model.


#### 3.6.2. RBFNN

At first, in designing the RBFNN model, the data set was divided into 70% and 30% for training and testing, respectively. The numbers of neurons in input and output layers were measured to be 64 and 2, respectively. In order to develop the RBFNN model, the automatic architecture computed 9 neurons in the hidden layer. Table15 indicates the classifying of the prediction of damage and fatal/injury accidents. The RBFNN model correctly predicted 78.8% of cases. Among 1,402 cases related to damage accidents, all cases were correctly predicted with the correct percentage of 100, but among 379 cases of fatal/injury accidents, only 2 cases were correctly predicted. Therefore, the model was capable of predicting damage accidents, but it was not able to predict accidents leading to fatal/injury. In addition, the values of cross-entropy error for training and testing were found to be 296.281 and 126.994, respectively. Figure 12 represents the ROC curve for the damage and fatal/injury accidents. As shown in Table 16, the values of AUC for both damage and fatal/injury accidents were measured to be 0.635, which is larger than 0.5, meaning that the response of the RBFNN model is positive. The independent variable importance, which affects accident severity, is shown in Figure 13.Table 15
Classification in the RBFNN model.
PredictedSampleObservedDamageFatal and injuryCorrect percentage (%)TrainingDamage1,4020100.0Fatal and injury37720.5Overall percentage (%)99.90.178.8TestingDamage6110100.0Fatal and injury19210.5Overall percentage (%)99.90.176.1Figure 12
The ROC curve for the RBFNN model.Table 16
The area under the curve for the RBFNN model.
AreaAccident severityDamage0.635Fatal/injury0.635Figure 13
Independent variable importance chart in the RBF model.


### 3.7. Validation of the Machine Learning Models

#### 3.7.1. Development of Mathematical Models

In order to prove the proposed models, several ANN models using MATLAB programming with a different learning method and active functions were developed and then trained on the data to evaluate the performance of the machine learning methods. In this section, 40 multilayer perceptron network (MLP) models with different structures were built. In order to have an effective comparison between the machine learning methods and the mathematical models (MLP) used for validation, the partitioning data set, as same as the machine learning methods, was considered to design MLP models. Thus, 70% of the data were utilized for training, and 30% were used for validation. The criterion in dividing the data set was to determine enough samples for the ANN training and the rest for cross-validation. Selecting the right architecture, transfer functions, training algorithm, and the number of neurons in the hidden layer is regarded as the critical factors in creating models. The best method for training is that once making the network convergent and having minimum, the error function of the training has the modeling capability by providing new data. Among the several methods for training, the Levenberg–Marquardt (LM) algorithm has the best acceleration to train neurons in comparison to other kinds of methods (Bayesian regularization-scaled conjugate gradient). This method, which is different from the method of machine learning approaches, can be used to train the network with a large number of variables. Its most prominent feature is ensuring the model’s convergence and convergence speed. Thus, the Levenberg–Marquardt (LM) algorithm was applied to train the neural networks.


#### 3.7.2. Model Details

Log-sigmoid function was used as the activation function. Initially, the developed models were trained using the training set and afterward, they should be validated using the validation set. Since during the training process, the initial weights were randomly chosen, and there was a probability the network fell into a local minimum; the networks were initially trained using one hidden layer and various numbers of neurons. Each model was developed for 14 iterations, and the results were recorded. A similar process was then repeated for models with 2 hidden layers. The 40 different network structures as well as the accuracy of their prediction are shown in Table17. Afterward, the optimum network structure was chosen by comparing the results of different structures.Table 17
Different ANN structures for the prediction of accident severity.
ModelHidden layerHidden neuronsRMSETrainingValidationM1130.39560.3985M2160.37310.3986M31100.37270.3993M41150.37940.3885M51200.36880.3952M61230.35990.3905M71250.35580.4129M81280.36650.3864M91300.37160.4027M101330.36650.4041M111350.36070.3963M121400.36620.3983M131430.38740.3775M141450.36290.4034M151480.34880.4011M161500.34360.4092M171520.36290.3930M181550.33930.3980M191580.34580.4029M201600.37580.3921M2124–70.41740.4026M2224–60.38060.3914M2325–100.37390.3965M2428–140.37410.4018M2529–170.36150.3855M26212–200.36450.3951M27214–230.34390.4073M28216–270.35340.4068M29218–310.34610.4092M30221–340.38480.4003M31224–370.37320.4012M32226–390.35360.3817M33229–410.36540.3944M34231–440.35860.3854M35232–470.33640.4058M36234–510.34490.4263M37238–540.33960.3951M38241–560.31460.4060M39244–570.30340.4042M40245–600.34280.3950


#### 3.7.3. Determination of the Optimized Model

Forty models with different structures have been developed to train on the data set. The specification of 40 models with various structures is represented in Table17. For both stages of training and validation, two comparison criteria have been utilized in order to compare these diverse neural network architectures, which included RMSE. An important question may arise as to how we can determine the best network structure associated with the least amount of variance. The most ideal range for selecting an optimum model is in which the training and validation error graphs start converging with each other. Thus, this research used the values of RMSE as the error criterion. In other words, the criteria for selecting the optimized model are based on the values of training RMSE and validation RMSE. According to Figure 14, the optimized model is achieved in which both the values of training RMSE and validation RMSE are at the minimum level and have a little difference (corresponding to each other) [49]. As shown in Figure 14, the horizontal axis is indicative of the number of neurons in the hidden layer, and the vertical axis is indicative of the training RMSE and validation RMSE values. Initially, the number of neurons is small, and the values of the training RMSE and validation RMSE are very close to each other; however, by moving toward the right side of the plot, meaning that the number of neurons is increased, it is indicated the values of the training RMSE and validation RMSE will be going to be far away from each other (high variances). By comparing 40 models (both single layer and double layers), it is clearly shown that the best architecture for the network is the neural network with 3 neurons in 1 hidden layer (M1), an optimal selection. Model M1 has the least amount of difference between the values of the training RMSE and validation RMSE compared to other models. The results of each network training are represented in Figure 15. As can be seen in Figure 15, in prediction model M1, the training procedure has reached the best value for validation error after 14 repeats. It can be seen in Figure 15 that by increasing the number of epochs, the amount of MSE is reduced, improving the performance of the model both in the training and validation phase. Figure 15 represents the prediction model M1 had the minimum MSE compared to other networks.Figure 14
The number of neurons sets based on the values of RMSE for the developed models.Figure 15
MSE versus epoch curve for best six models.


### 3.8. Performance Comparison of Mathematical Models with the Machine Learning Methods

In this section, since the aim was to analyze the performance of machine learning methods, the comparison was made between the ANN (MLP and RBF) models developed by the scaled conjugate gradient (SCG) method for training neurons to six kinds of ANN (M1, M4, M13, M20, M22, and M30) models trained by Levenberg–Marquardt (LM) algorithm. In addition, the active function used for machine learning methods (MLP and RBF) was the hyperbolic tangent, and the active function utilized for MLP models was log-sigmoid. In order to prove the machine learning methods, after the training set was done, the performance of the trained model was analyzed; for this purpose, the error criteria of root mean square error (RMSE), mean square error (MSE), mean absolute error (MAE), mean absolute percentage error (MAPE), and average absolute deviation (MAD) were considered to compare the performance of the mathematical models with machine learning methods. These approaches used for evaluating the performances of machine learning models have been applied in earlier studies [50, 51]. In this study, the SPSS and MATLAB software programs were utilized to assess the obtained results. Furthermore, the optimum model (M1), as well as the models with suitable performances, were determined to analyze the efficiency of machine learning methods (as shown in Table 18). In the stage of training, the comparison of the obtained results indicated that with respect to the values of RMSE (the machine learning method) equal to 0.4679 and 0.4683, there is a slight difference between the results of the machine learning method and other ANN models (with the values of RMSE = 0.3956, 0.3794, 0.3874, 0.3758, 0.3806, and 0.3848). A similar conclusion can be found by comparing the other criteria such as MSE, MAE, MAPE, and MAD. As a result of comparing the mentioned approaches, it can be concluded that the difference between the developed models used for validation and the machine learning methods was a little (as shown in Table 18). Therefore, the performance of the machine learning methods can be proved in terms of accuracy and efficiency, showing that these methods can be considered robust and accurate models for predicting the severity of accidents.Table 18
Performance comparison between the mathematical models and machine learning models.
ModelRMSEMSEMAEMAPE (%)MADLearning methodActive functionHidden layerHidden neuronsMLPNN0.46790.21890.221211.12180.2212SCGTanh16RBFNN0.46830.21930.219211.08310.2176SCGTanh19M10.39560.15650.004612.5790.0045LMSigmoid13M40.37940.14390.014713.2100.0156LMSigmoid115M130.38740.15010.015913.5500.0675LMSigmoid143M200.37580.14120.078113.4300.0092LMSigmoid160M220.38060.14480.087713.9600.0597LMSigmoid24–6M300.38480.14810.051713.2100.0041LMSigmoid221–34


## 3.1. Frequency Analysis

### 3.1.1. The Evaluation of Accident Year

As shown in Figure1(a), vehicle accidents had an overall upward trend. The highest percentage of accidents happened in 2019–2020 (n = 947), and the lowest rate of accidents occurred in 2017–2018 (n = 775). Overall, from 2017 to 2020, 2,585 vehicle accidents occurred, of which 77.9% (2013) were damaged, and 22.1% (571) were injury/dead accidents. As shown in Figure 1(b), the greatest rate of male and female accidents occurred in 2019–2020 (36.35%) and 2017–2018 (1.61%), respectively. Figure 1(c) represents that the rural accidents in Tehran often resulted in damage. The greatest percentage of damage (29.57%) and fatal/injury (7.43%) accidents happened in 2019–2020.Figure 1
Statistics of vehicle accidents based on: (a) accident year, (b) severity of accidents and accident year, and (c) gender of the driver and accident year.
(a)(b)(c)


### 3.1.2. The Evaluation of Accident Time

As shown in Figure2(a), the greatest percentage of traffic accidents for both males and females (41.6%) happened from 12:00 to 18:00, of which 40.36% were males and the rest (1.24%) were females. Given Figure 2(b), 28.84% of vehicle accidents as the largest percentage resulted in damages, and the rest (12.8%) resulted in fatalities and injuries between 12:00 and 18:00.Figure 2
Statistics of vehicle accidents based on accident time: (a) gender of the driver and (b) severity of accidents.
(a)(b)


### 3.1.3. Evaluation of Collision Type

As shown in Figure3(a), 62.19% of traffic accidents were related to single vehicle as the largest percentage, of which 60.30% were males and 1.89% were females, and the minimum percentages of vehicle accidents were related to overturning motorcycle. Based on Figure 3(b), the largest and the least percentage of fatal/injury was related to single-vehicle (13.04%) and overturning motorcycle (0.18%), respectively.Figure 3
Statistics of vehicle accidents based on collision type: (a) gender of the driver and (b) severity of accidents.
(a)(b)


### 3.1.4. Evaluation of Accident Day

Figure4(a) shows that the largest percentage of accidents (48.9%) occurred in the middle of the week, of which 47.2% were male drivers and 1.69% were female drivers. The least accident occurred on weekends (22.3%), of which 21.8% and 0.5% were males and females, respectively. According to Figure 4(b), from these days, 38.88% of accidents resulted in damage accidents, and 10.02% were fatal/injury.Figure 4
Statistics of vehicle accidents based on accident day: (a) gender of the driver and (b) severity of accidents.
(a)(b)


### 3.1.5. Evaluation of Accident Reason

As shown in Figure5(a), the highest percentage in males and females (27.3%) was related to not paying attention to the front (males and females accounted for 26.98% and 0.31%, respectively). The least percentage in males and females was related to fatigue and drowsiness, which was 0.43% and 0.07%, respectively. Also, Figure 5(b) indicates fatigue and drowsiness had the least percentage of damage (0.43%) and fatal/injury (0.07%) accidents.Figure 5
Statistics of vehicle accidents based on the reason of accident: (a) gender of the driver and (b) severity of accidents.
(a)(b)


### 3.1.6. Evaluation of Age

As shown in Figure6(a), the highest accident rates of males and females were in the age group of 30 to 45 (46.68% and 1.31%, respectively). The lowest accident rate was 2.3%, with the age group less than or equal to 18, of which 2.07% were males, and the rest (0.23%) were females. According to Figure 6(b), the age group 30–45 years had the highest percentage of damage (38.44%) and fatal/injury (9.56%).Figure 6
Statistics of vehicle accidents based on age: (a) gender of the driver and (b) severity of accidents.
(a)(b)


### 3.1.7. Evaluation of Type of Vehicle Accidents

As shown in Figure7(a), truck vehicles had the largest percentage among other types of vehicles involved in road accidents, of which 21.83% of accidents were males, and only 0.57% of accidents were females. The results of Figure 7(b) show that the largest portion of both fatal/injury and damage (22.39%) accidents was related to truck vehicles (18.07% for damage and 4.32% for fatal/injury).Figure 7
Statistics of vehicle accidents based on vehicle type: (a) gender of the driver and (b) severity of accidents.
(a)(b)


### 3.1.8. Evaluation of Education Rate

According to Figure8(a), most of the accidents (43.9%) occurred by people having diploma degrees, of which 42.78% were males and 1.12% were females. As shown in Figure 8(b), the largest percentage of traffic accidents that resulted in damage and fatal/injury accidents was also related to people having diploma degrees (33.22%, and 10.6%, respectively).Figure 8
Statistics of vehicle accidents based on education rate: (a) gender of the driver and (b) severity of the accident.
(a)(b)


### 3.1.9. Evaluation of Weather Conditions

According to Figure9(a), the greatest accident rates for males and females were recorded in clear weather (81.22% for males and 1.27% for females), and stormy weather had the least accident rate for both males and females (0.63% and 0.07%, respectively). Figure 9(b) shows that the largest percentage (82.5%) of accidents was related to clear weather (63.66% for damage and 18.83% for fatal/injury).Figure 9
Statistics of vehicle accidents based on the condition of weather: (a) gender of the driver and (b) severity of the accident.
(a)(b)


## 3.1.1. The Evaluation of Accident Year

As shown in Figure1(a), vehicle accidents had an overall upward trend. The highest percentage of accidents happened in 2019–2020 (n = 947), and the lowest rate of accidents occurred in 2017–2018 (n = 775). Overall, from 2017 to 2020, 2,585 vehicle accidents occurred, of which 77.9% (2013) were damaged, and 22.1% (571) were injury/dead accidents. As shown in Figure 1(b), the greatest rate of male and female accidents occurred in 2019–2020 (36.35%) and 2017–2018 (1.61%), respectively. Figure 1(c) represents that the rural accidents in Tehran often resulted in damage. The greatest percentage of damage (29.57%) and fatal/injury (7.43%) accidents happened in 2019–2020.Figure 1
Statistics of vehicle accidents based on: (a) accident year, (b) severity of accidents and accident year, and (c) gender of the driver and accident year.
(a)(b)(c)


## 3.1.2. The Evaluation of Accident Time

As shown in Figure2(a), the greatest percentage of traffic accidents for both males and females (41.6%) happened from 12:00 to 18:00, of which 40.36% were males and the rest (1.24%) were females. Given Figure 2(b), 28.84% of vehicle accidents as the largest percentage resulted in damages, and the rest (12.8%) resulted in fatalities and injuries between 12:00 and 18:00.Figure 2
Statistics of vehicle accidents based on accident time: (a) gender of the driver and (b) severity of accidents.
(a)(b)


## 3.1.3. Evaluation of Collision Type

As shown in Figure3(a), 62.19% of traffic accidents were related to single vehicle as the largest percentage, of which 60.30% were males and 1.89% were females, and the minimum percentages of vehicle accidents were related to overturning motorcycle. Based on Figure 3(b), the largest and the least percentage of fatal/injury was related to single-vehicle (13.04%) and overturning motorcycle (0.18%), respectively.Figure 3
Statistics of vehicle accidents based on collision type: (a) gender of the driver and (b) severity of accidents.
(a)(b)


## 3.1.4. Evaluation of Accident Day

Figure4(a) shows that the largest percentage of accidents (48.9%) occurred in the middle of the week, of which 47.2% were male drivers and 1.69% were female drivers. The least accident occurred on weekends (22.3%), of which 21.8% and 0.5% were males and females, respectively. According to Figure 4(b), from these days, 38.88% of accidents resulted in damage accidents, and 10.02% were fatal/injury.Figure 4
Statistics of vehicle accidents based on accident day: (a) gender of the driver and (b) severity of accidents.
(a)(b)


## 3.1.5. Evaluation of Accident Reason

As shown in Figure5(a), the highest percentage in males and females (27.3%) was related to not paying attention to the front (males and females accounted for 26.98% and 0.31%, respectively). The least percentage in males and females was related to fatigue and drowsiness, which was 0.43% and 0.07%, respectively. Also, Figure 5(b) indicates fatigue and drowsiness had the least percentage of damage (0.43%) and fatal/injury (0.07%) accidents.Figure 5
Statistics of vehicle accidents based on the reason of accident: (a) gender of the driver and (b) severity of accidents.
(a)(b)


## 3.1.6. Evaluation of Age

As shown in Figure6(a), the highest accident rates of males and females were in the age group of 30 to 45 (46.68% and 1.31%, respectively). The lowest accident rate was 2.3%, with the age group less than or equal to 18, of which 2.07% were males, and the rest (0.23%) were females. According to Figure 6(b), the age group 30–45 years had the highest percentage of damage (38.44%) and fatal/injury (9.56%).Figure 6
Statistics of vehicle accidents based on age: (a) gender of the driver and (b) severity of accidents.
(a)(b)


## 3.1.7. Evaluation of Type of Vehicle Accidents

As shown in Figure7(a), truck vehicles had the largest percentage among other types of vehicles involved in road accidents, of which 21.83% of accidents were males, and only 0.57% of accidents were females. The results of Figure 7(b) show that the largest portion of both fatal/injury and damage (22.39%) accidents was related to truck vehicles (18.07% for damage and 4.32% for fatal/injury).Figure 7
Statistics of vehicle accidents based on vehicle type: (a) gender of the driver and (b) severity of accidents.
(a)(b)


## 3.1.8. Evaluation of Education Rate

According to Figure8(a), most of the accidents (43.9%) occurred by people having diploma degrees, of which 42.78% were males and 1.12% were females. As shown in Figure 8(b), the largest percentage of traffic accidents that resulted in damage and fatal/injury accidents was also related to people having diploma degrees (33.22%, and 10.6%, respectively).Figure 8
Statistics of vehicle accidents based on education rate: (a) gender of the driver and (b) severity of the accident.
(a)(b)


## 3.1.9. Evaluation of Weather Conditions

According to Figure9(a), the greatest accident rates for males and females were recorded in clear weather (81.22% for males and 1.27% for females), and stormy weather had the least accident rate for both males and females (0.63% and 0.07%, respectively). Figure 9(b) shows that the largest percentage (82.5%) of accidents was related to clear weather (63.66% for damage and 18.83% for fatal/injury).Figure 9
Statistics of vehicle accidents based on the condition of weather: (a) gender of the driver and (b) severity of the accident.
(a)(b)


## 3.2. Kolmogorov–Smirnov Test

A related statistical test is needed to evaluate the data normality. So the K-S test was utilized to check the normality of the data. The results of the K-S test are indicated in Table2. Based on Table 2, all significance levels in the K-S test were less than 0.05, and regarding the 5% error, the null hypothesis (H0) was rejected, indicating that the natural distribution of variables and H1 was accepted. Therefore, because of the lack of data normality, the nonparametric tests could have been applied.Table 2
The Kolmogorov–Smirnov test results.
Most extreme differencesNumberVariablesAbsolutePositiveNegativeTest statisticAsymp. sig. (2-tailed)1Reason of accident0.1730.173−0.1518.8150.02Gender of the driver0.5390.539−0.43127.3810.03Time of accident0.2300.186−0.23011.6740.04Type of collision0.3620.362−0.26018.3910.05Day of accident0.2490.241−0.24912.6350.06Age0.2450.245−0.23512.4500.07Vehicle type0.1810.145−0.1819.1290.08Education rate0.2490.249−0.19112.6490.09Weather condition0.4740.474−0.35124.1100.0


## 3.3. Friedman Test

In the presented paper, the Friedman test was used to analyze the rank of each variable. The FT was applied to examine the rank equality related to parameter levels. The level of significance, chi-square value, degrees of freedom, and statistical significance of the statistical sample volume, andα that is illustrated by sig. are reported in Table 3.Table 3
Results of the Friedman test.
Number of dataChi-squareDegrees of freedomAsymp. sig.2,5859,735.06480.0As shown in Table3, the significance level of less than 5% is indicative of rejecting H0, and equal rank claims for these four named parameters were not accepted. Thus, ratings were inconsistent. Table 4 reports the ranking condition of each variable, representing the average score for independent variables: the lower the average rating, the more influential the variable.Table 4
Mean rank in the Friedman test.
VariablesMeanRankGender of the driver2.171Weather condition2.712Collision type4.123Accident day4.124Accident time5.745Driver age5.816Education rate6.487Accident reason6.628Vehicle type7.249Table4 indicates that the parameters of gender of the driver, weather condition, collision type, and accident day were considered the most significant parameters on accident severity, respectively, with values of 2.17, 2.71, and 4.12, respectively. On the other hand, the variables of education rate, accident reason, and vehicle type had the least influence on accident occurrence. It can be concluded that gender of the driver had a significant influence on accident severity, which means that the role of humans should be considered as an important factor, and the condition of weather was recognized as the second most factor that increased accident rate. The collision type and accident day parameters were also detected as the third and fourth factors, which affected accident severity.


## 3.4. Factor Analysis

Table5 reports the results of the Kaiser–Meyer–Olkin (KMO) index and Bartlett’s test in the factor analysis. The closer the value of the KMO index to 1, the better the result of factor analysis. Based on Table 5, the value of the KMO index was 0.524, which shows that the factor analysis is appropriate. Bartlett’s test confirms that there is no correlation between variables achieved from the significant level of chi-square. The chi-square value was much greater than 5. Also, the significant level was lower than 0.05; in other words, it means that the alternative hypothesis was affirmed, and a significant correlation existed among the parameters. Thus, all factors in the study affected accident occurrence.Table 5
The KMO and Bartlett’s test.
KMO measure of sampling adequacy0.524Approx. chi-squareApprox. chi-square479.993df36Sig.0.00Table6 reports the variance and eigenvalues corresponding to components. In order for the remaining components in the model, it is required for each component to have values that are greater than 1. As shown in Table 6, components 1 to 4 had values larger than 1. The first block included three columns with labels of initial eigenvalues related to the eigenvalues of the correlation matrix. Eigenvalues are the values estimated by special factors, and the total variance for each test is equal to 100%. The eigenvalue for the first factor was 1.335. Other eigenvalues for later factors are reported in Table 6. The four components that had values greater than 1 could estimate the variability of variables and variances containing about 53% of the variance. The second block included the three columns with labels of extraction total of squared loadings, and rotation total of squared loadings are not represented. Table 6 also displays the rotation matrix of the remaining components. The principal component analysis is the extraction technique used for both matrices, and the method of rotation is Equamax using Kaiser normalization. The values of the correlation degree of the proper parameters related to components are represented in Table 6.Table 6
Total variance explained.
Initial eigenvaluesExtraction sums of squared loadingsRotation sums of squared loadingsComponentTotal% of varianceCumulative %Total% of varianceCumulative %Total% of varianceCumulative %11.33514.83414.8341.33514.83414.8341.30814.52814.52821.28714.29529.1291.28714.29514.2951.27114.12328.65231.14912.76841.8971.14912.76841.8971.17913.10241.75441.03611.50653.4031.03611.50653.4031.04811.65053.40350.99510.60964.01260.8999.98773.99970.8229.13483.13380.7778.63691.76990.7418.231100.00Table7 represents the components matrix, which includes nine variables in eight factors extracted. Once these factors have no correlation with each other, these factors are the same correlation coefficients between variables in factors. Therefore, the closer the absolute value is to 1, the greater the role of the desired factor in the total variance of numbers. In order to decline the difficulty of interpreting nonrotating component loads, the component matrix was rotated. The aim of the rotated component matrix was to create a new condition for factors to make a better interpretation. The effect of variables on the severity of accidents is explained in the factor analysis, and the higher the absolute value of variables, the more influential the relevant component in the total changes of variables.Table 7
Component matrix before rotation.
ComponentVariables1234Reason of accident0.1220.5820.1500.359Gender of the driver0.1210.2640.7550.055Collision type0.411−0.347−0.085−0.087Accident time0.5000.454−0.0130.075Accident day0.4750.284−0.045−0.300Driver age0.629−0.3180.058−0.072Vehicle type0.512−0.2820.0430.199Education rate−0.0150.070−0.0380.874Weather condition0.0430.5330.756−0.061The results of Table8 indicated that driver age, vehicle type, and collision type variables were under the first component, and the coefficients of significance between the first component and each parameter were 0.719, 0.637, and 0.528 positives, respectively. Thus, driver age, vehicle type, and collision type variables were recognized as the most influential factors, which affect accident severity on Tehran province rural roads. In addition, accident time, accident day, and reason of accident variables with positive values of 0.755, 0.641, and 0.508, respectively, under the second most component had a significant impact on increasing the severity of accidents. Similarly, the variables of weather condition and gender of the driver with scores of 0.756, and 0.755, respectively, were under the third component, and then education rate with a coefficient of 0.874 was considered the most influential parameter in increasing the severity of accidents on rural roads of Tehran province.Table 8
Rotated component matrix.
ComponentVariables1234Reason of accident−0.2240.5080.1500.359Gender of the driver0.131−0.1010.7550.055Collision type0.528−0.010−0.085−0.087Accident time0.0740.755−0.0130.075Accident day0.1140.641−0.045−0.300Driver age0.7190.0760.058−0.072Vehicle type0.6370.0090.0430.199Education rate0.048−0.029−0.0380.874Weather condition−0.1360.1200.756−0.061


## 3.5. Logit Model

Multiple logistic regression was applied in the presented research to predict the severity of accidents. In designing the logit model, 64 independent variables and 2 dependent variables were set and then modeled. Generally, there are three techniques to enter the variables in developing the model. The common method used for modeling is the entering method; however, it has its own disadvantages, in which the model cannot process the data correctly and recognize the effective variables. So, because of this limitation, the forward and backward stepwise methods are commonly utilized in processing the data. Afterward, two criteria ofR2 and the correct percentage were considered to choose the superior method. As shown in Table 9, the values of the correct percentage and the goodness of fit of the backward were greater than the forward. Due to its accuracy in predicting accident severity, the backward method with the correct percentage of 78.5% and the R2 value of 0.324 was chosen as a superior method to create the logit model on rural roads of Tehran province.Table 9
Summary of the forward and backward methods of accident severity.
NumberLogit regression methodsCorrect percentageGoodness of fit (R2)1Forward stepwise78.10.2132Backward stepwise78.50.324Table10 shows that out of 2013 damage accidents, 1,996 accidents were correctly predicted, and out of 572 fatal and injury accidents, only 33 cases were properly predicted by the model. The predictive values of the logit model related to damage and fatal/injury accidents were measured to be 99.2% and 5.8%, respectively. Accordingly, the model’s capability was better to classify and separate the damage accidents in comparison to fatal/injuries ones. Also, the overall percentage of the model in recognizing accident severity was 78.5%. The poor ability of the model to predict fatal and injury accidents does not mean that this model is inaccurate.Table 10
Classification table in the logit model.
ObservedPredictedAccident severityPercentage correctDamageFatal and injuryAccident severityDamage1,9961799.2Fatal and injury539335.8Overall percentage78.5For modeling the severity of accidents, 64 independent variables were fitted into the model by the use of the backward method and then reduced to include 12 independent variables found as the significant variables in predicting accident severity. As shown in Table11, the statistics of each variable indicate that the variables of exceeding lawful speed, vehicle-motorcycle, overturning-motorcycle, 12:00 to 18:00, KIA Pride vehicle, Samand vehicle, pickup vehicle, trailer vehicle, bus vehicle, and education rate of elementary, high school, and diploma had the greatest effect on the severity of accidents leading to damage and injury/fatal accidents in Tehran. Moreover, the most significant factors that increase the severity of accidents were 12:00 to 18:00 time, pickup vehicles, KIA Pride vehicles, and education rate of elementary, diploma, and high school. On the other hand, the most influential variable reducing accident occurrence was exceeding lawful speed. The result of the logit model represented that the impact of 12:00 to 18:00 time variable had the highest on increasing the likelihood of vehicle accidents and then pickup vehicles had the most influence on increasing the accident rate. Therefore, regarding the high rate of accidents at 12:00 to 18:00 time, the presence and controlling police at this time may have a suitable impact on reducing the occurrence of accidents. In addition, installing strong lighting along the road at the time of 12:00 to 18:00, especially in the winter (due to the darkness of the air at 17:00), can be considered an effective way to reduce the severity of the accidents. Considering the vehicle manufacturers to design the vehicles with high and safe quality as well as address their technical problems will have a direct impact on declining the severity of these accidents.Table 11
The results of logit analysis in the first step.
VariablesβS.E.WaldSigExp (β)Exceeding lawful speed−1.6180.7085.2150.0220.198Vehicle motorcycle0.4610.2682.9550.0861.585Overturning motorcycle1.1560.6732.9460.0863.17712:00 to 18:000.9720.13651.2200.0002.644KIA Pride0.4860.2274.5840.0321.625Samand0.6350.3403.4910.0621.887Pickup0.6790.2308.6810.0031.972Trailer0.4210.2413.0490.0811.524Bus1.1830.6313.5190.0613.265Elementary2.1331.0414.1990.0408.442High school2.0481.0333.9300.0477.754Diploma2.1061.0324.1640.0418.214Constant−4.5601.33511.6650.0010.010Table12 reports the values of significance (sig.), degree of freedom (df), and chi-square of the backward method in the first step of the modeling process. The chi-square value of the logit model related to step 1 was 217.333 with a significant value of less than 5%, which means that the predictive power of the model for accidents was affirmed.Table 12
The backward stepwise model results.
Chi-squareDfSig.Step 1Step217.333560.00Block217.333560.00Model217.333560.00


## 3.6. ANN Models

### 3.6.1. MLPNN

In the current research, the number of accidents leading to damage, and fatal injury was developed by the MLPNN model. In designing the model, 70% of the data were selected to train the network, and the remaining 30% were considered for testing. The number of input variables entered in the MLPNN model was 9, each of which was divided into different categories. The numbers of neurons in the input and output layers were 64 and 2, respectively. The automatic architecture was applied to develop the model, which computed six neurons in the hidden layer and selected one hidden layer for the model. Table13 represents the correct percentage of the MLPNN model for each category. Table 13 reports that among 1,426 cases related to damage accidents, 1,409 cases were accurately predicted by the MLPNN model, and out of 403 cases related to fatal-injury accidents, only 37 cases were accurately classified by the model. Overall, in the training sample, 98.8% of cases were predicted, and 1.2% of cases related to damage accidents were not accurately predicted. Moreover, the cross-entropy error was considered a criterion to evaluate the MLPNN model in predicting accidents. The results showed that the values of training and testing samples were 860, 985, and 383.342, respectively. According to Figure 10, the receiver operating characteristic (ROC) curve is a plot of the sensitivity versus specificity of a diagnostic test utilized to visualize and organize the classification of the model in forecasting each category of accidents. The value of the area under the curve (AUC) can be different from 0 to 1; the closer the value to 1, the more precise classification of the model (27). In addition, the value of AUC should not be less than 0.5. According to Table 14, in this model, the likelihood of accidents that led to damage and fatal/injury was calculated to be 0.693, larger than 0.5, meaning that the classification of the model was in a good range. Figure 11 also represents the relative importance of independent variables for the MLPNN model, which indicates the extent of the effect of the independent variables in predicting accidents. Normalization of this significance was achieved by dividing the importance values by their highest value and defined as a percentage. As shown in Figure 11, the variables of gender of the driver, accident time, weather condition, driver age, and education rate were found as the most significant variables of the severity of accidents, respectively. Moreover, Figure 11 shows that gender of the driver had the greatest indication of all parameters, which affect accident severity.Table 13
Classification in the MLPNN model.
PredictedSampleObservedDamageFatal and injuryCorrect percentage (%)TrainingDamage1,4091798.8Fatal and injury366379.2Overall percentage (%)97.03.079.1TestingDamage5771098.3Fatal and injury157127.1Overall percentage (%)97.12.977.9Figure 10
The ROC curve for the MLPNN model.Table 14
The area under the curve for the MLPNN model.
AreaAccident severityDamage0.693Fatal/injury0.693Figure 11
Independent variable importance chart in the MLPNN model.


### 3.6.2. RBFNN

At first, in designing the RBFNN model, the data set was divided into 70% and 30% for training and testing, respectively. The numbers of neurons in input and output layers were measured to be 64 and 2, respectively. In order to develop the RBFNN model, the automatic architecture computed 9 neurons in the hidden layer. Table15 indicates the classifying of the prediction of damage and fatal/injury accidents. The RBFNN model correctly predicted 78.8% of cases. Among 1,402 cases related to damage accidents, all cases were correctly predicted with the correct percentage of 100, but among 379 cases of fatal/injury accidents, only 2 cases were correctly predicted. Therefore, the model was capable of predicting damage accidents, but it was not able to predict accidents leading to fatal/injury. In addition, the values of cross-entropy error for training and testing were found to be 296.281 and 126.994, respectively. Figure 12 represents the ROC curve for the damage and fatal/injury accidents. As shown in Table 16, the values of AUC for both damage and fatal/injury accidents were measured to be 0.635, which is larger than 0.5, meaning that the response of the RBFNN model is positive. The independent variable importance, which affects accident severity, is shown in Figure 13.Table 15
Classification in the RBFNN model.
PredictedSampleObservedDamageFatal and injuryCorrect percentage (%)TrainingDamage1,4020100.0Fatal and injury37720.5Overall percentage (%)99.90.178.8TestingDamage6110100.0Fatal and injury19210.5Overall percentage (%)99.90.176.1Figure 12
The ROC curve for the RBFNN model.Table 16
The area under the curve for the RBFNN model.
AreaAccident severityDamage0.635Fatal/injury0.635Figure 13
Independent variable importance chart in the RBF model.


## 3.6.1. MLPNN

In the current research, the number of accidents leading to damage, and fatal injury was developed by the MLPNN model. In designing the model, 70% of the data were selected to train the network, and the remaining 30% were considered for testing. The number of input variables entered in the MLPNN model was 9, each of which was divided into different categories. The numbers of neurons in the input and output layers were 64 and 2, respectively. The automatic architecture was applied to develop the model, which computed six neurons in the hidden layer and selected one hidden layer for the model. Table13 represents the correct percentage of the MLPNN model for each category. Table 13 reports that among 1,426 cases related to damage accidents, 1,409 cases were accurately predicted by the MLPNN model, and out of 403 cases related to fatal-injury accidents, only 37 cases were accurately classified by the model. Overall, in the training sample, 98.8% of cases were predicted, and 1.2% of cases related to damage accidents were not accurately predicted. Moreover, the cross-entropy error was considered a criterion to evaluate the MLPNN model in predicting accidents. The results showed that the values of training and testing samples were 860, 985, and 383.342, respectively. According to Figure 10, the receiver operating characteristic (ROC) curve is a plot of the sensitivity versus specificity of a diagnostic test utilized to visualize and organize the classification of the model in forecasting each category of accidents. The value of the area under the curve (AUC) can be different from 0 to 1; the closer the value to 1, the more precise classification of the model (27). In addition, the value of AUC should not be less than 0.5. According to Table 14, in this model, the likelihood of accidents that led to damage and fatal/injury was calculated to be 0.693, larger than 0.5, meaning that the classification of the model was in a good range. Figure 11 also represents the relative importance of independent variables for the MLPNN model, which indicates the extent of the effect of the independent variables in predicting accidents. Normalization of this significance was achieved by dividing the importance values by their highest value and defined as a percentage. As shown in Figure 11, the variables of gender of the driver, accident time, weather condition, driver age, and education rate were found as the most significant variables of the severity of accidents, respectively. Moreover, Figure 11 shows that gender of the driver had the greatest indication of all parameters, which affect accident severity.Table 13
Classification in the MLPNN model.
PredictedSampleObservedDamageFatal and injuryCorrect percentage (%)TrainingDamage1,4091798.8Fatal and injury366379.2Overall percentage (%)97.03.079.1TestingDamage5771098.3Fatal and injury157127.1Overall percentage (%)97.12.977.9Figure 10
The ROC curve for the MLPNN model.Table 14
The area under the curve for the MLPNN model.
AreaAccident severityDamage0.693Fatal/injury0.693Figure 11
Independent variable importance chart in the MLPNN model.


## 3.6.2. RBFNN

At first, in designing the RBFNN model, the data set was divided into 70% and 30% for training and testing, respectively. The numbers of neurons in input and output layers were measured to be 64 and 2, respectively. In order to develop the RBFNN model, the automatic architecture computed 9 neurons in the hidden layer. Table15 indicates the classifying of the prediction of damage and fatal/injury accidents. The RBFNN model correctly predicted 78.8% of cases. Among 1,402 cases related to damage accidents, all cases were correctly predicted with the correct percentage of 100, but among 379 cases of fatal/injury accidents, only 2 cases were correctly predicted. Therefore, the model was capable of predicting damage accidents, but it was not able to predict accidents leading to fatal/injury. In addition, the values of cross-entropy error for training and testing were found to be 296.281 and 126.994, respectively. Figure 12 represents the ROC curve for the damage and fatal/injury accidents. As shown in Table 16, the values of AUC for both damage and fatal/injury accidents were measured to be 0.635, which is larger than 0.5, meaning that the response of the RBFNN model is positive. The independent variable importance, which affects accident severity, is shown in Figure 13.Table 15
Classification in the RBFNN model.
PredictedSampleObservedDamageFatal and injuryCorrect percentage (%)TrainingDamage1,4020100.0Fatal and injury37720.5Overall percentage (%)99.90.178.8TestingDamage6110100.0Fatal and injury19210.5Overall percentage (%)99.90.176.1Figure 12
The ROC curve for the RBFNN model.Table 16
The area under the curve for the RBFNN model.
AreaAccident severityDamage0.635Fatal/injury0.635Figure 13
Independent variable importance chart in the RBF model.


## 3.7. Validation of the Machine Learning Models

### 3.7.1. Development of Mathematical Models

In order to prove the proposed models, several ANN models using MATLAB programming with a different learning method and active functions were developed and then trained on the data to evaluate the performance of the machine learning methods. In this section, 40 multilayer perceptron network (MLP) models with different structures were built. In order to have an effective comparison between the machine learning methods and the mathematical models (MLP) used for validation, the partitioning data set, as same as the machine learning methods, was considered to design MLP models. Thus, 70% of the data were utilized for training, and 30% were used for validation. The criterion in dividing the data set was to determine enough samples for the ANN training and the rest for cross-validation. Selecting the right architecture, transfer functions, training algorithm, and the number of neurons in the hidden layer is regarded as the critical factors in creating models. The best method for training is that once making the network convergent and having minimum, the error function of the training has the modeling capability by providing new data. Among the several methods for training, the Levenberg–Marquardt (LM) algorithm has the best acceleration to train neurons in comparison to other kinds of methods (Bayesian regularization-scaled conjugate gradient). This method, which is different from the method of machine learning approaches, can be used to train the network with a large number of variables. Its most prominent feature is ensuring the model’s convergence and convergence speed. Thus, the Levenberg–Marquardt (LM) algorithm was applied to train the neural networks.


### 3.7.2. Model Details

Log-sigmoid function was used as the activation function. Initially, the developed models were trained using the training set and afterward, they should be validated using the validation set. Since during the training process, the initial weights were randomly chosen, and there was a probability the network fell into a local minimum; the networks were initially trained using one hidden layer and various numbers of neurons. Each model was developed for 14 iterations, and the results were recorded. A similar process was then repeated for models with 2 hidden layers. The 40 different network structures as well as the accuracy of their prediction are shown in Table17. Afterward, the optimum network structure was chosen by comparing the results of different structures.Table 17
Different ANN structures for the prediction of accident severity.
ModelHidden layerHidden neuronsRMSETrainingValidationM1130.39560.3985M2160.37310.3986M31100.37270.3993M41150.37940.3885M51200.36880.3952M61230.35990.3905M71250.35580.4129M81280.36650.3864M91300.37160.4027M101330.36650.4041M111350.36070.3963M121400.36620.3983M131430.38740.3775M141450.36290.4034M151480.34880.4011M161500.34360.4092M171520.36290.3930M181550.33930.3980M191580.34580.4029M201600.37580.3921M2124–70.41740.4026M2224–60.38060.3914M2325–100.37390.3965M2428–140.37410.4018M2529–170.36150.3855M26212–200.36450.3951M27214–230.34390.4073M28216–270.35340.4068M29218–310.34610.4092M30221–340.38480.4003M31224–370.37320.4012M32226–390.35360.3817M33229–410.36540.3944M34231–440.35860.3854M35232–470.33640.4058M36234–510.34490.4263M37238–540.33960.3951M38241–560.31460.4060M39244–570.30340.4042M40245–600.34280.3950


### 3.7.3. Determination of the Optimized Model

Forty models with different structures have been developed to train on the data set. The specification of 40 models with various structures is represented in Table17. For both stages of training and validation, two comparison criteria have been utilized in order to compare these diverse neural network architectures, which included RMSE. An important question may arise as to how we can determine the best network structure associated with the least amount of variance. The most ideal range for selecting an optimum model is in which the training and validation error graphs start converging with each other. Thus, this research used the values of RMSE as the error criterion. In other words, the criteria for selecting the optimized model are based on the values of training RMSE and validation RMSE. According to Figure 14, the optimized model is achieved in which both the values of training RMSE and validation RMSE are at the minimum level and have a little difference (corresponding to each other) [49]. As shown in Figure 14, the horizontal axis is indicative of the number of neurons in the hidden layer, and the vertical axis is indicative of the training RMSE and validation RMSE values. Initially, the number of neurons is small, and the values of the training RMSE and validation RMSE are very close to each other; however, by moving toward the right side of the plot, meaning that the number of neurons is increased, it is indicated the values of the training RMSE and validation RMSE will be going to be far away from each other (high variances). By comparing 40 models (both single layer and double layers), it is clearly shown that the best architecture for the network is the neural network with 3 neurons in 1 hidden layer (M1), an optimal selection. Model M1 has the least amount of difference between the values of the training RMSE and validation RMSE compared to other models. The results of each network training are represented in Figure 15. As can be seen in Figure 15, in prediction model M1, the training procedure has reached the best value for validation error after 14 repeats. It can be seen in Figure 15 that by increasing the number of epochs, the amount of MSE is reduced, improving the performance of the model both in the training and validation phase. Figure 15 represents the prediction model M1 had the minimum MSE compared to other networks.Figure 14
The number of neurons sets based on the values of RMSE for the developed models.Figure 15
MSE versus epoch curve for best six models.


## 3.7.1. Development of Mathematical Models

In order to prove the proposed models, several ANN models using MATLAB programming with a different learning method and active functions were developed and then trained on the data to evaluate the performance of the machine learning methods. In this section, 40 multilayer perceptron network (MLP) models with different structures were built. In order to have an effective comparison between the machine learning methods and the mathematical models (MLP) used for validation, the partitioning data set, as same as the machine learning methods, was considered to design MLP models. Thus, 70% of the data were utilized for training, and 30% were used for validation. The criterion in dividing the data set was to determine enough samples for the ANN training and the rest for cross-validation. Selecting the right architecture, transfer functions, training algorithm, and the number of neurons in the hidden layer is regarded as the critical factors in creating models. The best method for training is that once making the network convergent and having minimum, the error function of the training has the modeling capability by providing new data. Among the several methods for training, the Levenberg–Marquardt (LM) algorithm has the best acceleration to train neurons in comparison to other kinds of methods (Bayesian regularization-scaled conjugate gradient). This method, which is different from the method of machine learning approaches, can be used to train the network with a large number of variables. Its most prominent feature is ensuring the model’s convergence and convergence speed. Thus, the Levenberg–Marquardt (LM) algorithm was applied to train the neural networks.


## 3.7.2. Model Details

Log-sigmoid function was used as the activation function. Initially, the developed models were trained using the training set and afterward, they should be validated using the validation set. Since during the training process, the initial weights were randomly chosen, and there was a probability the network fell into a local minimum; the networks were initially trained using one hidden layer and various numbers of neurons. Each model was developed for 14 iterations, and the results were recorded. A similar process was then repeated for models with 2 hidden layers. The 40 different network structures as well as the accuracy of their prediction are shown in Table17. Afterward, the optimum network structure was chosen by comparing the results of different structures.Table 17
Different ANN structures for the prediction of accident severity.
ModelHidden layerHidden neuronsRMSETrainingValidationM1130.39560.3985M2160.37310.3986M31100.37270.3993M41150.37940.3885M51200.36880.3952M61230.35990.3905M71250.35580.4129M81280.36650.3864M91300.37160.4027M101330.36650.4041M111350.36070.3963M121400.36620.3983M131430.38740.3775M141450.36290.4034M151480.34880.4011M161500.34360.4092M171520.36290.3930M181550.33930.3980M191580.34580.4029M201600.37580.3921M2124–70.41740.4026M2224–60.38060.3914M2325–100.37390.3965M2428–140.37410.4018M2529–170.36150.3855M26212–200.36450.3951M27214–230.34390.4073M28216–270.35340.4068M29218–310.34610.4092M30221–340.38480.4003M31224–370.37320.4012M32226–390.35360.3817M33229–410.36540.3944M34231–440.35860.3854M35232–470.33640.4058M36234–510.34490.4263M37238–540.33960.3951M38241–560.31460.4060M39244–570.30340.4042M40245–600.34280.3950


## 3.7.3. Determination of the Optimized Model

Forty models with different structures have been developed to train on the data set. The specification of 40 models with various structures is represented in Table17. For both stages of training and validation, two comparison criteria have been utilized in order to compare these diverse neural network architectures, which included RMSE. An important question may arise as to how we can determine the best network structure associated with the least amount of variance. The most ideal range for selecting an optimum model is in which the training and validation error graphs start converging with each other. Thus, this research used the values of RMSE as the error criterion. In other words, the criteria for selecting the optimized model are based on the values of training RMSE and validation RMSE. According to Figure 14, the optimized model is achieved in which both the values of training RMSE and validation RMSE are at the minimum level and have a little difference (corresponding to each other) [49]. As shown in Figure 14, the horizontal axis is indicative of the number of neurons in the hidden layer, and the vertical axis is indicative of the training RMSE and validation RMSE values. Initially, the number of neurons is small, and the values of the training RMSE and validation RMSE are very close to each other; however, by moving toward the right side of the plot, meaning that the number of neurons is increased, it is indicated the values of the training RMSE and validation RMSE will be going to be far away from each other (high variances). By comparing 40 models (both single layer and double layers), it is clearly shown that the best architecture for the network is the neural network with 3 neurons in 1 hidden layer (M1), an optimal selection. Model M1 has the least amount of difference between the values of the training RMSE and validation RMSE compared to other models. The results of each network training are represented in Figure 15. As can be seen in Figure 15, in prediction model M1, the training procedure has reached the best value for validation error after 14 repeats. It can be seen in Figure 15 that by increasing the number of epochs, the amount of MSE is reduced, improving the performance of the model both in the training and validation phase. Figure 15 represents the prediction model M1 had the minimum MSE compared to other networks.Figure 14
The number of neurons sets based on the values of RMSE for the developed models.Figure 15
MSE versus epoch curve for best six models.


## 3.8. Performance Comparison of Mathematical Models with the Machine Learning Methods

In this section, since the aim was to analyze the performance of machine learning methods, the comparison was made between the ANN (MLP and RBF) models developed by the scaled conjugate gradient (SCG) method for training neurons to six kinds of ANN (M1, M4, M13, M20, M22, and M30) models trained by Levenberg–Marquardt (LM) algorithm. In addition, the active function used for machine learning methods (MLP and RBF) was the hyperbolic tangent, and the active function utilized for MLP models was log-sigmoid. In order to prove the machine learning methods, after the training set was done, the performance of the trained model was analyzed; for this purpose, the error criteria of root mean square error (RMSE), mean square error (MSE), mean absolute error (MAE), mean absolute percentage error (MAPE), and average absolute deviation (MAD) were considered to compare the performance of the mathematical models with machine learning methods. These approaches used for evaluating the performances of machine learning models have been applied in earlier studies [50, 51]. In this study, the SPSS and MATLAB software programs were utilized to assess the obtained results. Furthermore, the optimum model (M1), as well as the models with suitable performances, were determined to analyze the efficiency of machine learning methods (as shown in Table 18). In the stage of training, the comparison of the obtained results indicated that with respect to the values of RMSE (the machine learning method) equal to 0.4679 and 0.4683, there is a slight difference between the results of the machine learning method and other ANN models (with the values of RMSE = 0.3956, 0.3794, 0.3874, 0.3758, 0.3806, and 0.3848). A similar conclusion can be found by comparing the other criteria such as MSE, MAE, MAPE, and MAD. As a result of comparing the mentioned approaches, it can be concluded that the difference between the developed models used for validation and the machine learning methods was a little (as shown in Table 18). Therefore, the performance of the machine learning methods can be proved in terms of accuracy and efficiency, showing that these methods can be considered robust and accurate models for predicting the severity of accidents.Table 18
Performance comparison between the mathematical models and machine learning models.
ModelRMSEMSEMAEMAPE (%)MADLearning methodActive functionHidden layerHidden neuronsMLPNN0.46790.21890.221211.12180.2212SCGTanh16RBFNN0.46830.21930.219211.08310.2176SCGTanh19M10.39560.15650.004612.5790.0045LMSigmoid13M40.37940.14390.014713.2100.0156LMSigmoid115M130.38740.15010.015913.5500.0675LMSigmoid143M200.37580.14120.078113.4300.0092LMSigmoid160M220.38060.14480.087713.9600.0597LMSigmoid24–6M300.38480.14810.051713.2100.0041LMSigmoid221–34


## 4. Comparison and Discussion

The current research examined several effective variables using different methods on accident occurrence on rural roads of Tehran, Iran. Each method had its own unique results, and there was no conflict between them, so each technique should be assessed based on its own result. Comparison of these methods enables for summarizing the results. The K-S test was applied to check the normality of the distribution, the results of which indicated that the test was significant; thus, the data did not have a normal distribution. Therefore, nonparametric tests were utilized. The Friedman test was utilized in this study to detect the priority of parameters in accident severity, in which the variables of gender of the driver, condition of weather, collision type, and accident day were recognized as the first to fourth rankings leading to vehicle accidents. On the other hand, the factor analysis was performed to recognize the underlying parameters, in which driver age, vehicle type, and collision type were considered as the first influential factors and time of accident, accident day, and reason of accident were distinguished as the second significant parameters in vehicle accidents. The machine learning approach was then used to recognize the contributory parameters of accident occurrence in Tehran province rural roads. In this method, the logit, MLPNN, and RBFNN models were built to detect the significance of each parameter in the severity of accidents. The criteria for selecting optimized machine learning methods are based on the smallest cross-entropy error, the correct classification rate, and the area under the ROC curve [52]. That means that the model that has a minimum cross-entropy, the best percentage of the correct classification rate, and the maximum value of the area under the ROC curve is selected as the best model. By the comparison of the correct prediction of the logit and ANN models, it was shown that the MLPNN model provided better performance and had a greater prediction percentage than other models. The prediction accuracy of the logit, MLPNN, and RBFNN models was 78.5%, 79.1%, and 78.8%, respectively. In addition, the prediction accuracy of the ANN models was greater than the logit model. Moreover, the logit model indicated the variables of exceeding lawful speed, vehicle-motorcycle, overturning-motorcycle, 12:00 to 18:00, KIA Pride vehicle, Samand vehicle, pickup vehicle, trailer vehicle, bus vehicle, and education rate of elementary, high school, and diploma had the highest effect on increasing the severity of accidents, while in the MLPNN model, due to better prediction, gender of the driver, accident time, weather condition, driver age, and education rate were the most significant variables in accident occurrence. Also, in the RBFNN model, the variables of gender of the driver, education rate, condition of weather, and driver age were the most significant parameters. Consequently, gender of the driver was recognized as the most influential variable in accident severity, indicating the role of the human factor in accident occurrence on Tehran province rural roads.The results of this research, in comparison to the previous research, demonstrated that based on the results of MLP, RBF models, and the Friedman test (FT), the most effective variable on the severity of accidents is gender of the driver. It means that the role of humans is recognized as a precursory or primary cause of vehicle accidents, in line with other studies [53–56]. To be more specific, the results of factor analysis showed that the driver males (96.9%) accounted for a larger portion of accidents in comparison to driver females (3.1%), consistent with these studies [26, 57–59]. Also, in some previous studies, similar to the results of the MLP model, a significant effect of accident time has been emphasized [60, 61], in contradiction with the results of the RBF model in this study, indicating the low impact of this factor on accidents. Moreover, the results of frequency analysis and logistic regression model revealed that the time of 12:00 to 18:00 has a significant impact on accidents, similar to this study [26]. A significant effect of weather conditions has been found in the previous research [62], which is in contradiction with the results of the MLP and RBF models, showing that this factor is not a high priority in reducing accidents. In addition, in the frequency analysis, the greatest accident happened once the weather was clear, in line with the results of other studies [26, 58]. The significant effect of age in reducing accidents has been emphasized in some studies, contrary to the result of this research, indicating that there is less effect of this factor [51, 63]. In addition, the results of frequency analysis indicated that most accidents occurred by the driver between the age of 30 and 45, similar to these studies [26, 58]. Some researchers have shown a significant effect on accidents [64, 65], contrary to the results of these studies, indicating a low effect of this factor. The collision type in both MLP and RBF models has been considered a low effect of this factor on accidents, contrary to this study [66]. Accident day in declining accidents has been recognized as low impact, contrary to some studies [67, 68]. The results of MLP and RBF models indicated low importance for the variable of vehicle type, contrary to this study [21]. The variable of exceeding lawful speed in the results of the logit model has a significant impact on accidents, similar to the study [69]; however, in ANN models, accident reason has a low impact.


## 5. Safety Solutions

In order to reduce the number and severity of accidents in Tehran province rural roads, it is necessary to consider the effective variables in the occurrence of accidents and propose safety solutions according to their importance. Based on the results of the analysis, safety solutions that can be utilized to reduce rural road accident risks are as follows.The likelihood of single-vehicle accidents, mostly trucks, at 12:00 to 18:00 accident time (the time of returning people to their home) once drivers did not have enough attention to the front in the middle of the week, especially in the clear weather, was significant. Moreover, the male drivers of single-vehicle accidents, mainly young (between age 30 and 45) with diploma degrees, were more likely to be involved in accident occurrence. Thus, it is recommended that drivers pay more attention to the type of movement (not paying attention to the front) due to poor visibility in driving [70]. Special attention should also be paid to disabled people [71]. Since the air is going to be dark in the winter sooner, hence, installing powerful lights along roads can help reduce the severity of accidents after 17:00. The role of education may also have an impact effect on reducing the occurrence of accidents. Accordingly, it is recommended the official authorities allocate enough budget for educating young male drivers. In addition, allocating separate lines for trucks, leading to an increase in the level of service, especially on two-lane two-way (TLTW) rural highways, is recommended to control trucks on roads. Pavement damages [72–74] also have a great impact on lane changing of drivers and, as a result, driving safety, so the necessary measures such as various additives as well as nanomaterials [75–95] and improvement of friction [96–100] should be taken into account. It is recommended that motorcycle riders keep their distance from other vehicles on roads to prevent accidents of overturning motorcycle and vehicle motorcycle, so allocating separate lines can be an effective way to promote safety [101]. Improving the brake system and checking its frequency and using high-quality tires in motorcycles can be helpful in reducing overturning motorcycle accidents, especially in wet conditions and curves. Since the drivers of motorcycles are considered vulnerable road users, promoting the skills of drivers by providing related education is another type of solution to increase safety. Young male drivers will have the possibility to be prepared with last education annually, which can be included various educational activities and instructions. Passing strict rules such as physical or emotional tests or preventing people who have diplomas or lower degrees from getting a motorcycle license can enhance safety (it is just recommended). Since pickup and KIA Pride vehicles are the most common types of vehicles involved in the occurrence of accidents, it is necessary for vehicle designers to reconsider the design of these vehicles and address their defects. Giving suitable warnings to drivers using intelligent warning signs or other types of warnings can be a useful way for drivers to be concentrated on controlling their speed and increasing safety [102].


## 6. Conclusion

In the current paper, machine learning methods were developed to detect the variable that affects accident severity on rural roads of Tehran province. The study examined the different techniques to recognize the most influential variables in the occurrence of traffic accidents. Each of them has its own characteristics and can be helpful in providing practical results in reducing accident severity. The machine learning methods indicated the following meaningful findings:(1)
The results of the frequency analysis indicated that most of the accidents (damage and fatal/injury) occurred at the hours of 12:00–18:00 in the middle of the week, once the weather was clear and drivers did not pay attention to the front. Moreover, the truck vehicle was the most common type of vehicle involved in accidents (damage and fatal/injury). The drivers who were in the age group of 30–45 accounted for the highest percentage of the occurrence of accidents, and the males who had a diploma degree had the greatest rate of accidents. Among other types of accidents, single-vehicle was the most common type of accidents, having the greatest rate. In addition, the number of male drivers involved in accidents was much greater compared to female drivers.(2)
According to the results of the K-S test, the test was significant, which means a lack of normality distribution existed in the variables that affected vehicle accidents. Thus, nonparametric tests were employed.(3)
The Friedman test represented the variables of gender of the driver, weather condition, collision type, and accident day were detected as the most effective variables to predict the severity of accidents. Gender of the driver and type of collision variables were considered the first and the third factors, enlightening a human factor. In addition, accident day was identified as the second factor that was considered an environmental factor, which affected accident severity on the rural roads of Tehran. With respect to the results of the Friedman test, gender of the driver accounted for the largest portion of accident occurrences.(4)
The results in factor analysis illustrated that four parameters were recognized as the most influential factors in the accident rate, which means that out of nine variables, four factors were detected in the FA. The analysis indicated that the variables of driver age, vehicle type, and collision type were the first factor that influenced the severity of accidents, respectively. Therefore, the human factor (as the first factor) was found to be associated with accident occurrence. Accident time, accident day, and reason of accident variables were the second factors; weather condition and gender of the driver variables were the third factors; and education rate was the fourth effective factor in the occurrence of accidents on the Tehran province rural roads.(5)
The results of the logit model indicated that between the two kinds of methods considered for building the logit model in predicting accident severity on the Tehran province rural roads, based on the two criteria of the prediction accuracy of 78.5% and the goodness of fit (R2) of 0.324, the backward method was selected as an effective way in designing the logit model. Moreover, the results in the logit model represented that the variables of accident time (12:00 to 18:00), the type of vehicle (pickup and KIA Pride), education rate (elementary, diploma, and high school), the type of vehicle (bus, Samand, and trailer), and the type of collision (vehicle motorcycle and overturning motorcycle) have been identified as the most influential parameters with positive coefficients in increasing accident severity.(6)
In addition, the role of pickup vehicles in accident occurrence, especially at 12:00 to 18:00 accident time (the time people return from the workplace) was significant. Also, the reason for the accident (exceeding safe speed) declined the likelihood of vehicle accidents due to its negative coefficient. Therefore, pickup and KIA Pride vehicles have been identified as the most common types of vehicles that were involved in the occurrence of accidents. So reconsidering the design of these vehicles as well as addressing their technical problems is necessary. Moreover, by giving suitable warnings to drivers, such as intelligent warning signs or other types of warnings, it is possible to provide an effective way for drivers in controlling their speed and improving safety.(7)
Based on the results of ANN models, by comparing the predictive accuracy of the MLPNN and the RBFNN models, it was found that the MLPNN model provided better performance in predicting accident severity in terms of accuracy and efficiency. Moreover, the comparison of the ROC curves of the RBFNN and MLPNN models indicated the prediction accuracy of the MLPNN model in the severity of accidents was more. The result of the MLPNN model illustrated the variables of gender of the driver, accident time, weather condition, driver age, and education rate had the most influential effect on predicting accidents; however, in the RBFNN model, the variables of gender of the driver, education rate, condition of weather, and driver age were found to be the most effective variables in accident severity. By comparing the MLPNN and RBFNN models, it was indicated that gender of the driver was the most significant variable in accident severity, which affirms the role of the human factor in accident occurrence. Finally, the performance of MLP and RBF models were evaluated by other kinds of ANN models developed by MATLAB programming.There are, however, some limitations. MLP and RBF models as well as statistical methods do not provide the sufficient ability to consider all the required details of the problem. Thus, it is recommended for future studies to utilize deep learning methods such as the recurrent neural network (RNN), the convolutional neural network (CNN), and so on, recently successfully employed to design models with higher accuracy and efficiency in predicting accident severity [103–105]. Moreover, since the transportation sector was the second largest contributor to CO2 emissions, a study can be done to investigate the impact of pollutants on accidents in the continuation of this study [106]. By understanding the perception of road users concerning the facility improvements, these approaches, along with a survey analysis, can also improve work zone safety [107]. Various data collection methods can be incorporated into the proposed approach to obtain more variables [108, 109]. In addition, for future studies, it is recommended to utilize other kinds of cross-validation techniques [110, 111], machine learning methods [112–119], and optimization algorithms [120–124] to make a better decision about the interference of nonmotorized users and vehicle flow within a city and to develop models with high prediction accuracy in taking preventive measures for decreasing pedestrian accidents in urban environments. Also, various crash modeling and before-after safety evaluation methods can be incorporated into the proposed approaches to examine risk factors on crash rates [125–128].



---

*Source: 4857013-2022-09-14.xml*