Road accident key cause identification method based on high-dimensional small sample data

By designing a feature combination algorithm and combining LightGBM and Shapely algorithms, the problem of overfitting machine learning models under high-dimensional small sample data is solved, and efficient identification of key causes of road accidents is achieved, improving the prediction accuracy and generalization performance of the model.

CN120123564APending Publication Date: 2025-06-10BEIJING UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510198557.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-23
Publication Date
2025-06-10

AI Technical Summary

Technical Problem

Existing machine learning models are prone to overfitting when processing high-dimensional small sample data, resulting in reduced prediction accuracy and insufficient generalization performance, making it difficult to accurately identify the key causes of road accidents.

Method used

A feature combination algorithm is designed to construct new features through logical addition and logical subtraction. Combining LightGBM and Shapely algorithms, a key incentive recognition framework suitable for high-dimensional small sample data is constructed.

Benefits of technology

It significantly improves the prediction accuracy and generalization performance of the model, can accurately identify the key causes of road accidents under high-dimensional small sample data, and provides technical support for road safety prevention and control measures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120123564A_ABST
    Figure CN120123564A_ABST
Patent Text Reader

Abstract

The invention provides a road accident key cause identification method based on high-dimensional small sample data, and solves the problems of low prediction precision, insufficient generalization ability and inaccurate key cause identification when an existing accident analysis model processes the high-dimensional small sample data. The method mainly comprises the following steps: 1) providing a feature combination algorithm based on logic addition and logic subtraction aiming at small sample data features so as to enhance the interpretability of data; 2) a key accident cause identification algorithm is developed by combining a LightGBM method and a Shapley value method; and 3) integrating a feature combination algorithm and an accident cause recognition algorithm into a unified framework, and constructing a key cause recognition system suitable for high-dimensional small sample data. Through actual accident data verification, the explanatory power and model prediction performance of high-dimensional small sample accident data are remarkably improved, the accident key causes can be effectively identified, and a scientific basis is provided for road accident analysis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of road traffic safety, and in particular to a method for identifying key causes of road accidents under high-dimensional small sample data. Background Art

[0002] At present, machine learning methods are widely used in road accident prediction and key cause identification. However, existing machine learning models (such as random forests, support vector machines, etc.) usually rely on large sample data. When processing high-dimensional small sample data, these models are prone to overfitting, resulting in reduced prediction accuracy, insufficient generalization performance, and low credibility of identified key causes, which in turn limits the actual effectiveness of safety prevention and control measures. Therefore, improving the prediction performance of models for high-dimensional small sample data is one of the key issues that urgently need to be addressed in the field of road safety.

[0003] Road accident data is highly complex, and high-dimensional small samples are an important reason that restricts the performance of accident analysis models. Since the occurrence of accidents and the output of injury results are random events, the number of accidents in a small area (or newly built lines, smart car accidents, etc.) is small, but the causes of accidents cover people, cars, roads, environment and other aspects. Compared with the cause dimension, the absolute number of samples is small, resulting in the data showing the characteristics of high-dimensional small samples. Rich causes are the guarantee for accurately describing accident scenarios, but only a few major influencing factors play a leading role in the output results of accidents. Therefore, the data inevitably contains redundant and irrelevant factors, resulting in increased model calculation complexity and decreased performance. At the same time, due to the small sample size, it is difficult to effectively characterize complex traffic scenes, resulting in the existing classification methods being prone to overfitting when analyzing high-dimensional small sample data, making it difficult to accurately classify accidents and identify key causes.

[0004] In order to solve the adverse effects of high-dimensional small samples, the current main methods used to improve the performance of machine learning models are model fine-tuning and transfer learning. However, both methods require a large amount of non-target data for model pre-training, which is inconsistent with the nature of high-dimensional small sample data and is difficult to fundamentally solve the problem. The method based on data enhancement does not require a lot of adjustments to the model. It uses strategies such as feature combination to deeply explore the potential relationship between influencing factors to achieve the purpose of enhancing data interpretation capabilities. It is a shortcut to improve the performance of models in high-dimensional small sample situations, but it has not yet been applied to the field of road accident analysis. Among them, the feature combination algorithm encodes and synthesizes new features for nonlinear laws in the feature space by calculating inner products, Cartesian products, etc., to improve the representation ability of small sample data, but the new features obtained by calculating inner products are difficult to interpret in traffic. It is necessary to improve the existing algorithms in combination with the nature of accidents and construct feature combination methods that conform to the laws of accidents.

[0005] In summary, existing accident analysis methods based on machine learning are difficult to essentially solve the adverse effects brought by high-dimensional small samples, and it is also difficult to deeply explore the potential information of high-dimensional small sample accidents. The method based on data augmentation provides a feasible idea for improving the interpretability of high-dimensional small sample data, but the design of a feature combination algorithm that conforms to road accidents has not been solved yet. Summary of the Invention

