Marine traffic accident severity prediction method based on feature engineering

Through a three-stage feature engineering method, including feature fusion, SVM-SMOTE and a combination of multiple machine learning models, the problem of insufficient model performance in the prediction of maritime accident severity is solved, more accurate prediction and risk identification are achieved, and scientific Support maritime accident investigation and safety management based on the basis.

CN119250257APending Publication Date: 2025-01-03DALIAN MARITIME UNIVERSITY
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202411221146.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-02
Publication Date
2025-01-03

AI Technical Summary

Technical Problem

The existing technology lacks effective feature engineering methods in the prediction of maritime accident severity, resulting in insufficient model performance, neglecting the coupling effect between multiple factors, and not fully solving the problem of data imbalance. The model is relatively single and lacks many Comparison of performance of prediction models.

Method used

A three-stage feature engineering method is proposed, including feature fusion, SVM-SMOTE data balance and the use of multiple machine learning models. Through association rule mining, feature importance evaluation and combination of multiple machine learning models, key influences are selected. factor and optimal prediction model.

Benefits of technology

It significantly improves the accuracy and model performance of the prediction of maritime accident severity, can better identify and understand the key influencing factors of maritime accidents, and provides scientific basis to support maritime accident investigation and safety management, reducing the risk of accidents.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119250257A_ABST
    Figure CN119250257A_ABST
Patent Text Reader

Abstract

The invention provides a maritime traffic accident severity prediction method based on feature engineering, and the method comprises the steps: constructing a maritime accident risk influence factor data set according to risk influence factors and accident severity in historical data, and carrying out the preprocessing of the data; coupling the influence factors through a feature fusion algorithm, and mining association rules; carrying out data balance analysis by using an SVM-SMOTE oversampling method, and balancing the sample proportion of serious accidents and non-serious accidents; the original influence factors are trained by using multiple machine learning models, and key influence factor subsets are screened out by calculating the importance degrees of the influence factors; and S4, evaluating an optimal model in the machine learning model through a UAR evaluation index, and predicting the severity of the marine traffic accident by using the optimal model and combining the key influence factor subset in the S4. By reasonably matching the combination of the prediction model and the oversampling method, the model performance is remarkably improved, and a comprehensive and profound insight is provided for predicting the severity of the marine accident.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of marine accident prediction, and in particular to a method for predicting the severity of marine traffic accidents based on feature engineering. Background Art

[0002] In recent years, with the development of artificial intelligence technology, machine learning (ML) has been widely used to analyze and predict maritime accidents. Machine learning models can use large amounts of data or past experience to automatically learn and optimize models to analyze maritime accidents as accurately as possible. Maritime accident data often include a large number of samples and complex data information. This makes the prediction results of conventional statistical methods inaccurate. Machine learning is much more effective than traditional research methods in identifying risk factors that affect the occurrence of accidents and predicting accident frequencies. Machine learning has a certain generalization ability and can better handle these complex data patterns. It is suitable for solving the problem of accident severity prediction under high-dimensional features. However, how to use the least features to predict more accurate results is a key scientific issue to improve maritime accident prediction.

[0003] Feature engineering refers to the process of extracting features that are useful to the model in machine learning, which directly affects the performance and effect of the model. Appropriate feature engineering techniques can help optimize the input data of the model, making the input data easier for the model to understand, and ultimately improving the performance of the machine learning model. Therefore, machine learning models that integrate feature engineering techniques can more accurately predict the severity of maritime accidents. In existing research, many studies only focus on the impact of a single factor on the severity of maritime accidents, while ignoring the coupling effect between multiple factors. At the same time, most studies have not paid attention to the problem of data imbalance, and there is still room for improvement in the performance of the prediction model. Finally, the use of models in most studies is relatively single, and there is a lack of comparison of the performance of multiple prediction models. Summary of the invention

[0004] According to the technical problems raised above, in view of the current situation of insufficient research on the prediction of the severity of maritime accidents, a method for predicting the severity of maritime traffic accidents based on feature engineering is provided with the goal of preventing serious maritime accidents and providing a safe marine environment. Relevant maritime accident investigation reports are analyzed from the perspective of safety system engineering to identify risk influencing factors and establish accident severity labels, and a three-stage feature engineering method is proposed on this basis. In the first stage, the feature fusion method is used to simplify multiple interrelated risk influencing factors into a comprehensive factor. In the second stage, the SVM-SMOTE method is used to solve the problem of class imbalance in the original data. In the third stage, a feature selection method based on the prediction model is used to screen out features that have a positive impact on the prediction model. For the output of this feature engineering, a variety of advanced machine learning models are used for prediction, and the optimal predictor is selected. At the same time, a series of ablation experiments are carried out to verify the contribution of each module in the feature engineering method to the overall model performance. Finally, the key risk influencing factors are explained and analyzed to understand the significant benefits of controlling specific risk influencing factors.

