Predicting Critical Bicycle-Vehicle Conflicts at Signalized Intersections

Continuous development of urban infrastructure with a focus on sustainable transportation has


Introduction
With a growing interest in using eco-friendly modes of travel such as bicycling and walking, there is an increasing trend in the number of crashes involving. Comparing to vehicular modes of transportation, bicyclists and pedestrians are at an increased risk of fatal or severe injuries at the time of the collision. Based on the National Highway Traffic Safety Administration (NHTSA) report [1] in 2018, 857 bicycle fatalities occurred in the US roadways, which was 6% more than the preceding year and the highest number since 1990. Bicyclist fatalities had increased from 1.9% of total road crash fatalities in 2009 to 2.3% in 2018. Intersections are considered as hot spots when looking at traffic fatalities and injuries due to the complex nature of interactions. e presence of mixed traffic flow specifically makes intersections more important resulting in a large number of traffic incidents and collisions. According to the Federal Highway Administration (FHWA), an average of 2.5 million crashes occur every year at intersections. Traffic Safety Facts published by NHTSA in 2018 indicates that 29% of pedalcyclist fatalities happened at intersections. Road-user movements possessing distinct conflicting patterns could lead to a large number of crashes at signalized intersections [2]. erefore, it is crucial to understand the dynamics of interactions between bicyclists and motor vehicles by looking at their critical conflicts.
In general, direct or indirect techniques can be used to perform safety analysis [3]. Direct techniques hinge on historical crash data to evaluate the degree of road safety. Traditionally, crash frequency and crash severity have been used as metrics for safety evaluations. Crash data help in identifying high-risk locations, current conditions, necessary safety improvements, and safety evaluation of road users [4,5]. However, unpredictability and irregularity of crash occurrences in the real environment result in the inefficiency of quantitative and qualitative crash determination. Due to the possibility of erroneous or inconsistent reporting, crash data are unreliable [6]. When it comes to improving intersection safety, crash data have several limitations. First, as roadway crashes are rare events, it takes a long period of time for meaningful crash data to be available.
is is more so the case when a specific crash type is being studied (e.g., a crash between bicyclists making left turns from an approach and vehicles going through the intersection from the opposite approach). Moreover, changes such as design improvements and demand increase could occur during such long periods, potentially impacting safety evaluation outcomes. Second, reporting of crash events largely depends on the type of road users involved and the severity of crash events and is also found to be unevenly distributed [7]. Specifically, vulnerable road users are heavily underreported, thus making it unreliable and less accurate to use crash data for safety evaluation. ird, although crash data specify the occurrence of the event, it has a limited scope of information regarding the cause of the crash that includes precrash movements, distinct road-user behavior patterns, and other situational aspects [7]. Last, crash data analysis is a reactive approach in which remedial measures can be incorporated only after the occurrence of crashes, and hence, critical locations are identified after observing multiple fatalities and injuries, and countermeasures are implemented after the fact [8].
Given these shortcomings, indirect safety indicators have been studied [7,[9][10][11]. Traffic conflict technique (TCT) was proposed [12,13] that utilizes conflicts (i.e., nearcrashes) as a substitute for actual crashes [14,15]. A traffic conflict is an "observable situation in which two or more road users approach each other in space and time to such an extent that there is a risk of collision if their movements remain unchanged" [16]. TCT concept classifies various traffic events based on conflict severity level and represents road-user interactions as a continuum of safety-related events. ese safety-related events range from slight conflicts, potential conflicts, and severe conflicts [17,18]. e severity and frequency of these conflicts are typically quantified by measures known as surrogate safety measures (SSMs). Critical near-crashes are detected if an SSM value crosses a critical threshold [19].
Frequency estimation of near-crashes using SSMs has been conducted in the past and still is ongoing research. Various SSMs have been used, and among them, time-tocollision (TTC) and postencroachment time (PET) have been widely used to evaluate safety at signalized intersections. At an instant t, TTC is defined as the "time taken by the two road users to collide, provided the collision course and speed difference are the same" [20]. Considering the trajectories of two road users, the relative time-to-collision (RTTC) is estimated as the difference in time taken by the first and second road users to reach a predicted trajectory intersection point (TIP). TTC is considered as a special case of RTTC where the RTTC value is zero (i.e., both users reach TIP at the same time resulting in a collision). As RTTC decreases, the conflict is considered more critical. However, a low value of RTTC could also arise from cases when two objects that are far away from the TIP have close arrival times to the TIP. erefore, RTTC alone could not be a good indicator of critical near-crashes. To address this issue, Laureshyn et al. [7] proposed T 2 as the predicted time taken by the latest road user to reach the conflict points. A low value of T 2 indicates time remained for the second road user to perform braking or do an evasive maneuver to prevent or mitigate potential collisions. PET is defined as the "time between the departure of the encroaching vehicle from the conflict point and the arrival of the vehicle with the right of way at the conflict point" [14,21]. Unlike TTC and RTTC, PET provides a single value for every road-user pair crossing the path of each other. As PET is calculated based on an observed TIP (as opposed to "predicted TIP" in the TTC case), it is considered as a tangible indicator of how critical an interaction is based on what actually occurred as opposed to what was predicted.
Since SSMs can be used to identify unsafe events proactively, it is of interest to develop models to predict whether an interaction is going to be safe. Timely prediction of nearcrashes could be used in countermeasures such as changing the signal settings to avoid or mitigate crashes or warning approaching road users about potential collisions in a connected environment. However, there are a limited number of studies on this topic, especially for vehicle-bicycle interactions. e goal of this research is to develop models for bicyclists at signalized intersections to predict critical bicycle-vehicle near-crashes. Kinematic features such as velocity and acceleration as well as the SSMs were used in the model development process. e prediction models were developed using logistic regression (LR), support vector machine (SVM), and random forest (RF) methods. e remainder of the paper is organized as follows: past studies are reviewed in the literature review section. Next, data preparation tasks are described. Subsequently, scenario development using different SSMs is explained followed by the model development section. Finally, the model results, conclusions, and potential future research are discussed.

Literature Review
Modeling crash probability and severity has long been studied among researchers and practitioners. Conventional safety performance functions (SPFs) estimate the crash frequency of a road segment or intersection as a function of explanatory variables describing the characteristics of roadway design and environment, vehicles, and humans [22,23]. Due to the rare and sporadic nature of crashes, statistical count models such as Poisson and negative binomial (NB) and their variants are frequently used for analyzing explanatory variables and predicting crash frequency [24][25][26]. Besides statistical count models, artificial intelligence models have also been proposed for crash frequency prediction [27][28][29]. Typical SPFs consider design features such as speed limits and intersection type as well as aggregated measures like annual average daily traffic (AADT) to identify hazardous locations and missing information about individual driver behavior. However, it was found that variations in traffic dynamics across individuals could be a potential contributing factor to the crashes, which can be utilized to predict the occurrence of crashes in real time [22]. Explanatory variables related to traffic dynamics include speed, flow, and occupancy obtained from real-time traffic data [30].
Several studies were conducted considering traffic dynamics data along with crash data to predict crash likelihood at different road types and intersections in real time. Oh et al. [30] defined a 5-minute period right before a crash as a disruptive traffic condition and a 5-minute period 30 minutes before the crash as a normal traffic condition. Using the two traffic conditions, an SPF model was developed using the nonparametric Bayesian approach to assess the likelihood of crashes in real time. It was found that the standard deviation of speed was the most reliable indicator to develop an accurate SPF. In the real-time application of this model, traffic dynamics were continuously monitored in 5-minute intervals to estimate the crash likelihood after each interval. If the likelihood of crash was above a certain threshold, the driver would be alerted to either reduce/increase the speed to minimize the overall speed variation. Similarly, Hossain and Muromachi [31] developed a Bayesian network model using traffic data collected from an expressway over 16 months to predict crashes in real time. is study considered 5-minute aggregated average speed and cumulative flow as the main predictive variables. Five minutes before a crash termed as "precrash traffic conditions" and corresponding average speed and cumulative flow were used to predict the probability of crashes. To improve the performance of the SPF, a hybrid model combining support vector machine and kmeans clustering algorithm was developed that promised better crash predictions [32]. Traffic flow data for 5-10 minutes before the occurrence of a crash were considered in this study. Speed, volume, and traffic flow difference between upstream and downstream and average traffic flow were the predictive variables considered in this study. To extend the analysis to signalized intersections, Yuan and Abdel-Aty [33] developed a Bayesian conditional logistic model to predict real-time crashes within the intersection and also at the entrance of the intersection. is model obtained the best results when traffic data were taken from the 5-to 10-minute time period before the crash. In addition to real-time traffic data, signal timing and weather conditions were considered in order to predict crash likelihood.
Most crash prediction models utilize historical crash data that have some limitations, as described earlier. In order to overcome these limitations, crash surrogates, also called "near-crashes" or "traffic conflicts," have been proposed to see if they can serve as reliable indicators of safety. El-Basyouny and Sayed [34] developed SPFs based on traffic conflicts at signalized intersections and found a significant proportional relationship between traffic conflicts and crashes. In a similar study, Sacchi and Sayed [35] developed SPFs from traffic conflicts for each crash type. Some efforts [36][37][38] focused on developing crash probabilistic frameworks that estimate collision risk based on road users' hypothetical future movements and the traffic conflict concept. For example, Fu et al. [36] used a distance-velocity (DV) framework to study secondary pedestrian-vehicle interactions at nonsignalized intersections. e framework used in this study incorporates road-user kinematic and SSMs data with driver reaction time to assess the safety of interactions between road users. Several studies investigated the relationship between crashes and near-crashes. Parker and Zegeer [39] showed a statistically significant linear relationship between crashes and near-crashes. He et al. [40] used the safety pilot model deployment (SPMD) to study the statistical relationship between SSMs and crashes and found that modified time-to-collision (MTTC) performed better than deceleration to avoid a crash (DRAC) and TTC.
Many studies proved the benefits of the extreme value theory approach that estimates the risk of crashes (extreme events) based on the risky interactions between road users [41][42][43][44]. In a recent study, this approach was used to predict crashes at a signalized intersection based on traffic conflicts extracted from microscopic traffic simulation and real-world data [45]. e result showed a high correlation between simulated and actual field traffic conflict and a promising result for crash estimation using field conflict. Zheng and Sayed [46] compared four SSMs, including TTC, PET, modified time-to-collision (MTTC), and deceleration to avoid a crash (DRAC), to estimate crashes at signalized intersections and found that the MTTC produced the most accurate result. Guo et al. [47] evaluated the use of nearcrashes to assess the safety and showed a positive correlation between causes for crashes and near-crashes. Similar analyses were conducted by [48,49] confirming a positive correlation between crashes and near-crashes.
Although SSMs have been used in numerous studies to evaluate the safety or investigate their correlations to actual crashes, there is limited research on using SSMs to predict near-crashes, as summarized in Table 1. Some studies used regression analysis to estimate the frequency of near-crashes over a time period. For example, Essa and Sayed [52,54] developed a safety performance model to predict traffic conflicts in each cycle at signalized intersections using a set of explanatory variables such as traffic volume, queue length, and platoon ratio. Ma et al. [53] developed a model to predict an hourly conflict risk index (HCRI) for expressway diverging areas using variables such as traffic volume and speed in the mainline and the ramp areas. HCRI was calculated based on rear-end and lane changing conflicts identified by TTC.
Other efforts have been done on predicting and classifying the upcoming near-crashes between a pair of road users in real time. Utilizing near-crash data from SHRP2 NDS datasets, Osman et al. [51] applied several supervised machine learning models to predict rear-end near-crashes a few seconds before they happen. e standard deviations of Regression: goodness of fit R 2 the vehicle kinematics data such as acceleration, yaw rate, speed, and pedal position during a monitoring period before the conflicts were used as independent variables to identify the upcoming unsafe events. e time before a traffic conflict was divided into two periods: the turbulence horizon, which is the time to monitor and record the kinematic data, followed by the prediction period, which is the time for the model to predict the outcome before the conflict. Results from sensitivity analysis showed 1 second as optimal prediction horizon length and 3 seconds as turbulence horizon.
is study concluded that near-crash prediction models are highly efficient in predicting most instances of near-crashes with minimum false predictions. Formosa et al. [50] combined highly disaggregated traffic data taken from motorway incident detection and automatic signaling (MIDAS) with various SSMs including TTC and PET calculated from invehicle sensors data from an instrumented vehicle using centralized, integrated data architecture to develop a realtime traffic conflict detection and prediction method using deep learning methodology. A total of 26 input variables were used consisting of six widely used SSMs, the mean and standard deviation of ego vehicle's speed and speed variance between lanes and traffic variables by lane such as speed, density, flow, headway, and occupancy. e safe traffic dynamics and traffic conflicts were identified using time headways between the probe vehicle and the leading vehicle for rear-end and lane changing conflicts. It was found that TTC varied by speed, weather, and traffic density. e best deep neural network model provided an accuracy of 94%. However, this study is limited to lane change and rear-end type of conflicts.

Identification of Critical Events.
Although SSMs provide a means to quantify near-crash events, there is a necessity to distinguish such events as critical or noncritical by considering a threshold value for the SSM of interest. Studies on predicting critical near-crashes took different approaches to distinguish between critical and noncritical near-crashes. Formosa et al. [50] considered several criteria for time headway, lateral distance, and speed of following and leading vehicle to identify critical lane changing and rear-end conflict. Essa and Sayed [52] used a range of threshold values for TTC, modified time-to-collision (MTTC), and deceleration rate to avoid a crash (DRAC) to label near-crashes, and they reported the result for all of these variations. Ma et al. [53] recruited a group of students to watch the video and find critical near-crashes. en, they used a 85-percentile of TTC value as the threshold for this SSM. ere has not been a consensus among researchers to use consistent threshold values. is could be due to various factors such as type of the road, different driver behaviors in different locations, type of conflicts, and type of SSMs used [55,56]. Mahmud et al. [57] provided a review of 38 common SSMs and their thresholds. To find the optimal SSMs threshold, a recent study [58] investigated a range of thresholds for SSMs and chose the ones that maximize the correlation coefficient between crash data and risk associated with SSMs. Sayed et al. [59] included only bicycle-vehicle interactions that had TTC value less than 3 s in their safety evaluation. In another study, the TTC and PET threshold values were considered as 1.5 seconds for interactions between vehicles (including taxis), lorries (including bus), pedestrians, and bicyclists [60]. Considering vehicle-bicycle interactions, Zangenehpour et al. [61] used both TTC and PET threshold values less than 5 seconds and less than 1.5 seconds for labeling them as conflicts and dangerous conflicts, respectively. In some studies [62,63], conflicts between vehicles and bicycles were classified into more than two categories; conflicts were categorized as very dangerous interactions for PET ≤ 1.5 seconds, dangerous interactions for 1.5 seconds < PET < 3 seconds, mild interactions for 3.0 seconds < PET ≤ 5.0 seconds, and no interactions for PET > 5 seconds. Table 2 summarizes some of the common SSMs threshold used in previous studies.

Materials and Methods
is study aims to develop a model to predict critical bicyclevehicle interactions at signalized intersections. e model response variable is a dichotomous variable (critical or noncritical) that was labeled using the PET value. In addition, this study utilizes T 2 (a variation of time to the collision as described earlier) to define a monitoring period during which road-user kinematic data were extracted for prediction model development. e methodology of this study is summarized in Figure 1.

Data Collection and Preparation.
In this study, we used video data collected from cameras installed at ten signalized intersections in the city of San Diego. e video data were collected for a period of 24 hours for each intersection on a workday (Tuesday, Wednesday, or ursday) in the month of May, June, or July 2018. e original data were collected as part of a previous study [65]. e ten signalized intersections utilized in the present study were chosen based on their higher bicycle activities identified by manually reviewing video recordings. e ten data collection sites are shown in Figure 2 and Table 3.
e video data were then reviewed focusing on morning, afternoon, and evening peak hours. Based on manual observation of the maximum activity of bicyclists, video data were filtered further down to 5-minute clips to focus on bicycle-vehicle interactions. A video data analysis was performed on raw video data in order to extract the roadusers' trajectory and transform it into the top-down view (bird's-eye view). e detailed procedure of this process can be found in [65], which discusses tasks such as data annotation, object detection, and trajectory extraction. Figure 3 shows an example of the annotation task that is essential in identifying object trajectories. While the machine vision modeling was not the focus of the present study, the outputs from the machine vision models were used including the road-users type and the location at each frame. Each frame in this study is 1/30 of a second.
Vehicles and bicyclists were monitored as they interacted with each other to calculate SSMs and kinematic features for Journal of Advanced Transportation each interaction. Several kinematic features including velocity, acceleration, relative approach distance, and relative approach velocity were computed for both vehicles and bicycles at each frame. For each vehicle and bicycle that interacted with each other, the TIPs were predicted utilizing the velocities and headings of the two objects. Next, time taken by each of the objects to reach the predicted TIP was determined as the time to intersection (TTX 1 and TTX 2 , respectively). TTX and its derivatives are continuous variables, meaning that as long as the predicted path of two roadusers crosses each other, these values could be calculated. Furthermore, PET was estimated by calculating the difference between the time frame when the first road-user Step 1: Data collection and preparation Step 2: Scenario development Step 3: Model development    Journal of Advanced Transportation departs from the observed TIP and the time frame when the second one reaches the same observed TIP. Table 4 demonstrates all features that were used in this study.