[0006] To overcome the problems of the above-mentioned existing technologies, the present invention designs an optimization algorithm from the aspect of feature combination, and integrates the machine learning algorithms involved in the analysis process into a comprehensive framework, in order to improve the prediction accuracy and generalization performance of the model and provide technical support for accurately identifying the accident causes of high-dimensional small sample data.

[0007] To achieve the above object, the present invention is carried out according to the following steps:

[0008] Step 1: Construct an initial data set.

[0009] Step 1.1: In the traffic accident database, obtain historical traffic accident data. At the same time, according to the time when the road accident occurred, obtain weather data on the meteorological website.

[0010] Step 1.2: Data preprocessing. It includes calculating variable correlation, detecting missing values, and deleting incorrect and outlier values.

[0011] Among them:

[0012] Calculate variable correlation. The Pearson correlation coefficient is used to measure the linear correlation between each variable. When the absolute value of the Pearson correlation coefficient of two variables is greater than 0.75, they are considered highly correlated. In order to reduce the impact of collinearity on the model, one of the variables can be deleted.

[0013] Detect missing values. Traverse the data set to detect whether there are missing values. If there are missing values, mean imputation is used.

[0014] Delete incorrect values and outlier values. Incorrect values refer to values that are logically or physically unreasonable in the data. For example, a negative speed or an unacceptable range, usually filtered according to the background of the specific variable. Outlier values refer to values that are far from the normal data distribution, and the 3-sigma method is used to detect and remove outlier values.

[0015] Step 1.3: Selection of independent variables. The independent variables are accident causes. An independent variable system is constructed based on traffic participants, vehicles, roads, and the environment. Among them:

[0016] The independent variables in terms of time features include month (Month), day (Week), and time (Time).

[0017] Independent variables regarding the characteristics of accident participants include gender, age, person type (P_TYPE), driving experience (D_AGE), seat belt / helmet usage (S / H_USA).

[0018] Independent variables regarding vehicle characteristics include overloading situation (V_OVE), vehicle driving status (V_STA), vehicle usage nature (V_NAT), vehicle turn signal status (V_TUS), lighting status (V_LIS), airbag status (V_AIS), vehicle type (V_TYPE), and vehicle fuel type (F_TYPE).

[0019] Independent variables regarding road characteristics include accident cross-section location (R_CSL), road surface condition (R_CON), traffic control method (T_CM), road type (R_TYPE), road alignment (R_ALI), intersection section type (R_STY), physical isolation of the road (PIS_ROAD), road surface structure (P_STR), and roadside protection facilities (R_PRO).

[0020] Independent variables regarding environmental characteristics include weather, visibility, road surface condition (R_TABLE), and lighting condition (L_CON).

[0021] Furthermore, based on the actual physical meaning of the independent variables, they are classified at multiple levels to refine the accident scenarios. For example, month (Month) is divided into Month_1 (spring), Month_2 (summer), Month_3 (autumn), and Month_4 (winter).

[0022] Step 1.4: Selection of dependent variable. The dependent variable is the accident injury level. Based on the number of deaths, the number of injured, direct property losses, the number of involved motor vehicles, and the degree of human body injury, the second-order clustering method is used for clustering to divide accidents into different injury levels to reflect their severity.

[0023] Step 2: Construct a feature combination algorithm to improve the representation ability of small-sample data.

[0024] Regarding the problem that the new variables constructed by the existing feature combination algorithms are difficult to interpret in accidents, based on the essence that accidents are induced by the coupling of multiple factors under adverse conditions, a feature combination algorithm is constructed by using logical addition (sum) and subtraction (diff). The feature combination algorithm is shown in (1) - (2):

[0025]

[0026] In formulas (1) and (2) represents accident sample i in independent variable xa , x b The value on it. To avoid exacerbating overfitting with too many new variables, a classification decision tree is used to calculate the scores of independent variables, and the top 10% of the new variables with the highest scores are selected and inserted into the initial data to construct dataset (a) and evaluate the feature combination algorithm. The formula for calculating the scores of independent variables is as follows:

[0027]

[0028] In Equation (3), Score(j) is the score value of independent variable j, which represents the weighted sum of △Gini of all decision tree nodes according to the sample ratio to obtain the overall score of independent variable j. represents the proportion of the number of samples at node t in the overall data, reflecting the importance of this node. n t is dataset Y t The total number of samples in dataset Y that belong to node t; N is the total number of samples; T is the total number of nodes in the classification decision tree. △Gini(Y t , j) represents the reduction in the Gini index after dividing the data by independent variable j at node t, reflecting the contribution of independent variable j in distinguishing accidents of different injury levels. Y t represents the subset of the target variable in the current node t, which contains the category information of all samples in the current node t. The more the addition of independent variable j can reduce the Gini index, the greater its classification contribution. The calculation method of △Gini(Y t , j) is shown in Equations (4) - (5).

[0029]