[0005] The technical means adopted by the present invention are as follows:

[0006] A method for predicting the severity of marine traffic accidents based on feature engineering, comprising:

[0007] S1. Based on the risk influencing factors and accident severity in historical data, a dataset of marine accident risk influencing factors is constructed and the data is preprocessed;

[0008] S2, couple the influencing factors in S1 through feature fusion algorithm to mine association rules;

[0009] S3. Use the SVM-SMOTE oversampling method to perform data balance analysis and balance the sample ratio of serious accidents and non-serious accidents;

[0010] S4. Use multiple machine learning models to train the original influencing factors, and screen out the key influencing factor subsets by calculating the importance of the influencing factors;

[0011] S5. Evaluate the optimal model among the machine learning models through the UAR evaluation index, and use the optimal model combined with the subset of key influencing factors in S4 to predict the severity of maritime traffic accidents.

[0012] Furthermore, the step S1 specifically includes:

[0013] The marine accident risk influencing factor dataset is constructed by extracting historical data of the marine accident dataset, marking the severity of the accidents, and extracting accident features. The marine accident risk influencing factor dataset uses the risk influencing factors of each accident as the accident feature and the accident severity label as the target category. The data preprocessing includes data cleaning and one-hot encoding of the data. The data cleaning includes filling missing values, replacing outliers, and deleting duplicate values. The one-hot encoding converts discrete multi-category attributes into binary.

[0014] Furthermore, the step S2 specifically includes:

[0015] Association rule mining, by mining frequent item sets in the data set, to find the association rules related to the severity of the accident, using the FP-Growth algorithm to mine frequent item sets:

[0016]

[0017]

[0018]

[0019] Among them, X and Y represent the item sets of influencing factors, X→Y represents the association rule from item set X to item set Y, transactions containing X refers to the number of transactions containing item set X, total transactions refers to the total number of transactions, Support represents the support, that is, the frequency of item set appearing in all transactions, Confidence(X→Y) represents the probability of including item set Y when item set X is already included, and Life(X→Y) represents the degree to which the probability of item set Y appearing is increased given the appearance of item set X;

[0020] The influencing factors with association rules are subjected to feature fusion, and the related features are merged into a new feature.

[0021] Furthermore, the step S3 specifically includes:

[0022] The SVM-SMOTE sampling balanced data method is used to perform data balance analysis, combining the SVM classifier and the SMOTE algorithm to increase the focus on minority samples;

[0023] Given a minority class sample x i and a randomly selected neighbor x zi , generate new samples x new :

[0024] x new =x i +δ×(x zi-x i )

[0025] Use the new samples and the original samples to train the SVM classifier. The objective function of the SVM classifier is:

[0026]

[0027] Where δ is a random number between [0,1], w is the decision plane normal vector, b is the bias term, and ξ i is the slack variable and C is the penalty parameter.

[0028] Furthermore, the step S4 specifically includes:

[0029] The contribution of features is evaluated by calculating feature importance, and the most representative feature subset is selected. The calculation formula of feature importance is:

[0030]

[0031] Among them, Importance(X j ) represents feature X j importance, M is the number of trees in the gradient boosting tree ensemble; L represents the number of leaf nodes; v t represents the features associated with node t; G is the amount by which the squared loss is reduced as a result of splitting at node t;

[0032] The prediction model is established using feature subsets. The logistic regression model uses coefficients to represent the contribution of each feature to the model. The calculation formula of coefficients is:

[0033]

[0034] Where m is the number of samples, x i is the feature vector of the i-th sample, y i is the label of the i-th sample, h θ (x i ) is the sigmoid function.

[0035] Furthermore, the machine learning models include: Logistic Regression, GBDT, XGBoost and LightGBM, wherein:

[0036] The Logistic Regression classification algorithm predicts the probability that a sample belongs to a certain category by mapping the output of the linear regression model to between 0 and 1 through a logistic function, and fits the training data by maximizing the likelihood function or minimizing the loss function;

[0037] The GBDT ensemble learning algorithm trains multiple decision tree models in series, and each model corrects the errors of the previous model. In each round of iteration, GBDT calculates the negative gradient of the loss function as the training target of the next decision tree model, and obtains the ensemble model by weighted combination of the prediction results of multiple tree models.

[0038] The XGBoost ensemble learning method uses a gradient boosting method based on second-order Taylor expansion to continuously adjust the labels of actual samples for under-trained samples;

[0039] The LightGBM is a prediction model based on gradient boosting and second-order Taylor expansion, which uses a histogram optimization algorithm and a gradient-based unilateral sampling technique, while combining a maximum depth limit strategy to prevent overfitting.