Scenario Development.
Scenarios were developed using two parameters: (1) PET values were employed to identify "critical (C)" or "noncritical (NC)" near-crashes. Two commonly used values of 3 s and 5 s were used to identify critical near-crashes. A near-crash was labeled as critical when the PET value goes below the defined threshold. Also, near-crashes with no PET value or PET value higher than the threshold were labeled as noncritical.
(2) As shown in Figure 4, T 2 values were used to define monitoring periods. e end of the monitoring period (T E ) was designated as the first time the T 2 value reaches below a defined threshold during an interaction. Two thresholds of 3 and 5 s for T 2 were utilized. e interactions that did not have a T 2 value below the threshold were not considered as a near-crash. For example, the T 2 value of 5 seconds means that in an interaction, the second road-user (farthest from the TIP) has 5 seconds to perform a maneuver to avoid a potential crash. Stepping 1, 5, 10, 20, and 30, frames backward from the monitoring period end points marked different starting points (T S ), resulting in five different lengths of monitoring periods (1/30 s, 1/6 s, 1/3 s, 2/3 s, and 1 s, respectively). As a result, four scenarios were developed for near-crash prediction models using different PET (i.e., 3 and 5) and T 2 (i.e., 3 and 5) thresholds. Each scenario was examined for five different monitoring periods. As illustrated in Figure 4, kinematic features and SSMs such as RTTC were recorded during the monitoring period until T 2 reaches below the threshold (e.g., 3) at T E . Kinematic data recorded at each time frame during a monitoring period resulted in a series of values for each feature. erefore, statistical measures such as mean and standard deviation were used to reduce multiple values into one. Due to sudden changes in speed and travel direction, the value of SSMs was not present at all frames during an interaction. erefore, the last value of these features recorded at the end of the monitoring period was used. e last recorded value of SSMs is also more indicative of the severity of an interaction as it presents the situation closest to the TIP. Table 5 shows all the 30 initial features used in this study.

