## 1 Introduction  
More than 1.35 million people die annually worldwide in road crashes, and over 50 million people are seriously injured [1, 2]. A road crash is a complex phenomenon involving the interaction of road geometry, environment, traffic dynamics, vehicles, and humans [3, 4, 5]. Due to obstacles of data acquirement, conventional road crash prediction models rarely take traffic dynamics, such as speed, traffic flow, and vehicle types, into analysis. Safety performance functions (SPFs), sometimes referred to as crash estimation techniques, are mathematical methods that forecast the probability of collisions on certain highway infrastructure. They also look at how different factors affect the crash indicator. Real-time crash prediction aids in the detection and prevention of traffic accidents. Numerous real-time accident forecasting algorithms have been studied for decades in order to offer useful data for proactive traffic management. However, atypical changes in direction and speed that are indicated by traffic dynamics usually place other road users in jeopardy of collision [6]. Much evidence shows that traffic conflicts are a crash precursor, and traffic dynamics are, therefore, related to traffic crashes [7]. In recent years, a high-resolution detector has been able to provide abundant data regarding vehicle speed, lane traffic flow, vehicle types, and weather information, which makes real time crash prediction possible and more accurate. Typical crash prediction models include statistical methods, machine learning methods, and the deep learning neural network. Bayesian dynamic logistic regression can tune model parameters by integrating a new instance with prior knowledge [8]. The main benefit is that, unlike traditional extrapolation, which usually only gets a prediction equation as well as a probability value, this Bayesian analysis also gets the whole spectrum of interpretive possibilities. The Bayesian hierarchical structure model accounts for non-stationarity and unobserved heterogeneity in conflict extremes to improve prediction accuracy [9]. The applied Bayesian Belief Net is used with involvement of ramp flow and speed of the ramp location as variables. Ref. [5] included vehicle trajectory into the analysis and investigated influential factors for crash happening. Refs. [10; 11], implemented an autoregressive integrated moving average with explanatory variables (ARIMAX) model to analyze road crashes in Nigeria. The traditional ARIMA framework enables projections based solely on the forecasted variable's historical performance. The paradigm makes the assumption that a variable places considerable correlate proportionally on both its previous values and the magnitudes of any prior (probability) disruptions. ARIMAX was found to effectively capture short-term data features and can predict near future movements. According to ARIMA, previous time series analyses are utilized to anticipate consumption. Although ARIMA is a univariate approach, ARIMAX forecasts work by combining historical consumption information from multiple parameters that include datasets (such as climatic conditions) [12]. Ref. [13] used multivariate probit models to build models between crash types and prevailing traffic conditions. Ref. [14] used a multivariate negative binomial (MVNB) model by embedding it into the supervised fine-tuning module as a regression layer to address the unobserved heterogeneity issues in the traffic crash prediction. Ref. [2] proposed a long short-term memory (LSTM)--gradient boosting regression trees (GBRT) model to predict traffic crashes by strengthening the LSTM classifier by boosting regression trees. Gradient boosting constructs gradually weaker (easier) computational methods, every one of which attempts to anticipate the uncertainty left behind by the preceding algorithm. As a result, the system has a propensity to overload quite quickly. Ref. [14] proposed a grey neural network model which compensated for the small sample's data distortion. Ref.