[0040] Furthermore, the step S5 specifically includes:

[0041] The UAR evaluation index is used to give the same weight to each category. For different machine learning models, the change in UAR scores indicates the prediction performance indicators of different machine learning models. The calculation formula is as follows:

[0042]

[0043] Among them, Q c is the number of categories c, Recall represents the recall rate;

[0044] The benefits of influencing factors in preventing severe accidents are evaluated using machine learning models and feature subsets with the highest predictive performance.

[0045] Compared with the prior art, the present invention has the following advantages:

[0046] The feature engineering-based prediction method for the severity of maritime traffic accidents provided by the present invention proposes a new framework for predicting the severity of maritime accidents. By adopting advanced feature engineering methods and multiple machine learning models, the accuracy of predicting the severity of maritime accidents is improved. The present invention has great practical significance for all stakeholders and researchers in the maritime industry. The feature engineering method proposed in the present invention effectively processes and analyzes maritime accident data, significantly improving the utilization rate and prediction accuracy of maritime accident data. The feature engineering method not only provides an important foundation for machine learning models to predict the severity of maritime accidents, but the methods and structural designs used in the framework can also be used as a general feature engineering, providing new ideas for the construction of feature processing methods. In addition, the feature fusion method proposed in the present invention can better identify and understand the key influencing factors of maritime accidents, and can help to deeply understand the evolution pattern of maritime accident risks. Analyzing maritime accidents in combination with the accident severity prediction model can help maritime safety managers improve targeted ship safety management systems, ultimately reducing the risk of accidents and reducing the probability of maritime accidents.

[0047] From the perspective of practical value, first of all, the relevant departments can apply the accident severity prediction model proposed in the present invention to obtain early warning information in a timely manner, take the most effective action quickly, and reduce the losses caused by the accident. And according to the prediction results, the dispatch of rescue resources can be optimized, the allocation of personnel and materials can be reasonably arranged, the effectiveness of the rescue operation can be ensured, and casualties and property losses can be minimized. Secondly, the results of the present invention provide marine accident investigation agencies or experts with investigation technology supported by scientific basis, and provide technical support for further improving the process and methods of maritime accident investigation. Finally, the present invention can also provide students with more practical teaching opportunities, such as teaching materials and practical activities that simulate accident scenes. This can help students apply theoretical knowledge to actual situations and cultivate their ability to solve practical problems in complex maritime scenarios.

[0048] Based on the above reasons, the present invention can be widely promoted in the field of marine accident prediction. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0050] Figure 1 This is a schematic diagram of the principle of the method for predicting the severity of marine traffic accidents based on feature engineering of the present invention.

[0051] Figure 2 This is the SVM-SMOTE balancing data flow chart of the present invention.

[0052] Figure 3 It is the UAR score of each feature number in the feature selection process in the embodiment of the present invention.

[0053] Figure 4 This is a graph showing changes in UAR scores in an embodiment of the present invention. DETAILED DESCRIPTION

[0054] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0055] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0056] like Figure 1 As shown, the present invention provides a method for predicting the severity of marine traffic accidents based on feature engineering, which is characterized by comprising:

[0057] S1. Based on the risk influencing factors and accident severity in historical data, a dataset of marine accident risk influencing factors is constructed and the data is preprocessed;

[0058] In specific implementation, as a preferred embodiment of the present invention, the step S1 specifically includes:

[0059] The marine accident risk influencing factor dataset is constructed by extracting historical data of the marine accident dataset, marking the severity of the accidents, and extracting accident features. The marine accident risk influencing factor dataset uses the risk influencing factors of each accident as the accident feature and the accident severity label as the target category. The data preprocessing includes data cleaning and one-hot encoding of the data. The data cleaning includes filling missing values, replacing outliers, and deleting duplicate values. The one-hot encoding converts discrete multi-category attributes into binary.

[0060] In the implementation, human, ship, environment, management factors and basic accident information are extracted from the accident investigation report as standard-level features of the marine accident risk influencing factor data set. In the data processing stage, the above five standard-level features are classified into 37 index-level features.

[0061] Feature engineering technology includes the following methods: (1) It is used to identify the interaction of risk factors affecting marine accidents, and at the same time, it is used to construct coupled risk factors by fusing single risk factors. Method; (2) It can synthesize new minority class samples in the feature space, and solve the problem of poor learning effect of the model for minority class samples by increasing the number of minority class samples. (3) It can screen out features with information content, reduce the dimension of data, improve the generalization ability of the model, and speed up the model training and save computing resources.

[0062] S2, couple the influencing factors in S1 through feature fusion algorithm to mine association rules;