Model Building and Analysis.
Predicting bicycle-vehicle conflicts as "critical conflicts" and "noncritical conflicts" is a classification problem. ree popular supervised machine learning classifiers of logistic regression, SVM, and random forest were used to build vehicle-bicycle near-crash prediction models. Logistic regression is a commonly used machine learning classifier offering ease of implementation and interpretation and fast computation. Also, it has been extensively used in crash prediction literature and mostly as a baseline model. Since the dependent variable in this study is dichotomous (critical or noncritical near-crashes), we used binary logistic regression to describe the relationship between the dependent and independent variables. SVM is a supervised machine learning classifier that can be used to solve both classification and regression problems. is method plots each data point in the n-dimensional space defined by the input features. en, the algorithms find the best hyperplane that could divide the classes with the largest gap between classes. Depending on the kernel function, SVM could perform linear and nonlinear classification boundaries. SVM is suitable for cases with high-dimensional input features, and it could perform well in facing the outliers and extreme cases in binary classification, leading to good generalization. Random forest (RF) is an ensemble learning method that can be used for both classification and regression problems. It generates several random decision trees at training time and relies on the majority of votes across these trees to predict classes for each observation. RF performs well on imbalanced datasets, and since it generates several trees on the subset of the data and combines the    Kinematic features (i) Mean of object 1 velocity, max of object 1 velocity, min of object 1 velocity, and the standard deviation of object 1 velocity (ii) Mean of object 2 velocity, max of object 2 velocity, min of object 2 velocity, and the standard deviation of object 2 velocity (iii) Mean of object 1 acceleration, max of object 1 acceleration, min of object 1 acceleration, and the standard deviation of object 1 acceleration (iv) Mean of object 2 acceleration, max of object 2 acceleration, min of object 2 acceleration, and the standard deviation of object 2 acceleration (v) Mean of relative distance, max of relative distance, min of relative distance, and the standard deviation of relative distance (vi) Mean of relative velocity, max of relative velocity, min of relative velocity, and the standard deviation of relative velocity SSM-related features T 2 , RTTC, TTX avg , object 1 distance to conflict point, object 2 distance to conflict point, and direction of conflict 8 Journal of Advanced Transportation output of all the trees, it reduces overfitting and variance problems.
In this study, logistic regression and SVM were implemented using the Python scikit-learn library. e random forest classifier was implemented using the Bal-ancedRandomForestClassifier in the Python imbalancedlearn package. In this implementation of random forest, random undersampling of the majority class (noncritical near-crashes) was performed on each bootstrap sample.
is classifier was chosen to address the issue of imbalanced data in the prediction model.

