Research Article

Using Multidimensional Data to Analyze Freeway Real-Time Traffic Crash Precursors Based on XGBoost-SHAP Algorithm

Table 7

Input variables.

Variable categoryVariable nameVariable description

Traffic flow variablesup_qAverage upstream detector volume 10−5 minutes before the crash
up_vAverage upstream detector speed 10−5 minutes before the crash
up_oAverage upstream detector occupancy 10−5 minutes before the crash
up_dif_qAverage of the absolute value of the difference in traffic flow in the adjacent lane of the upstream detector 10−5 minutes before the crash
up_dif_vAverage of the absolute value of the speed difference between adjacent lanes of the upstream detector 10−5 minutes before the crash
up_dif_oAverage of the absolute value of the difference in adjacent lane occupancy of upstream detectors 10−5 minutes before the crash
down_qAverage downstream detector volume 10−5 minutes before the crash
down_vAverage downstream detector speed 10−5 minutes before the crash
down_oAverage downstream detector occupancy 10−5 minutes before the crash
down_dif_qAverage of the absolute value of the difference in traffic flow between adjacent lanes of downstream detectors 10−5 minutes before the crash
down_dif_vAverage of the absolute value of the speed difference between adjacent lanes of the downstream detector 10−5 minutes before the crash
down_dif_oAverage of the absolute value of the difference in adjacent lane occupancy of downstream detectors 10−5 minutes before the crash
dif_qAbsolute value of flow difference between upstream and downstream detectors 10−5 minutes before the crash
dif_vAbsolute value of speed difference between upstream and downstream detectors 10−5 minutes before the crash
dif_oAbsolute value of upstream and downstream detector occupancy difference 10−5 minutes before the crash

Weather variablesdewpDew point (°C), take the value 1 (≤10); 2 (10–15); 3 (15–20); 4 (≥20)
visVisibility (km), taking values 1 (<1); 2 (1–5); 3 (5–10); 4 (≥10)
prepRainfall (mm), taking values 1 (0–5); 2 (5–10); 3 (≥10)

Road featureswidthRoad width (m)
lengthUpstream and downstream detector distance (km)
curveWhether it is a curve segment, takes the value 1 (curve segment); 0 (not a curve segment)
ramp_upNumber of on-ramps between upstream and downstream detectors
ramp_downNumber of down-ramps between upstream and downstream detectors

Time featuresweenkendWhether it is a weekday, takes the value 1 (weekend); 0 (weekday)
hourThe time corresponding to the traffic flow data, taking values of 0 (0–1); 1 (1–2); 2 (2–3); 3 (3–4); 4 (4–5); 5 (5–6); 6 (6–7); …; 22 (22–23); 23 (23–24)