[0063] The feature fusion algorithm can mine the interactions between accident features that affect maritime accidents and construct coupling risk factors. First, association rule mining is performed to discover association rules related to the severity of accidents by mining frequent item sets in the data set. Due to the large scale of maritime accident data, the efficiency of mining rules needs to be considered. Compared with other association rule algorithms that need to generate candidate sets, FP-Growth is usually more efficient on large-scale data sets.

[0064] In specific implementation, as a preferred embodiment of the present invention, step S2 specifically includes:

[0065] Association rule mining, by mining frequent item sets in the data set, to find the association rules related to the severity of the accident, using the FP-Growth algorithm to mine frequent item sets:

[0066]

[0067]

[0068]

[0069] Among them, X and Y represent the item sets of influencing factors, X→Y represents the association rule from item set X to item set Y, transactions containing X refers to the number of transactions containing item set X, total transactions refers to the total number of transactions, Support represents the support, that is, the frequency of item set appearing in all transactions, Confidence(X→Y) represents the probability of including item set Y when item set X is already included, and Life(X→Y) represents the degree to which the probability of item set Y appearing is increased given the appearance of item set X;

[0070] The influencing factors with association rules are subjected to feature fusion, and the related features are fused into a new feature to reduce redundant information, reduce feature dimension, and retain useful information.

[0071] S3. Use the SVM-SMOTE oversampling method to perform data balance analysis and balance the sample ratio of serious accidents and non-serious accidents;

[0072] SVM-SMOTE makes full use of the advantages of SVM classifier and SMOTE algorithm, effectively improves the attention paid to minority class samples, and is suitable for processing complex maritime accident data. The process of SVM-SMOTE generating minority class samples is as follows: Figure 2 shown.

[0073] In specific implementation, as a preferred embodiment of the present invention, step S3 specifically includes:

[0074] The SVM-SMOTE sampling balanced data method is used to perform data balance analysis, combining the SVM classifier and the SMOTE algorithm to increase the focus on minority samples;

[0075] Given a minority class sample x i and a randomly selected neighbor x zi , generate new samples x new :

[0076] x new =x i +δ×(x zi -x i )

[0077] For the generated new samples, their weights are adjusted according to the error between the output of the SVM classifier and the actual label. This makes the synthetic samples more likely to become support vectors and have a greater impact on the SVM classifier. The SVM classifier is trained using the new samples and the original samples. The objective function of the SVM classifier is:

[0078]

[0079] Where δ is a random number between [0,1], w is the decision plane normal vector, b is the bias term, and ξ i is the slack variable and C is the penalty parameter.

[0080] S4. Use multiple machine learning models to train the original influencing factors, and screen out the key influencing factor subsets by calculating the importance of the influencing factors;

[0081] Use the machine learning model to pre-train the original features. Secondly, evaluate the contribution of the features by calculating the feature importance and select the most representative feature subset. Finally, use the feature subset to build a prediction model. It is worth noting that the logistic regression model cannot directly display the feature importance like some tree structure models. Therefore, the logistic regression model uses coefficients to represent the contribution of each feature to the model.

[0082] In specific implementation, as a preferred embodiment of the present invention, step S4 specifically includes:

[0083] The contribution of features is evaluated by calculating feature importance, and the most representative feature subset is selected. The calculation formula of feature importance is:

[0084]

[0085] Among them, Importance(X j ) represents feature X j importance, M is the number of trees in the gradient boosting tree ensemble; L represents the number of leaf nodes; v t represents the features associated with node t; G is the amount by which the squared loss is reduced as a result of splitting at node t;

[0086] The prediction model is established using feature subsets. The logistic regression model uses coefficients to represent the contribution of each feature to the model. The calculation formula of coefficients is:

[0087]

[0088] Where m is the number of samples, x i is the feature vector of the i-th sample, y i is the label of the i-th sample, h θ (x i ) is the sigmoid function.

[0089] In the specific implementation, as a preferred embodiment of the present invention, the machine learning model includes: LogisticRegression, GBDT, XGBoost and LightGBM, wherein:

[0090] The Logistic Regression classification algorithm predicts the probability that a sample belongs to a certain category by mapping the output of the linear regression model to between 0 and 1 through a logistic function, and fits the training data by maximizing the likelihood function or minimizing the loss function. The parameters are highly interpretable and are often used for binary classification problems.

[0091] The GBDT ensemble learning algorithm trains multiple decision tree models in series. Each model corrects the errors of the previous model to gradually improve the performance of the overall model. In each round of iteration, GBDT calculates the negative gradient of the loss function as the training target of the next decision tree model. The prediction results of multiple tree models are weighted and combined to obtain an ensemble model. It is often used for regression and classification problems.