[0030] In Equation (4), Gini(Y t ) represents the data purity of Gini of decision tree node t. The lower the value, the higher the purity of the node. The calculation process is shown in Equation (5). K is the total number of accident injury levels (K = 1, 2,... k; k is the total number of accident injury categories). p k is the sample ratio of category k in node t. represents the weighted Gini index of the child nodes after independent variable j divides node t. represents the datasets of the left and right child nodes formed after independent variable j divides t. represents the number of samples in the left and right child nodes. n t is the total number of samples at node t.

[0031] Step 3: Construct a calculation method for the importance of accident causes. Combining the LightGBM and Shapely (SHapley Additive exPlanations) algorithms, construct an accident key cause identification algorithm. Among them, LightGBM is used to train the accident prediction model. The modeling process of LightGBM is relatively mature and will not be introduced in detail; the Shapley value is used to evaluate the impact of independent variables on the severity of the accident. For each independent variable x 1 , x 2 ,..., x m in the independent variable set X = {x j , the Shapley value (φ j ) is used to quantify the contribution of the independent variable x j to the model output, that is, the importance of the independent variable.

[0032]

[0033] In Equation (6), φ j is the Shapley value of the independent variable (accident cause) j, representing the average marginal contribution of the independent variable j to the accident injury level prediction result; m is the total set of independent variables including all traffic risk influencing factors; is an arbitrary subset that does not include the independent variable j; since the differences brought about by considering the combination of the independent variable j with all other possible subsets need to be considered, Equation (6) uses to sum over all possible subsets of independent variables. f(S) is the accident injury level prediction result when only using the subset S of independent variables; f(S ∪ {j}) represents the model prediction value after adding the independent variable j to the subset S of independent variables; |S|! is the factorial of the subset S of independent variables, (|m| - |S| - 1)! is the number of permutation ways of the remaining independent variables (excluding the subset S of independent variables); |m|! is the factorial of all independent variables (the total number of permutation ways). By weighting and averaging the "marginal contribution" with these combination and permutation coefficients, φ j can reflect the "average contribution degree" of the independent variable j in all possible scenarios, that is, the importance of the independent variable.

[0034] Step 4: Design a model training strategy.

[0035] Step 4.1: Dataset division. To evaluate the effectiveness of the feature combination algorithm on high-dimensional small-sample data, based on the initial dataset, Dataset (a), the data is divided into a training set and a test set according to the ratio of 75% to 25%.

[0036] Step 4.2: Hyperparameter tuning. Using 5-fold cross-validation and the logarithmic loss function, select the hill-climbing algorithm to adjust the hyperparameters. Among them, the reasons for the selection of each training strategy are as follows:

[0037] 5-fold cross-validation. The training dataset is divided into 5 equal parts. One subset is alternately selected as the validation set, and the remaining 4 subsets are used for training. The performance of the model is evaluated through 5 trainings to ensure the robustness of model training.

[0038] Logarithmic loss function. The logarithmic loss function is used as the optimization objective to quantify the difference between the model prediction results and the actual categories, aiming to improve the prediction accuracy of the model by minimizing the logarithmic loss value.

[0039] Hill climbing algorithm. The hill climbing algorithm is adopted to gradually adjust the hyperparameter combination of the model. Each time, a small change is made around the current hyperparameter combination, and the direction that minimizes the logarithmic loss function value is selected to update the parameters. When the improvement in the logarithmic loss for 3 consecutive iterations is less than 0.001, it is determined that the model has converged and the search stops.

[0040] Optimal determination. As the number of hyperparameter iterations increases, when the improvement in the logarithmic loss value is less than 0.001 in 3 consecutive iterations, it is considered that the change is no longer significant, the hyperparameters have reached the optimal configuration, and the final model parameters are determined accordingly.

[0041] Step 5: Construct a model evaluation index system.

[0042] Step 5.1: Construct model prediction accuracy evaluation indicators. Precision, Recall, and F1-measure are selected as the prediction accuracy evaluation indicators. If the accident severity is "injured" and "not injured", taking the "injured" category as an example, its prediction accuracy evaluation indicators include the following:

[0043] Precision. It is used to measure the accuracy of the model when predicting "injured", that is, among the samples predicted by the model as "injured", what proportion actually truly belongs to the "injured" category. This indicator focuses on precision and pays attention to how many are correct when the model judges "injured".

[0044] Recall. It is used to measure how many of all the actual "injured" samples the model can find, that is, among all the accident samples that are truly injured, how many can the model identify. This indicator is more inclined to recall and pays attention to how many the model can find among all "injured" samples.

[0045] F-measure. It is obtained through the harmonic mean of Precision and Recall, comprehensively evaluating the overall performance of the model, and is applicable to situations where a balance needs to be achieved between precision and recall.

[0046] Step 5.2: Construct a generalization performance evaluation metric. The area under the ROC (Receiver Operating Characteristic Curve), denoted as AUC (Area Under Curve), is used to evaluate the generalization performance of the model. The closer the AUC is to 1, the better the generalization performance. Evaluating the generalization performance of the accident prediction model through AUC can ensure that the model also has good application performance on other datasets.

[0047] Compared with the existing technologies, the beneficial effects of the present invention are as follows:

[0048] 1. Aiming at the problem of strong heterogeneity in small-sample accident data. Based on the second-order clustering method, the present invention comprehensively considers the number of deaths, the number of injured, the direct property loss, the number of involved motor vehicles, and the degree of human body injury to cluster the accident levels. This strategy helps to reduce the heterogeneity of high-dimensional small-sample accident data and improve the prediction accuracy of the model.

[0049] 2. Aiming at the small-sample problem of accident data. Based on the essence that accidents are induced by the coupling of multiple factors under adverse conditions, the present invention constructs a feature combination algorithm by using logical addition (sum) and logical subtraction (diff). This strategy can further improve the representation ability of small-sample accident data.

[0050] 3. By integrating algorithms such as the feature combination algorithm, LightGBM, and Shapely, a key cause identification framework suitable for high-dimensional small samples is constructed. This framework can significantly improve the accident data interpretation ability and the model prediction performance, and can provide technical support for accurately identifying the key causes of accidents under high-dimensional small-sample data. Description of the Drawings

[0051] Figure 1 Key Cause Identification Framework for Road Accidents under High-Dimensional Small-Sample Data

[0052] Figure 2 Learning curves of the LightGBM algorithm before and after data optimization: (a) is the initial dataset, and (b) is the dataset optimized by the feature combination algorithm

[0053] Figure 3 ROC curves of accidents with different injury levels: (a)-(c) are general accidents, relatively large accidents, and major accidents

[0054] Figure 4 Identification Results of Key Causes of Road Accidents Detailed Embodiments

[0055] In this embodiment, taking the road traffic accidents in a certain city in southern China as an example, the following steps are carried out: Figure 1 Steps:

[0056] Step 1: Collection and preprocessing of road accident data.

[0057] Step 1.1: Based on the road accident record database of this city from 2018 to 2020, obtain historical traffic accident data. At the same time, according to the time when the road accident occurred, obtain index data such as weather and visibility at the meteorological station.

[0058] Step 1.2: Data preprocessing. It includes calculating variable correlations, detecting missing values, and deleting incorrect values and outliers.

[0059] Among them:

[0060] Calculate variable correlations. The Pearson correlation coefficient is used to measure the linear correlation between each variable. When the absolute value of the Pearson correlation coefficient of two variables is greater than 0.75, they are considered highly correlated. In order to reduce the impact of collinearity on the model, one of the variables can be deleted.

[0061] Detect missing values. Traverse the data set to detect whether there are missing values. If there are missing values, imputation is performed using the mean value.

[0062] Delete incorrect values and outliers. Incorrect values refer to values that are logically or physically unreasonable in the data. For example, a negative speed or an unacceptable range, usually filtered according to the background of the specific variable. Outliers refer to values that are far from the normal data distribution, and the 3-sigma method is used to detect and remove outliers.

[0063] Step 1.3: Select independent variables. The independent variables are accident causations. In order to further refine the small-sample accident scenarios, the present invention comprehensively considers accident causations in terms of time characteristics, traffic participants, vehicles, roads and the environment, constructs an independent variable system, and conducts multi-level classification in combination with the actual meanings of the independent variables. The independent variables are as follows:

[0064] The independent variables in terms of time characteristics include Month, Week, and Time. Among them, Month is divided into Month_1 (spring), Month_2 (summer), Month_3 (autumn), Month_4 (winter); Week is divided into Week_1 (Monday), Week_2 (Tuesday, Wednesday, Thursday), Week_3 (Friday), Week_4 (Saturday, Sunday); Time is divided into Time_1 ([0, 6] o'clock), Time_2 ((6, 12] o'clock), Time_3 ((12, 18] o'clock), Time_4 ((18, 24] o'clock).

[0065] The independent variables in terms of the characteristics of accident participants include gender (Gender), age (Age), personnel type (P_TYPE), driving experience (D_AGE), seat belt / helmet usage (S / H_USA). Among them, Gender is divided into Gender_1 (male) and Gender_2 (female); Age is divided into Age_1 ((0, 18] years old), Age_2 ((18, 25] years old), Age_3 ((25, 64] years old), and Age_4 (over 64 years old); P_TYPE is divided into P_TYPE_1 (government employees), P_TYPE_2 (self-employed), and P_TYPE (no formal occupation); D_AGE is divided into D_AGE_1 ((0, 2] years), D_AGE_2 ((2, 6] years), D_AGE_3 ((6, 10] years), and D_AGE_4 (over 10 years); S / H_USA is divided into S / H_USA_1 (not worn / used properly) and S / H_USA_2 (not worn / used properly).

[0066] The independent variables in terms of vehicle characteristics include overloading situation (V_OVE), vehicle driving status (V_STA), vehicle usage nature (V_NAT), vehicle turn signal status (V_TUS), lighting status (V_LIS), airbag status (V_AIS), vehicle type (V_TYPE), and vehicle fuel used (F_TYPE). Among them, V_OVE is divided into V_OVE_1 (overloaded) and V_OVE_2 (not overloaded); V_STA is divided into V_STA_1 (going straight), V_STA_2 (turning), V_STA_3 (changing lanes), and V_STA_4 (others); V_NAT is divided into V_NAT_1 (public transportation) and V_NAT_2 (private car); V_TUS is divided into V_TUS_1 (on) and V_TUS_2 (off); V_LIS is divided into V_LIS_1 (on) and V_LIS_2 (off); V_AIS is divided into V_AIS_1 (no airbag), V_AIS_2 (not deployed after collision), and V_AIS_3 (deployed after collision); V_TYPE is divided into V_TYPE_1 (truck), V_TYPE_2 (bus), and V_TYPE_3 (motorcycle); F_TYPE is divided into F_TYPE_1 (gasoline), F_TYPE_2 (diesel), and F_TYPE_3 (new energy).

[0067] Independent variables in terms of road characteristics include accident cross-section location (R_CSL), road surface condition (R_CON), traffic control method (T_CM), road type (R_TYPE), road alignment (R_ALI), intersection section type (R_STY), physical road isolation (PIS_ROAD), road surface structure (P_STR), and roadside protection facilities (R_PRO). Among them, R_CSL is divided into R_CSL_1 (motor vehicle lane), R_CSL_2 (motor vehicle and non-motor vehicle mixed lane), and R_CSL_3 (non-motor vehicle lane); R_CON is divided into R_CON_1 (intact road surface) and R_CON_2 (damaged road surface); T_CM is divided into T_CM_1 (signs and markings), T_CM_2 (traffic lights), T_CM_3 (comprehensive control), and T_CM_4 (no control); R_TYPE is divided into R_TYPE_1 (expressways and Class 1-4 highways) and R_TYPE_2 (urban roads); R_ALI is divided into R_ALI_1 (sharp curves and steep slopes) and R_ALI_2 (straight sections); R_STY is divided into R_STY_1 (multi-branched intersections), R_STY_2 (ordinary sections), and R_STY_3 (other special sections); PIS_ROAD is divided into PIS_ROAD_1 (central isolation), PIS_ROAD_2 (motor vehicle and non-motor vehicle isolation), PIS_ROAD_3 (central isolation and motor vehicle and non-motor vehicle isolation), and PIS_ROAD_4 (no isolation); P_STR is divided into P_STR_1 (asphalt) and P_STR_2 (cement); R_PRO is divided into R_PRO_1 (guardrail), R_PRO_2 (green belt), and R_PRO_3 (no protection). Other special sections refer to sections other than the listed ones, and all other sections are classified here.

[0068] Independent variables in terms of environmental characteristics include weather, visibility, road surface condition (R_TABLE), and lighting condition (L_CON). Among them, Weather is divided into Weather_1 (sunny day), Weather_2 (cloudy day), and Weather_3 (rain, snow, and fog); Visibility is divided into Visibility_1 (less than 50 meters), Visibility_2 (50 - 100 meters), Visibility_3 (100 - 200 meters), and Visibility_4 (more than 200 meters); R_TABLE is divided into R_TABLE_1 (dry) and R_TABLE_2 (wet, ice, snow, and water accumulation); L_CON is divided into L_CON_1 (daytime), L_CON_2 (dusk, dawn), L_CON_3 (night without street lights), and L_CON_4 (night with street lights).

[0069] The independent variables of the accident characteristics category include accident causes (A_IDE) and vehicle-to-vehicle accidents (VTOV_ACC). Among them, A_IDE is divided into A_IDE_1 (speeding, overloading), A_IDE_2 (drunk driving), and A_IDE_3 (improper driver operation); VTOV_ACC is divided into VTOV_ACC_1 (side collision), VTOV_ACC_2 (hitting and scraping pedestrians), VTOV_ACC_3 (rear-end collision), and VTOV_ACC_4 (opposite collision and scraping).

[0070] For the convenience of subsequent calculations, all independent variables are encoded as 0 or 1. For example, Month_1 = {0, 1}, where Month_1 = 1 indicates that the accident occurred in spring, and Month_1 = 0 indicates that the accident occurred in other seasons.

[0071] Step 1.4: Determine the dependent variable. The dependent variable is the accident injury level. Traditional accident level determination methods only consider accident output results such as the number of deaths, the number of injured, and direct property losses. Although a feasible classification can be obtained, it cannot ensure that each subdivision is composed of homogeneous traffic accident groups. In order to further reduce the heterogeneity of high-dimensional small-sample accident data, the present invention is based on a second-order clustering method, and clusters the accident levels based on the total number of deaths, the total number of injured, direct property losses, the number of involved motor vehicles, and the degree of human body injury.

[0072] According to the Bayesian information criterion, the optimal number of clusters is determined to be 3 (named general, large, and major accidents respectively), the clustering silhouette value is 0.7, and there are significant differences in the mean values of clustering variables for different injury levels, and the clustering results are reasonable. Among them:

[0073] The clustering means of the total number of injured (individuals) in general, large, and major accidents are 1.11, 1.37, and 0.31 respectively; the clustering means of the total number of deaths (individuals) in general, large, and major accidents are 0.00, 0.0015, and 1.03 respectively; the clustering means of the degree of human body injury in general, large, and major accidents are 1.00, 2.14, and 4.00 respectively; the clustering means of direct property losses (yuan) in general, large, and major accidents are 1992.54, 2649.77, and 2791.75 respectively; the clustering means of the number of involved motor vehicles (vehicles) in general, large, and major accidents are 1.08, 1.06, and 1.27 respectively. In addition, when clustering the dependent variable in this embodiment, the number of injured does not include the number of deaths, so the mean value of the total number of injured in major accidents is less than that of the other two groups; the number of involved motor vehicles does not include motorcycles; the degree of human body injury includes death, serious injury, minor injury, and slight injury, and is represented by 1, 2, 3, and 4.

[0074] Step 2: Construct new variables based on the feature combination algorithm.

[0075] New variables are constructed based on Formula (1) and Formula (2) in the content of the present invention, and the scores of the new variables are calculated in combination with Formula (3). The results show that the new variables with scores ranked in the top 10% are V_STA_3_sum_A_IDE_2 (score 0.97), F_TYPE_1_sum_V_STA_3 (score 0.96), V_STA_3_sum_R_TYPE_2 (score 0.96), R_TYPE_1_diff_V_STA_3 (score 0.96), V_STA_3_diff_V_AIS_1 (score 0.96), V_STA_3_diff_F_TYPE_2 (score 0.95), V_STA_3_diff_V_TYPE_1 (score 0.95), V_TYPE_2_sum_V_STA_3 (score 0.94), V_AIS_2_sum_V_STA_3 (score 0.94), V_STA_3_diff_V_TYPE_3 (score 0.94).

[0076] The new variables have strong interpretability (score > 0.9). For example, V_STA_3_sum_A_IDE_2 represents the combination of "drunk driving" and "lane change", forming a new accident scenario of "lane change under drunk driving", which helps to improve the richness of small-sample accident scenarios; V_STA_3_diff_V_TYPE_3 means excluding motorcycles from accidents caused by lane change, and accidents induced by lane change are almost caused by cars. Excluding motorcycles helps to reduce data heterogeneity. Insert the new variables into the initial data to construct dataset (a) to evaluate the applicability of the feature combination algorithm in high-dimensional small-sample data.

[0077] Step 3: Combine Formula (4) in the content of the present invention to train the road accident model and identify key accident causes.

[0078] Step 4: Construct a dataset partitioning and hyperparameter tuning strategy.

[0079] Step 4.1: Dataset partitioning. To evaluate the effectiveness of each optimization algorithm on high-dimensional small-sample data, based on the initial dataset and dataset (a), the data is partitioned into a training set (including a validation set) and a test set according to a ratio of 75% and 25%.

[0080] Step 4.2: Dataset partitioning. Use 5-fold cross-validation and the logarithmic loss function to select the hill-climbing algorithm to adjust the hyperparameters. As the number of iterations increases, the logarithmic loss function no longer changes significantly, and the hyperparameters reach the optimal values. The hyperparameter tuning results are as follows Figure 2As shown in (a)-(b). Compared with the initial dataset, the logarithmic loss value of LightGBM based on the feature combination algorithm decreased by 0.18, indicating that the feature combination algorithm can improve the model performance by enhancing the richness of small-sample accident scenarios.

[0081] Step 5: Construct model evaluation metrics.

[0082] Step 5.1: Construct model prediction accuracy evaluation metrics. Based on the confusion matrix, Precision, Recall, and F-measure are selected as prediction accuracy evaluation metrics. The model prediction performance under different optimization strategies is shown in Table 1.

[0083] Table 1 LightGBM prediction accuracy before and after optimization

[0084]

[0085] It can be seen from Table 1 that the prediction performance of LightGBM on the dataset optimized by the feature combination algorithm is significantly higher than that of the initial dataset. Among them, based on the initial dataset, the prediction accuracy of LightGBM in predicting major accidents is difficult to meet the requirements (Precision = 0.63, Recall = 0.53), indicating that the existing model is difficult to achieve accurate prediction for high-dimensional small-sample data. Based on the dataset optimized by the feature combination algorithm, the prediction accuracy of accidents at each level has been significantly improved (F-measure = 0.80, 0.73, 0.78), indicating that the feature combination algorithm can improve the prediction accuracy of accidents in high-dimensional small-sample data.

[0086] Step 5.2: Construct generalization performance evaluation metrics. Taking the false positive rate as the horizontal axis and the true positive rate as the vertical axis, draw the ROC curve, and the result is as Figure 3 shown. By comparing the AUC of accidents at different levels, it can be seen that the generalization performance of LightGBM on the dataset optimized by the feature combination algorithm is significantly higher than that of the initial dataset. Among them, on the initial data, the generalization performance of LightGBM in general and major accidents is poor (AUC = 0.76, 0.84, 0.74), indicating that the existing model is difficult to overcome the adverse effects of high-dimensional small samples on the generalization performance. On the dataset (a) optimized by the feature combination algorithm (AUC = 0.90, 0.93, 0.90), the generalization ability of accidents at each level has been significantly improved.

[0087] Through comprehensive analysis of the prediction accuracy and generalization performance, LightGBM has obtained satisfactory prediction accuracy and generalization performance on the dataset optimized by the feature combination algorithm, which can provide a research basis for identifying the key inducements of road accidents.

[0088] Step 6: Identify key inducements.

[0089] Based on Step 5 and combined with the SHAP framework, calculate the importance of inducements, and the results are as Figure 4 shown. It can be seen from Figure 4 that driving behaviors such as lane change and turning (V_STA_3_sum_A_IDE_2, V_STA_3_diff_V_TYPE_1, V_STA_3_diff_V_TYPE_3, VTOV_ACC_1, V_STA_2), highways and elderly drivers (R_TYPE_1, Age_4), motorcycles (V_TYPE_3), and roads without standardized safety measures (T_CM_4, T_CM_1, R_PRO_3, PIS_ROAD_4), etc. are the key inducements, which is in line with the reality. This framework can accurately identify the key inducements of accidents under the condition of high-dimensional small-sample data.

[0090] In summary, the present invention is directed to high-dimensional small-sample data, starts from feature combination, combines the LightGBM and Shapely algorithms, and proposes a key inducement analysis framework, which can provide a method for accurately identifying the key inducements of accidents.

[0091] The specific embodiments described above have further elaborated on the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only the specific embodiments of the present invention and is not used to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.

[0092] The content not described in detail in this specification belongs to the well-known prior art of those skilled in the art.

Claims

1. A method for identifying key causes of road accidents based on high-dimensional small sample data, characterized by Proceed as follows: Step 1: Build the initial data set; Step 1.1, obtain historical traffic accident data from the traffic accident database; at the same time, obtain weather data from the meteorological website according to the time of the accident; Step 1.2: Data preprocessing; It includes calculating variable correlation, detecting missing values, and removing incorrect and outliers; among them: Calculate the correlation of variables; use the Pearson correlation coefficient to measure the linear correlation between each variable; when the absolute value of the Pearson correlation coefficient of two variables is greater than 0.75, they are considered to be highly correlated; in order to reduce the impact of variable collinearity on the model, choose to delete one of the variables; Detect missing values; traverse the data set to detect whether there are missing values; if there are missing values, use the mean to interpolate; Delete incorrect values ​​and outliers; incorrect values ​​refer to values ​​that are logically or physically unreasonable in the data; for example, speed is negative or in an unacceptable range, which is usually filtered according to the background of the specific variable; outliers refer to values ​​that are far away from the normal data distribution, and the 3 times standard deviation method is used to detect and eliminate outliers; Step 1.3, independent variable selection; the independent variable is the cause of the accident; the independent variable system is constructed based on traffic participants, vehicles, roads and environment; among them: The independent variables of time characteristics include month (Month), day (Week), and time (Time); The independent variables in terms of accident participant characteristics include gender (Gender), age (Age), person type (P_TYPE), driving experience (D_AGE), and seat belt / helmet usage (S / H_USA); The independent variables of vehicle characteristics include overloading condition (V_OVE), vehicle driving status (V_STA), vehicle usage nature (V_NAT), vehicle turn signal status (V_TUS), lighting status (V_LIS), airbag status (V_AIS), vehicle type (V_TYPE), and vehicle fuel (F_TYPE); The independent variables of road characteristics include accident cross-section location (R_CSL), road condition (R_CON), traffic control method (T_CM), road type (R_TYPE), road alignment (R_ALI), intersection section type (R_STY), road physical separation (PIS_ROAD), road surface structure (P_STR), and roadside protection facilities (R_PRO); The independent variables of environmental characteristics include weather (Weather), visibility (Visibility), road surface conditions (R_TABLE), and lighting conditions (L_CON); Step 1.4, selection of dependent variables; the dependent variable is the accident injury level; based on the number of deaths, number of injuries, direct property losses, number of motor vehicles involved and degree of human injury, the second-order clustering method is used to divide the accidents into different injury levels to reflect the severity of the injuries; Step 2: Construct a feature combination algorithm to improve the representation capability of small sample data; A feature combination method based on logical addition (sum) and logical subtraction (diff) is proposed, and a classification decision tree is introduced to score the newly constructed variables to screen out the variables that contribute more to accident prediction and avoid overfitting caused by too many redundant variables. The specific steps are as follows: In formula (1) and (2), Indicates that accident sample i has a ,x b The value of the above; the classification decision tree is used to calculate the score of the independent variable, and the new variables with the top 10% scores are selected to insert into the initial data, and the data set (a) is constructed to evaluate the feature combination algorithm; the formula for calculating the score of the independent variable is as follows: In formula (3), Score(j) is the score value of independent variable j, which means that the △Gini of all decision tree nodes is weighted and summed according to the sample ratio to obtain the overall score of independent variable j; It indicates the proportion of node t samples in the overall data, reflecting the importance of the node; n t is the dataset Y t The total number of samples belonging to node t in the classification decision tree; N is the total number of samples; T is the total number of nodes in the classification decision tree; △Gini(Y t ,j) represents the reduction of the Gini index after the independent variable j divides the data at node t, reflecting the contribution of the independent variable j in distinguishing accidents of different injury levels; Y t represents a subset of the target variable in the current node t, which contains the category information of all samples in the current node t; the more the addition of independent variable j can reduce the Gini index, the greater its classification contribution; △Gini(Y t ,j) is calculated as shown in formulas (4) to (5); In formula (4), Gini(Y t ) represents the data purity of Gini of decision tree node t. The lower the value, the higher the purity of the node. The calculation process is shown in formula (5); K is the total number of accident injury levels (K = 1, 2, ... k; k is the total number of accident injury categories); p k is the sample ratio of category k in node t; It represents the weighted Gini index of the child nodes after the node t is divided by the independent variable j; Represents the data set of left and right child nodes formed after the independent variable j divides t; Indicates the number of samples of the left child node and the right child node; n t is the total number of samples of decision tree node t; Step 3: Construct an accident cause importance calculation method; combine LightGBM and Shapely (Shapley AdditiveexPlanations) algorithm to construct an accident key cause identification algorithm; LightGBM is used to train the accident prediction model; Shapley value is used to evaluate the impact of independent variables on the severity of the accident; for the independent variable set X = {x1, x2, ..., x m } for each independent variable x j , using the Shapley value (φ j ) to quantify the independent variable x j Contribution to the model output, i.e., the importance of the independent variables; In formula (6), φ j is the Shapely value of the independent variable, i.e., the accident cause j, which represents the average marginal contribution of the independent variable j to the prediction result of the accident injury level; m is the total set of independent variables including all traffic risk influencing factors; is any subset that does not contain the independent variable j; since it is necessary to consider the differences caused by the combination of independent variable j with all other possible subsets, formula (6) adopts The sum of all possible subsets of independent variables is calculated; f(S) is the prediction result of the accident injury level when only the independent variable subset S is used; f(S∪{x j }) represents the model prediction value after adding independent variable j to the independent variable subset S; |S|! is the factorial of the independent variable subset S, (|m|-|S|-1)! is the number of permutations of the remaining independent variables, i.e., the number of permutations that do not include the independent variable subset S; |m|! is the factorial of all independent variables, i.e., the total number of permutations; the "marginal contribution" is weighted averaged through these combinations and permutation coefficients, φ j Reflects the "average contribution" of independent variable j in all possible scenarios, that is, the importance of the independent variable; Step 4: Design model training strategy; Step 4.1, data set division: To evaluate the effectiveness of the feature combination algorithm on high-dimensional small sample data, based on the initial data set and data set (a), the data is divided into a training set and a test set in a ratio of 75% and 25%; Step 4.2: Hyperparameter tuning: Use 5-fold cross validation and logarithmic loss function, and select the hill climbing algorithm to adjust the hyperparameters. The reasons for selecting each training strategy are as follows: 5-fold cross validation: Divide the training data set into 5 equal parts, alternately select 1 subset as the validation set, and use the remaining 4 subsets for training. Evaluate the model performance through 5 trainings to ensure the robustness of the model training. Logarithmic loss function: Use the logarithmic loss function as the optimization target to quantify the difference between the model prediction results and the actual categories, aiming to improve the prediction accuracy of the model by minimizing the logarithmic loss value. Hill climbing algorithm: Use the hill climbing algorithm to gradually adjust the model's hyperparameter combination, making small changes around the current hyperparameter combination each time, and select the direction that minimizes the logarithmic loss function value to update the parameters; when the logarithmic loss improvement for three consecutive iterations is less than 0.001, the model is determined to have converged and the search is stopped; Optimal judgment: As the number of hyperparameter iterations increases, when the logarithmic loss value has only improved by less than 0.001 in three consecutive iterations, it is considered that its change is no longer significant, the hyperparameters have reached the optimal configuration, and the final model parameters are determined accordingly.