Model Evaluation.
Model performance was evaluated using stratified 5-fold cross-validation with 20 repeats. is approach is appropriate for small-sized datasets and helps eliminate bias and overfitting in model training [66]. In this implementation, the dataset is split into 5 stratified folds with the same ratio of positive and negative cases, and each time one of the folds is used as a test set, and the remaining folds are used for training. is process is repeated 20 times, which provides a more robust model assessment.
To evaluate our models, several performance metrics were used, such as AUC (area under the curve), overall accuracy, recall, and F2. AUC is the area under the receiver operating characteristic (ROC) curve that measures the ability of a classifier to correctly distinguish between classes. e F2 is a variation of the F-score measure, which calculates the harmonic mean of precision and recall, as shown in equation (1). A high value of the F-score indicates a high balanced classifier performance. In F2 calculation, higher weight is given to recall because correctly identifying the minority class (i.e., critical near-crashes) is more important than incorrectly classifying a noncritical conflict as critical. Other metrics such as the overall accuracy alone may not be suitable for model evaluation as they result in poor classification performance for the minority class. erefore, we opted to use F2 as the primary metric for comparing results between different classifiers, though other metrics were also used for comparison:

Results and Discussion
A total of 324 vehicle-bicycle interactions were identified with a T 2 of less than 5 s. Of these events, 85 cases had PET values less than 5 s, and 58 cases had PET values less than 3 s. Considering the T 2 threshold of 3 s reduced the number of events to 174 interactions, of which 56 had a PET value of less than 5 s and 46 had a PET value of less than 3 s. e decrease in the number of cases is due to the fact that a smaller threshold would naturally result in fewer observations. Figure 5 shows the F2 performance of all scenarios of near-crash prediction models. e balanced random forest surpassed SVM and logistic regression in all scenarios. Due to the random undersampling of the majority class on each bootstrap, the balanced random forest performed better on the imbalanced data. Also, it could be seen that for interactions with T 2 less than 5 s, models using 10-frame monitoring periods had higher performance, while for interactions with T 2 less than 3 s, 20-frame monitoring period models performed better. By increasing the monitoring period length, there are more data available for the model, which potentially could help to predict near-crashes more accurately. However, by increasing the length of the monitoring period, data from way before the near-crash occurrence are added to the model, which could negatively impact the model performance. erefore, a small trade-off between model performance and monitoring period length is noticeable, showing models with monitoring period lengths of 10 and 20 frames performed slightly better than those with lower or higher monitoring period lengths. Table 6 shows the detailed result of the best near-crash prediction model for each of the four scenarios.
In order to reduce overfitting and improve model performance, a sequential backward and forward feature selection was performed. ese methods were implemented using the Python Mlxtend package [67]. In the backward feature selection, the algorithm starts with all of the features, and then in each step, one feature that after elimination maximizes the model performance is removed. Also, in each step, algorithms try adding previously removed features back to the feature subset to see if they could increase the performance. e algorithm went through all 30 features in this study and identified the best subset of features with the highest F2 performance in the balanced random forest using the same cross-validation technique. e forward selection utilizes a similar procedure, except that it starts, with zero features, and features are added in each step. In case both forward and backward feature selections reach the same result, the feature subset containing fewer variables is selected for model training to reduce overfitting. Figure 6 shows the best performance obtained from feature selection for each of the scenarios. Table 7 shows the detailed result of near-crash prediction using the selected subset of features. As can be seen from the table, feature selection significantly improved model performance.
Changing the T 2 threshold from 5 to 3 s resulted in F2 improvements, as shown in Table 7. Events with smaller values of T 2 present situations where road users are closer to the TIP. erefore, the improvements could be attributed to the fact that as road-users move closer to the TIP, their behaviors are better reflected in their kinematic and SSMrelated features. Furthermore, lowering the T 2 threshold results in exclusion of less severe interactions and improves the data imbalance, which in turn could improve the model performance.
Lastly, the prediction models were investigated only for the rear-end type of near-crashes. Rear-end near-crashes were identified as interactions with the direction of conflict of one, which almost constitutes half of the interactions in each scenario. Table 8 shows the best results obtained in each scenario for rear-end near-crashes after the feature selection. Comparing Table 8 with Table 7, the near-crash prediction models perform better in almost all of the metrics when considering rear-end interactions alone. e increase in performance could be due to the fact that, in rear-end nearcrashes, the interacting road users are on the same or adjacent lanes traveling towards the same direction. erefore, the future trajectories of these road users are more predictable. In contrast, in other types of near-crashes, such as crossing or sideswipe interactions, it is more challenging     4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29  to predict the road-user movements. e sudden changes in the direction of travel and yielding for traffic when making turns or crossing add more uncertainty to the prediction problem.