[0092] The XGBoost ensemble learning method uses a gradient boosting method based on second-order Taylor expansion to continuously adjust the labels of actual samples for under-trained samples; XGBoost has the characteristics of high operating efficiency and high prediction accuracy, and can also automatically process missing data.

[0093] The LightGBM is a prediction model based on gradient boosting and second-order Taylor expansion. It uses a histogram optimization algorithm and a gradient-based unilateral sampling technique to improve the computational efficiency and generalization ability of the model, while combining a maximum depth limit strategy to reduce the amount of computation and prevent overfitting.

[0094] S5. Evaluate the optimal model among the machine learning models through the UAR evaluation index, and use the optimal model combined with the subset of key influencing factors in S4 to predict the severity of maritime traffic accidents.

[0095] In specific implementation, as a preferred embodiment of the present invention, step S5 specifically includes:

[0096] The UAR evaluation index is used to give the same weight to each category. For different machine learning models, the change in UAR scores indicates the prediction performance indicators of different machine learning models. The calculation formula is as follows:

[0097]

[0098] Among them, Q c is the number of categories c, Recall represents the recall rate;

[0099] The benefits of influencing factors in preventing severe accidents are evaluated using machine learning models and feature subsets with the highest predictive performance.

[0100] Example 1

[0101] like Figure 1 As shown, the present invention provides a method for predicting the severity of marine traffic accidents based on feature engineering, which mainly includes five aspects: establishing a database from the perspective of safety system engineering; developing a three-stage feature engineering method; accident severity prediction evaluation; performance evaluation of each module in the feature engineering method; and effectiveness evaluation of risk control measures based on counterfactual analysis. This invention can not only provide a basis for safety assessment and risk prevention and control research, but also effectively avoid the problems of data leakage in previous studies, filling the research gap in the field of marine accident severity prediction.

[0102] This embodiment uses the data from 2000 to 2019 in the databases of 7 maritime investigation agencies, including China Maritime Safety Administration (MSA), Federal Maritime Accident Investigation Bureau (BSU), National Transportation Safety Board (NTSB), Japan Transport Safety Board (JTSB), Australian Transport Safety Board (ATSB), Canadian Transportation Safety Board (TSB) and Marine Accident Investigation Bureau (MAIB) as the main data source, and filters and screens according to the authenticity and integrity principles of accident information, and finally obtains 1294 data. First, the data is carefully cleaned. The data cleaning process includes filling missing values, replacing abnormal values, and deleting duplicate values, etc., to retain as much valid data information as possible. Secondly, in order to meet the input conditions of the association rule mining algorithm, the present invention performs unique hot encoding on the data, converting discrete multi-category attributes into binary 0 and 1. This measure not only retains the information in each attribute, but also effectively expands the dimension of the data set, providing high-quality input data for subsequent association rule mining.

[0103] By deeply exploring the association rules between the severity of marine accidents and various factors, the top 20 association rules of rule strength were analyzed by ranking using the lift degree, as shown in Table 1. By observing these association rules, specific risk influencing factor combinations that are relatively frequent when serious accidents occur were identified. This provides relevant departments with profound insights into preventing marine accidents.

[0104] Table 1 Top 20 association rules ranked by rule strength

[0105]

[0106] Secondly, data balance analysis was performed. The SVMSMOTE oversampling method successfully balanced the sample ratio of serious accidents and non-serious accidents. As shown in Table 2, SVMSMOTE achieved the highest average UAR score among multiple machine learning methods, which shows that it has excellent performance in maritime accident prediction.

[0107] Table 2 Average and maximum scores of oversampling methods

[0108]

[0109] Then, using feature selection based on model pre-training, by calculating the feature importance or coefficients of each feature, the key risk influencing factors related to the severity of the accident were successfully screened out. The present invention adopts an experimental method of increasing the number of features one by one to obtain the changes in model performance indicators, such as Figure 3 The ranking of some features is shown in Table 3. These risk influencing factors are of great significance in the field of maritime safety and also have a positive impact on the performance of the model.

[0110] Table 3 Top 20 association rules based on feature selection ranking

[0111]

[0112]

[0113] First, the data processed by IFEB is input into various ML models for training and prediction. The prediction results are shown in Table 4 and Figure 4 As shown in the figure, gradient boosting decision tree methods such as GBDT, XGBoost, and LightGBM performed well under multiple oversampling methods, especially LightGBM achieved the highest average UAR score among all methods.

[0114] Table 4 UAR scores predicted by each machine learning model

[0115] GBDT LightGBM XGBoost Logistic Regression Average score 0.7199 0.7303 0.7220 0.7029 Highest score 0.7240 0.7419 0.7296 0.7216

[0116] The ablation experiment further verifies the contribution of feature fusion, oversampling methods, and various combinations of feature selection to model performance, showing their effectiveness in improving prediction performance. Figure 3 And as shown in Table 5.

[0117] Table 5. Highest UAR score for each module in ablation experiments

[0118] Module combination UAR Raw data 0.6595 SVM-SMOTE 0.6610 SVM-SMOTE+feature fusion 0.6824 SVM-SMOTE+feature fusion 0.6768 Feature Fusion 0.6690 Feature fusion + feature selection 0.6890 Feature Selection 0.6676 A complete feature engineering approach 0.7107

[0119] Example 2

[0120] This embodiment explains the features with strong correlation. The top 20 association rules ranked by the degree of correlation are shown in Table 1. By analyzing these association rules, it can be observed that when a serious accident occurs, a specific combination of risk influencing factors is relatively frequent. These association rules cover multiple risk influencing factors, including risk influencing factors related to ship characteristics, personnel operations, and safety management. The support of these association rules is high, indicating that these risk influencing factors have a certain degree of universality in marine accidents. For example, there is a significant correlation between engine power greater than or equal to 3000kw (EP3) and the occurrence of a serious accident (AS1), especially in the case where the gross tonnage of the ship is greater than or equal to 3000t (G3), the current water flow speed is less than 2 knots (CS1), and the safety management system has defects (SM1). This may be due to the weak emergency braking capability of ships with a larger gross tonnage, making it difficult for ships to stop or change direction in time, which increases the probability of serious accidents occurring in ships under certain conditions. The correlation between defects in the safety management system (SM1) and the occurrence of serious accidents (AS1) is also worthy of attention. The association rules show that ships with defects in the safety management system may lead to more serious consequences when an accident occurs. This highlights that good safety management is crucial to reducing the severity of marine accidents. If the safety management system is defective, it may lead to the neglect of potential risks, thereby increasing the possibility of accidents. In addition, defects in the safety management system may also lead to a lack of emergency resources and poor response capabilities of the crew, which cannot effectively control and respond to emergencies when accidents occur, further exacerbating the accident. Therefore, the safety management system should focus on identifying potential risks and improving detailed emergency plans for various emergencies. It is worth noting that there is a strong correlation between illegal operations (V1) and the severity of accidents (AS1). This shows that failure to comply with standard operations may lead to accidents with higher severity. Failure of the crew to comply with standard operations may trigger additional risk factors, such as incorrect ship handling, improper loading or cargo securing, etc., thereby increasing the possibility of accidents. In addition, standard operations usually include emergency measures and procedures for various emergencies, such as fire, oil spills, and groundings. If the operating specifications are not followed, the crew may not be adequately prepared and have insufficient response capabilities to deal with emergencies, resulting in accidents with higher severity. This finding reveals the importance of standardized operations, which can strengthen crew education and training, improve crew responsibility awareness and business quality, and reduce the serious damage caused by maritime accidents. These in-depth analyses provide key insights to create more suitable features for subsequent feature selection based on pre-training of machine learning models.

[0121] Example 3

[0122] This embodiment explains the effectiveness of SVM-SMOTE by comparing the effects of SVM-SMOTE with other oversampling. It can be found from Table 2 that the performance of these methods such as SMOTE Variants (SMOTE, SVM-SMOTE, Borderline-SMOTE, KMeans-SMOTE) varies under different classifiers. The mean UAR scores of SVM SMOTE, Borderline-SMOTE and KMeans-SMOTE based on SMOTE are generally higher than SMOTE. This may be due to the improved oversampling method that more effectively considers the boundaries and complexity between samples, thereby better generating synthetic samples and increasing the model's learning ability for minority categories. In particular, SVM-SMOTE has the highest average UAR, which indicates that SVM-SMOTE is the most stable oversampling method. There may be noise and outliers in maritime accident data, which may have an adverse effect on the training of the model. SVM-SMOTE can better filter out outliers and noise with the help of the decision boundary of the support vector machine when generating synthetic samples. This improves the robustness and stability of the model, making the model more reliable when faced with complex and changeable maritime accident data. Although BorderlineSMOTE combined with LightGBM achieved the highest UAR score, the average UAR of BorderlineSMOTE was lower than that of SVMSMOTE, proving that its stability is not as good as SVMSMOTE. This may be because the combination of SVMSMOTE and LightGBM is more sensitive to data quality. When the quality of the synthesized samples is poor, LightGBM is more easily affected, resulting in large fluctuations in model performance and reduced overall stability. The ROS score is also relatively high, but ROS is based on randomness, making the ROS effect unstable. That is, ROS performs better for a specific subset, which may also cause the model to overfit data from different subsets.

[0123] Example 4