Conclusions and Future Works
ere has been an alarming rise in the number of crashes involving bicyclists at signalized intersections.
is study adopted a proactive safety assessment approach to predict critical bicycle-vehicle near-crashes at signalized intersections a few seconds before they occur. Kinematic data of interacting road users and SSMs during a monitoring period were used to develop prediction models to distinguish critical from noncritical events. Video data collected from ten signalized intersections in the city of San Diego were used in this study. Critical interactions between vehicles and bicyclists were labeled using two PET thresholds of 3 and 5 s. Different monitoring periods were also defined using two T 2 thresholds of 3 and 5 s as well as five different monitoring period lengths from 1/30 to 1 second. Near-crash prediction models were developed and compared using three machine learning classifiers of SVM, logistic regression, and random forest.
In almost all metrics, the balanced random forest provided higher prediction performance compared to SVM and logistic regression and, therefore, was identified as the best classifier. While all four scenarios of near-crash prediction models performed fairly well with recalls above 70% and F2 above 60%, two feature selection methods of backward and forward were adopted to reduce the overfitting and improve the model performance.
ese two algorithms were implemented in order to find the subset of features with the highest F2 and with the same crossvalidation as for model training.
e feature selection significantly improved the recall and F2 metrics to above 85% and around 70% across all four scenarios, respectively. Also, the AUC metric for all the models was above 80% after feature selection. Predicting rear-end near-cashes recall values were further improved to above 90% in all the scenarios, suggesting better prediction performance can be achieved when only a certain conflict type is taken into account. e results also showed that when the end of the monitoring period is defined with a T 2 threshold of 5 s, 10frame monitoring periods led to the best prediction performance. When a T 2 threshold of 3 s was used, 20-frame monitoring periods resulted in the best performance. Monitoring periods smaller or larger than 10 and 20 led to lower prediction performance in all scenarios.
is suggested a small trade-off between the monitoring period length and the prediction performance. e models developed in this study could be utilized in intelligent transportation management centers focusing on proactive safety applications. e modeling framework used in this study could also be extended and applied to conflicts involving other road-user types (e.g., vehicle-scooter). In a connected environment, these models can inform proactive safety planning in real time by identifying where and when critical conflicts occur between road users. Developing accurate near-crash prediction models for all types of interactions is challenging. Typically, cyclists move faster than pedestrians, and their movements are generally more unpredictable than vehicles. Moreover, many bicyclists tend to participate in dangerous and sudden maneuvers while passing the intersection. e emerging transportation technology such as automated vehicles, as well as newer modes of transportation such as electric bicycles and scooters with unknown behavioral impacts, would also add to the complexity of the prediction problem. Future research may focus on extensive data collection for all road-user types and at different geographical locations in order to obtain representative interaction samples. e present study focused on developing models using kinematic data only. However, it should be noted that other factors such as geometric design, traffic signal schemes, and weather could also play important roles in identifying the severity of near-crash events. While this study adopted SSM thresholds recommended by previous studies, it should be noted that any SSM and threshold should be validated as there is no consensus among researchers on what metrics or thresholds are the right ones for unsafe event identification. Future research may focus on including other environmental and design characteristics in near-crash identification and also incorporating more metrics and thresholds as well as qualitative analysis to conduct validation and sensitivity analysis studies. Future work could also entail investigating multiple conflict severity classes, other methods, and features.

Data Availability
e data used to support the findings of this study are part of a research project and cannot be shared due to privacy reasons.
Disclosure e contents of this paper reflect the views of the authors, who are responsible for the facts and the accuracy of the information presented herein.

Conflicts of Interest
e authors declare that there are no conflicts of interest regarding the publication of this paper.