[0124] This example further screens out key influencing factors through feature selection methods and analyzes them. Figure 3It can be found that the UAR score changes in a complex way with the increase of the number of features. In the first half, the UAR score fluctuates violently, but it shows an upward trend overall. When the number of features is 1590, the UAR score reaches its peak. In the second half, the UAR score fluctuates steadily and also shows an upward trend overall, but the average UAR score is lower than that in the first half. This may be because the model performance reaches a local optimum when the number of features is 1590. By observing Table 3, it can be found that non-serious accidents are more likely to occur in the scenarios of "time at sea: 5-10", "non-flag of convenience", "located in port", and "time: 0400–0800". Moreover, these risk factors have the greatest contribution to the model prediction, which shows that these risk factors have an important impact on the prediction of maritime accidents. For example, even crew members with 5 to 10 years of sailing experience may make negligence or mistakes in certain circumstances. The traffic density in the port area is high, and non-serious accidents may occur when ships enter and leave the port, berth, and other operations. Crew members may be in a state of fatigue or reduced alertness during the 0400–0800 time period, which may lead to operational errors or negligence, and non-serious accidents are prone to occur, which is similar to the results of previous studies. Among the top 20 features ranked by relative importance, only {'F2', 'TD2', 'CS1'} are associated with serious accidents, indicating that "non-flag of convenience", "high traffic density", and "water flow speed <2kn" are important risk factors for serious accidents. For example, high traffic density increases the risk of serious accidents. In areas with high traffic density, the distance between ships is usually small, which increases the possibility of collision or mutual interference. Especially in narrow waterways or busy port areas, good seamanship is required to avoid collisions. At the same time, 'TD2' and 'CS1' also frequently appear in the association rules with high promotion, which also verifies the accuracy of this view (as shown in Table 3).

[0125] From Table 4 and Figure 4It can be found that the three residual fitting-based gradient boosting decision tree methods, GBDT, XGBoost and LightGBM, have achieved good results under multiple oversampling methods. Among them, LightGBM achieved the highest average UAR score of 0.7303 among all methods. And when LightGBM is combined with BorderlineSMOTE, the UAR score reaches the highest score of 0.7419. This shows that LightGBM is the model with the best prediction effect and stability among these prediction models. This may be due to the introduction of innovative technologies such as Exclusive Feature Bundling in LightGBM. Such technologies reduce the dimension of features and improve the generalization ability of the model by merging the discrete values ​​of different features. The average UAR score of the XGBoost model reached 0.7220, which also showed excellent results. The GBDT model followed closely, with an average UAR score of 0.7199. This may be because GBDT and XGBoost can build the final model by combining multiple decision trees. In each iteration, the residuals of the previous model are fitted, thereby gradually reducing the residuals. This step-by-step iterative approach can effectively capture nonlinear relationships in complex data, allowing the model to better fit the data and thus show excellent performance. Logistic regression is a linear model that is mainly suitable for processing linear relationships. However, in problems such as maritime accident severity prediction, data often contain complex nonlinear relationships. For example, the interactions between risk influencing factors such as navigation conditions, ship status, and human factors often present complex nonlinear relationships. Therefore, compared with the other three algorithms, the logistic regression model scores lower. This may be because, compared with complex tree models such as XGBoost, GBDT, and LightGBM, the logistic regression model structure and characteristics are relatively simple, and cannot fully capture the above nonlinear relationships, resulting in poor model performance. In addition, due to the overly complex characteristics of the maritime accident dataset, logistic regression is more sensitive to feature dependencies and may not be able to effectively handle such complex feature structures. Therefore, for tasks that require high complexity and flexibility, tree models are generally able to provide better performance.

[0126] Therefore, the present invention constructs a framework for predicting the severity of marine accidents, proposes an effective feature engineering method, and develops a benchmark model for predicting the severity of accidents. Through comprehensive experiments and careful analysis, the role of feature engineering methods in predicting the severity of maritime accidents is deeply explored. By combining the reasonable combination of prediction models and oversampling methods, the model performance is significantly improved, providing comprehensive and profound insights for predicting the severity of marine accidents.

[0127] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0128] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0129] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0130] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0131] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0132] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.

[0133] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for predicting the severity of marine traffic accidents based on feature engineering, characterized in that: include: S1. Based on the risk influencing factors and accident severity in historical data, a dataset of marine accident risk influencing factors is constructed and the data is preprocessed; S2, couple the influencing factors in S1 through feature fusion algorithm to mine association rules; S3. Use the SVM-SMOTE oversampling method to perform data balance analysis and balance the sample ratio of serious accidents and non-serious accidents; S4. Use multiple machine learning models to train the original influencing factors, and screen out the key influencing factor subsets by calculating the importance of the influencing factors; S5. Evaluate the optimal model among the machine learning models through the UAR evaluation index, and use the optimal model combined with the subset of key influencing factors in S4 to predict the severity of maritime traffic accidents.

2. The method for predicting the severity of marine traffic accidents based on feature engineering according to claim 1 is characterized in that: The step S1 specifically includes: The marine accident risk influencing factor dataset is constructed by extracting historical data of the marine accident dataset, marking the severity of the accidents, and extracting accident features. The marine accident risk influencing factor dataset uses the risk influencing factors of each accident as the accident feature and the accident severity label as the target category. The data preprocessing includes data cleaning and one-hot encoding of the data. The data cleaning includes filling missing values, replacing outliers, and deleting duplicate values. The one-hot encoding converts discrete multi-category attributes into binary.

3. The method for predicting the severity of marine traffic accidents based on feature engineering according to claim 1 is characterized in that: The step S2 specifically includes: Association rule mining, by mining frequent item sets in the data set, to find the association rules related to the severity of the accident, using the FP-Growth algorithm to mine frequent item sets: Among them, X and Y represent the item sets of influencing factors, X→Y represents the association rule from item set X to item set Y, transactionscontaining X refers to the number of transactions containing item set X, total transactions refers to the total number of transactions, Support represents the support, that is, the frequency of item set appearing in all transactions, Confidence(X→Y) represents the probability of including item set Y when item set X is already included, and Life(X→Y) represents the degree to which the probability of item set Y appearing is increased given the appearance of item set X; The influencing factors with association rules are subjected to feature fusion, and the related features are merged into a new feature.

4. The method for predicting the severity of marine traffic accidents based on feature engineering according to claim 1 is characterized in that: The step S3 specifically includes: The SVM-SMOTE sampling balanced data method is used to perform data balance analysis, combining the SVM classifier and the SMOTE algorithm to increase the focus on minority samples; Given a minority class sample x i and a randomly selected neighbor x zi , generate new samples x new : x new =x i +δ×(x zi -x i ) Use the new samples and the original samples to train the SVM classifier. The objective function of the SVM classifier is: Where δ is a random number between [0,1], w is the decision plane normal vector, b is the bias term, and ξ i is the slack variable and C is the penalty parameter.

5. The method for predicting the severity of marine traffic accidents based on feature engineering according to claim 1 is characterized in that: The step S4 specifically includes: The contribution of features is evaluated by calculating feature importance, and the most representative feature subset is selected. The calculation formula of feature importance is: Among them, Importance(X j ) represents feature X j importance, M is the number of trees in the gradient boosting tree ensemble; L represents the number of leaf nodes; v t represents the features associated with node t; G is the amount by which the squared loss is reduced as a result of splitting at node t; The prediction model is established using feature subsets. The logistic regression model uses coefficients to represent the contribution of each feature to the model. The calculation formula of coefficients is: Where m is the number of samples, x i is the feature vector of the i-th sample, y i is the label of the i-th sample, h θ (x i ) is the sigmoid function.

6. The method for predicting the severity of marine traffic accidents based on feature engineering according to claim 1 is characterized in that: The machine learning models include: Logistic Regression, GBDT, XGBoost and LightGBM, among which: The Logistic Regression classification algorithm predicts the probability that a sample belongs to a certain category by mapping the output of the linear regression model to between 0 and 1 through a logistic function, and fits the training data by maximizing the likelihood function or minimizing the loss function; The GBDT ensemble learning algorithm trains multiple decision tree models in series, and each model corrects the errors of the previous model. In each round of iteration, GBDT calculates the negative gradient of the loss function as the training target of the next decision tree model, and obtains the ensemble model by weighted combination of the prediction results of multiple tree models. The XGBoost ensemble learning method uses a gradient boosting method based on second-order Taylor expansion to continuously adjust the labels of actual samples for under-trained samples; The LightGBM is a prediction model based on gradient boosting and second-order Taylor expansion, which uses a histogram optimization algorithm and a gradient-based unilateral sampling technique, while combining a maximum depth limit strategy to prevent overfitting.

7. The method for predicting the severity of marine traffic accidents based on feature engineering according to claim 1 is characterized in that: The step S5 specifically includes: The UAR evaluation index is used to give the same weight to each category. For different machine learning models, the change in UAR scores indicates the prediction performance indicators of different machine learning models. The calculation formula is as follows: Among them, Q c is the number of categories c, Recall represents the recall rate; The benefits of influencing factors in preventing severe accidents are evaluated using machine learning models and feature subsets with the highest predictive performance.

Citation Information

Cited By

  • Traffic accident severity prediction method and system based on multi-stage fusion

    CN120296560A

  • Traffic accident severity prediction method and system based on multi-stage fusion

    CN120296560B

  • Ship repair accident risk improvement quantification and automatic machine learning risk prediction method

    CN122155445A