Coastal erosion risk multi-dimensional evaluation method based on machine learning
By employing a machine learning-based multidimensional coastal erosion risk assessment method, which utilizes grid cell division and multidimensional feature samples to train the model, the problems of single evaluation indicators and insufficient representativeness of monitoring data in existing technologies are solved, thus achieving higher accuracy in coastal erosion risk identification and early warning.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-02-28
- Publication Date
- 2026-03-31
AI Technical Summary
Existing methods for assessing coastal erosion risk suffer from limitations such as a single evaluation index, neglect of multi-dimensional coupling effects, insufficient spatial representativeness of monitoring data, low level of assessment refinement, and inadequate evaluation of model accuracy, making it difficult to accurately identify coastal erosion risks.
A machine learning-based approach was adopted to divide the target coastal area into multiple grid cells, construct multi-dimensional erosion feature samples, and train and test the models using support vector machine, random forest and Xgboost. The accuracy of the models was evaluated by combining indicators such as mean absolute error, weighted Kappa coefficient and high-risk false negative rate, and the best model was selected to predict the coastal erosion level.
It improves the accuracy and precision of coastal erosion risk assessment, enabling more accurate identification of coastal erosion levels, providing early warnings, reducing disaster impacts, and providing technical support for risk management and engineering restoration in coastal areas.
Smart Images

Figure CN121765480A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of computer technology and marine disaster prevention information monitoring, specifically to a multidimensional evaluation method for coastal erosion risk based on machine learning. Background Technology
[0002] Coastal erosion has become one of the most significant marine environmental geological hazards, therefore, accurately identifying coastal erosion risks is crucial for improving protective capabilities. Currently, coastal erosion risk assessment mainly employs methods such as the index method, numerical simulation method, and GIS spatial analysis method.
[0003] Existing methods for assessing coastal erosion risk have the following main limitations: 1. The evaluation indicators are too simplistic, neglecting multi-dimensional coupling effects. Existing assessments often rely on single indicators such as shoreline retreat rate, failing to fully consider the coupled effects of the interactions between coastal dynamics such as wave energy and sediment transport, as well as human activities, on erosion. Traditional models struggle to handle nonlinear relationships, limiting prediction accuracy. Traditional statistical models such as linear regression are ineffective in characterizing the complex nonlinear relationships in the erosion process, leading to reduced prediction accuracy.
[0004] 2. Insufficient spatial representativeness of monitoring data and low level of assessment refinement. Previous assessments mainly relied on tidal flat erosion rate data from fixed sections or stations to represent the overall coastal condition. Due to the limited number of stations, such monitoring results cannot accurately reflect the spatial differences in erosion across the entire shoreline, leading to inaccurate risk assessments and insufficient refinement.
[0005] 3. Existing coastal erosion risk assessment models lack sufficient accuracy evaluation. For example, risk levels (1-5) are essentially ordered variables, such as level 1 being the lowest risk and level 5 being the highest risk. However, traditional classification indicators (such as accuracy and F1 score) treat each level as an independent category, ignoring the order relationship between levels. For instance, if the model predicts a true level 5 risk as level 4 and a true level 5 risk as level 1, and these two cases are considered as equivalent errors when evaluating model accuracy, the selected model may miss high-risk risks.
[0006] The information in the background section is merely information known only to the inventor and does not imply that such information had entered the public domain before the date of this application, nor does it imply that it can be considered prior art in this disclosure. Summary of the Invention
[0007] Purpose of the invention: The present invention aims to propose a multidimensional assessment method for coastal erosion risk based on machine learning, so as to at least partially overcome the shortcomings of the prior art.
[0008] Summary of the Invention: To achieve the above objectives, the present invention proposes the following technical solution: A machine learning-based multidimensional assessment method for coastal erosion risk, comprising: The target coastal area is divided into multiple grid cells; Based on historical survey data of the target coastal area, erosion characteristic samples of each grid cell at historical time points are constructed. The erosion characteristic samples include tidal range, significant wave height, elevation, slope, tidal flat erosion rate, coastline change rate, population density, and road network density. Acquire coastal erosion point data for each grid cell at the historical time node, determine the coastal erosion level of the grid cell based on the coastal erosion point data, and use the coastal erosion level as the label of the erosion feature sample; The erosion feature samples are divided into a training set and a test set. Multiple machine learning models are trained using the training set, and the trained machine learning models are tested using the test set. For each machine learning model, based on the test results of the machine learning model, calculate model accuracy evaluation metrics in different dimensions, and determine the model accuracy score of the machine learning model based on the accuracy evaluation metrics. The machine learning model with the highest accuracy score was selected as the evaluation model. The current erosion characteristics of the grid cells are collected, and the erosion characteristics are input into the evaluation model to obtain the coastal erosion level of the grid cells.
[0009] Optionally, the machine learning model includes a support vector machine model, a random forest model, and an Xgboost model.
[0010] Optionally, the model accuracy evaluation indicators include mean absolute error, weighted Kappa coefficient, and high-risk false negative rate.
[0011] Optionally, the method for calculating the mean absolute error specifically includes: ; Where MAE represents the mean absolute error, and N represents the number of test samples in the test set. y i Indicates the first i Labels of each test sample This indicates that the machine learning model is in the first... i Predicted values on each test sample.
[0012] Optionally, the method for calculating the weighted Kappa coefficient specifically includes: ; in, This represents the weighted Kappa coefficient. This represents the maximum value indicating the degree of coastal erosion. The value is a positive integer; a higher coastal erosion grade indicates more severe coastal erosion. Indicates linear weights, It is the th in the confusion matrix Line 1 The elements in the column represent the tags. The prediction result is The number of test samples, It is the expected frequency under random conditions.
[0013] Optionally, the method for calculating the high-risk false negative rate specifically includes: ; in, Indicates the high-risk underreporting rate. This indicates the number of test samples in the test set. Function representing the decision result; This indicates the conditions for a judgment; if these conditions are met, then... ,otherwise, ; The conditions for judgment are as follows: Each test sample was labeled with a preset high-risk coastal erosion level. However, the predicted value of the corresponding machine learning model is less than... The conditions for judgment are as follows: Each test sample was labeled with a preset high-risk coastal erosion level. .
[0014] Optionally, the method further includes: normalizing the mean absolute error, the weighted Kappa coefficient, and the high-risk false negative rate; and determining the model accuracy score of the machine learning model based on the accuracy evaluation index, specifically including: calculate: ; in, This represents the model accuracy score. For the pre-set weighting coefficients, The normalized mean absolute error. The normalized weighted Kappa coefficients are... This represents the normalized high-risk underreporting rate.
[0015] Optionally, the method further includes: The mean absolute error, the weighted Kappa coefficient, and the high-risk false negative rate are used as the criteria layer; Using a 1-9 scale, the importance of the mean absolute error, the weighted Kappa coefficient, and the high-risk false negative rate in the calculation of the model accuracy score of the machine learning model is compared pairwise and scored to obtain a judgment matrix. : ; in, Indicators relative to indicators The degree of importance, ; For the judgment matrix Normalizing the elements in the array yields: This leads to the normalized judgment matrix. ; calculate The weighting coefficient is obtained by calculating the row average of the elements in the middle: .
[0016] Optionally, the method further includes: A consistency check is performed on the weight coefficients. If the consistency check fails, the judgment matrix is readjusted. The values of the elements in the matrix are determined until the judgment matrix passes the consistency check.
[0017] Optionally, the method further includes: Based on the coastal erosion levels of the grid cells, a coastal erosion risk level map is drawn.
[0018] Beneficial effects: Compared with existing technologies, the multidimensional coastal erosion risk assessment method based on machine learning proposed in this invention has the following advantages: The method described in this invention uses multi-dimensional and comprehensive evaluation indicators (tidal range, significant wave height, elevation, slope, tidal flat erosion rate, coastline change rate, population density, and road network density) as erosion factors, which improves the richness of monitoring data and fully considers the coupled influence of the interaction between wave energy and human activity factors on coastal erosion.
[0019] This invention uses coastal erosion level as a classification label to evaluate the severity of coastal erosion, and uses machine learning to establish a nonlinear mapping relationship between erosion factors and coastal erosion level, which effectively improves the accuracy and precision of risk assessment.
[0020] This invention proposes a comprehensive model accuracy evaluation method based on three indicators: mean absolute error, weighted Kappa coefficient, and high-risk false negative rate. This method can select the best machine learning model to be applicable to the current scenario, thereby further improving the accuracy of the model.
[0021] The method described in this invention can accurately assess coastal erosion risks, thereby providing early warnings and minimizing the impact of coastal erosion disasters. It also optimizes the risk status of coastal areas and provides stronger technical support for marine disaster emergency response, coastal risk zoning management, and coastal restoration projects. Attached Figure Description
[0022] Figure 1 This is a flowchart illustrating a multidimensional assessment method for coastal erosion risk based on machine learning, as illustrated in the embodiment.
[0023] Figure 2 This is a schematic diagram of a divided grid cell according to an embodiment. Detailed Implementation
[0024] The present invention will now be further described in conjunction with the accompanying drawings and specific embodiments. However, it should be understood that the present invention can be implemented in various forms. The exemplary and non-limiting embodiments shown in the drawings and described below are not intended to limit the invention to the specific embodiments illustrated.
[0025] It should be understood that, where technically feasible, the technical features listed above for different embodiments can be combined with each other to form other embodiments within the scope of this invention. Furthermore, the specific examples and embodiments described in this invention are non-limiting, and corresponding modifications can be made to the structures, steps, and order described above without departing from the protection scope of this invention.
[0026] Please refer to Figure 1 , Figure 1 An exemplary flowchart of a machine learning-based multidimensional assessment method for coastal erosion risk is provided. Figure 1 As shown, the method includes steps S100 to S112.
[0027] S100: Divide the target coastal area into multiple grid cells.
[0028] In some embodiments, the ArcGIS software "Fishnet" tool can be used to discretize the coastline of the target coastal area into grid cells of the same size, and record data such as the ID number and latitude and longitude coordinates of each coastal grid cell to obtain a grid layer. These grid cells need to be able to cover the entire coastline.
[0029] S102: Based on historical survey data of the target coastal area, construct erosion characteristic samples for each grid cell at historical time points.
[0030] In this step, multidimensional indicators of the target coastal area are selected to construct erosion characteristic samples. These indicators mainly include tidal range, significant wave height, elevation, slope, tidal flat erosion rate, coastline change rate, population density, and road network density.
[0031] Before performing this step, it is necessary to obtain historical survey data of the target coastal area, mainly including coastal survey data (population density data, road network distribution data, coastal elevation data, wave height data, slope data, etc.), multi-temporal remote sensing image data, historical marine erosion disaster data (measured coastal erosion point data), tide gauge monitoring data, etc. Preprocessing such as interpretation, interpolation, and calculation is performed on data from different sources to ensure consistency in resolution and data spatial range.
[0032] For the coastline change rate index, remote sensing imagery covering multiple temporal phases of the study area can be collected. Geometric, radiometric, and atmospheric corrections are applied to the remote sensing images using GIS software. The coastline is extracted using visual interpretation, ensuring data for at least two years are available. Baselines are drawn roughly parallel to the coastline, and coastline cross-sections (two-dimensional profiles perpendicular to the coastline from land to sea) are generated using ArcGIS's "DSAS" tool. The endpoint rate method is used to calculate the coastline change rate for each cross-section. The grid layer of the target coastal area is overlaid with the coastline cross-sections using ArcGIS software, and the average coastline change rate of all cross-sections within each grid cell is calculated. This average value is used as the coastline change rate value for that grid cell.
[0033] For the tidal range index, the annual maximum and minimum tide levels can be calculated based on the obtained tide gauge station data, and the annual average tidal range can be calculated to obtain the tidal range index measured by that tide gauge station. Since the distribution of tide gauge stations and grid cells usually do not perfectly match, for each grid cell, the tidal range index measured by the tide gauge station closest to that grid cell can be used as the tidal range index for that grid cell.
[0034] For elevation, significant wave height, slope, and population density indicators, these data usually come with corresponding latitude and longitude coordinates. Therefore, Kriging interpolation can be used to interpolate the obtained data to grid cells based on the latitude and longitude coordinates, ensuring that the interpolation results cover the coastline area. Then, the "Extract Multi Values To Points" tool in ArcGIS software is used to extract the elevation, significant wave height, slope, and population density values corresponding to the center point coordinates of the grid cell, which are then used as the corresponding indicator values for that grid cell.
[0035] For the road network density index, the obtained road network distribution data can be matched with grid cells based on latitude and longitude coordinates, the length of the road in each grid cell can be calculated, and the ratio of the road length to the area of the grid cell can be used as the road network density.
[0036] For the tidal flat erosion rate index, the tidal flat erosion rate is generally obtained through cross-sectional monitoring. Therefore, the index value of the grid cell corresponding to the tidal flat erosion rate can be taken as the tidal flat erosion rate of the grid cell as the tidal flat erosion rate measured by the tidal flat cross-sectional monitoring point closest to the grid cell.
[0037] S104: Obtain coastal erosion location data for each grid cell at the historical time node, determine the coastal erosion level of the grid cell based on the coastal erosion location data, and use the coastal erosion level as the label of the erosion feature sample.
[0038] In some implementations, based on the collected coastal erosion point data, the Jenks Natural Breaks Algorithm can be used to classify the erosion points into five risk levels—high risk, relatively high risk, medium risk, relatively low risk, and low risk—in descending order of erosion value. These five risk levels are then assigned values of 5, 4, 3, 2, and 1 according to the severity of erosion, from highest to lowest. The coordinates and erosion risk level of each coastal erosion point are recorded, generating vector data in shapefile format as labels. Using the ArcGIS software's "Join" tool, discrete grid cells are connected to the label data based on spatial location. The highest erosion point level within each grid cell is calculated as the coastal erosion level for that grid cell, thereby generating label data for each sample. ; In the formula, For the sample size, The target variable set.
[0039] S106: Divide the erosion feature samples into a training set and a test set, train multiple machine learning models using the training set, and test the trained machine learning models using the test set.
[0040] In some implementations, the erosion feature samples can be randomly divided into a training set and a test set using the train_test_split function in the Python sklearn library, with 70% as the training set and the remaining 30% as the test set.
[0041] Multiple machine learning models can be trained using a training set, and these models can be selected as needed. For example, support vector machines, random forests, and XGBoost models can be chosen as the multiple machine learning models mentioned above.
[0042] The training set can be used to train vector machine models, random forest models, and Xgboost models, specifically including: A combination of grid search and cross-validation was used to fine-tune the penalty coefficient C and kernel function coefficient gamma in the support vector machine model, and the fine-tuning results were used as model parameters to establish the support vector machine model.
[0043] A combination of grid search and cross-validation was used to fine-tune the three hyperparameters "n_estimators", "max_features", and "max_depth" in the random forest model. The tuning results were then used as model parameters to build the random forest model. Here, n_estimators controls the number of decision trees in the forest, max_depth controls the maximum depth of a single decision tree, and max_depth is the maximum number of features considered when finding the optimal split.
[0044] A combination of grid search and cross-validation was used to fine-tune four hyperparameters in the XgBoost model: "learning_rate", "subsample", "max_depth", and "n_estimators". The optimized results were then used as model parameters to build the XgBoost model. Here, "learning_rate" represents the learning rate, "subsample" represents the subsampling ratio, "max_depth" represents the maximum depth of a single tree, and "n_estimators" represents the number of iterations.
[0045] After training the Support Vector Machine (SVM), Random Forest (Random Forest), and XGBoost models, a test set can be used to test them. This involves inputting test samples from the test set into the SVM, Random Forest, and XGBoost models and obtaining their prediction results.
[0046] S108: For each machine learning model, calculate model accuracy evaluation metrics in different dimensions based on the test results of the machine learning model, and determine the model accuracy score of the machine learning model based on the accuracy evaluation metrics.
[0047] In some implementations, model accuracy evaluation metrics can include Mean Absolute Error (MAE), Weighted Kappa Number (kappa_w), and High-Risk Underreporting Rate (HMR). In coastal erosion risk assessment, using only MAE may mask high-risk underreporting issues; using only kappa_w fails to reflect the magnitude of the absolute error; and using only HMR ignores overall accuracy and performance in medium-risk areas. Therefore, this embodiment uses three metrics—MAE, kappa_w, and HMR—to evaluate model accuracy.
[0048] The specific methods for calculating the mean absolute error include: ; Where MAE represents the mean absolute error, the smaller the MAE, the higher the model accuracy. This indicates the number of test samples in the test set. Indicates the first Labels of each test sample This indicates that the machine learning model is in the first... Predicted values on each test sample.
[0049] The weighted Kappa coefficient is a weighting method specifically designed for ordinal categorical data. In coastal erosion risk rating (e.g., levels 1-5), it can improve the accuracy of the assessment by quantifying the severity of misjudgments at different levels.
[0050] The specific methods for calculating the weighted Kappa coefficient include: ; in, This represents the weighted Kappa coefficient; a larger kappa_w indicates higher model accuracy. This represents the maximum value indicating the degree of coastal erosion. The value is a positive integer; a higher coastal erosion grade indicates more severe coastal erosion. Indicates linear weights, It is the th in the confusion matrix Line 1 The elements in the column represent the tags. The prediction result is The number of test samples, It is the expected frequency under random conditions.
[0051] The high-risk underreporting rate is the accuracy of the model in identifying areas with high-risk coastal erosion levels. It is calculated by comparing the intersection ratio of grid cells with predicted high-risk coastal erosion levels with actual high-risk coastal erosion levels. This is used to evaluate the model's ability to identify high-risk coastal erosion levels and can effectively prevent underreporting of areas with high-risk coastal erosion levels.
[0052] The specific methods for calculating the high-risk underreporting rate include: ; in, The high false negative rate (HMR) indicates the high-risk false negative rate; the lower the HMR, the higher the accuracy of the model. This indicates the number of test samples in the test set. Function representing the decision result; This indicates the conditions for a judgment; if these conditions are met, then... ,otherwise, The conditions for judgment are as follows: Each test sample was labeled with a preset high-risk coastal erosion level. However, the predicted value of the corresponding machine learning model is less than... The conditions for judgment are as follows: Each test sample was labeled with a preset high-risk coastal erosion level. .
[0053] In machine learning model evaluation, multi-indicator comprehensive evaluation has significant advantages over single-indicator evaluation, especially in complex scenarios such as coastal erosion risk prediction. Using only a single indicator may lead to underreporting of high-erosion-risk areas and masking key model defects. Therefore, it is necessary to integrate multiple accuracy evaluation methods and set different weights to comprehensively evaluate model performance. Thus, this embodiment, after determining the model accuracy evaluation indicators of different dimensions, uses the Analytic Hierarchy Process (AHP) to determine the weights of each evaluation indicator and finally calculates a comprehensive score to comprehensively evaluate the model's accuracy.
[0054] Specifically, as mentioned above, the evaluation indicators include Mean Absolute Error (MAE), Weighted Kappa Coefficient (kappa_w), and High-Risk Missed Detection Rate (HMR). The weights of each evaluation indicator are determined using the Analytic Hierarchy Process (AHP), specifically including: The mean absolute error (MAE), weighted kappa coefficient (kappa_w), and high-risk underreporting rate (HMR) were used as criteria layers. Using the 1-9 scaling method, the importance of mean absolute error, weighted Kappa coefficient, and high-risk false negative rate in the calculation of model accuracy score in machine learning models is compared pairwise and scored to obtain a judgment matrix. : ;
[0055] in, Indicators relative to indicators The degree of importance, In the 1-9 scale method, The larger the value, the higher the indicator. relative to indicators The higher the degree of importance, for example, Indicators and indicators Equally important Indicators Comparison Indicators Slightly more important Indicators Comparison Indicators Obviously important, Indicators Comparison Indicators Strongly important Indicators Comparison Indicators Extremely important. The initial value can be set based on expert experience.
[0056] For the judgment matrix Normalizing the elements in the array yields: This leads to the normalized judgment matrix. ; calculate The weighting coefficient is obtained by calculating the row average of the elements in the middle. .
[0057] A consistency check is performed on the weight coefficients. If the consistency check fails, the judgment matrix is readjusted. The values of the elements in the matrix are checked until the matrix passes the consistency test. The matrix is then readjusted. When the value is set, it can be readjusted based on expert experience, or it can be adjusted according to a fixed / random step size.
[0058] Consistency verification of the weighting coefficients refers to the calculation of: ;
[0059] in, Represents the judgment matrix The largest eigenvalue, Represents the judgment matrix and The product of these is a vector. Refers to vector The first in Each element. It is a consistency indicator. It is the average random consistency index, which is related to the order of the judgment matrix. In this embodiment, the order of the judgment matrix A is 3. The value is 0.52. This represents the consistency ratio. When judging consistency, if... If the matrix consistency is acceptable, then the elements in the judgment matrix need to be readjusted; otherwise, the matrix consistency needs to be readjusted. The value of .
[0060] After determining the weighting coefficients of the accuracy evaluation metrics, the model accuracy score for each machine learning model can be determined based on these metrics. Before this, since the mean absolute error (MAE), weighted kappa coefficient (kappa_w), and high-risk false negative rate (HMR) have different dimensions and meanings, they need to be normalized to the same scoring standard, i.e., normalized to the range of 0-1.
[0061] The normalized formula for the mean absolute error (MAE) is: ,in This represents the maximum mean absolute error calculated on the test set for the Support Vector Machine, Random Forest, and XgBoost models.
[0062] The normalized formula for the weighted Kappa coefficient kappa_w is: The value range of is [-1, 1]. The normalized formula for calculating the high-risk underreporting rate (HMR) is: .
[0063] Finally, the model accuracy scores of the three machine learning models mentioned above are calculated: ;
[0064] in, This represents the model accuracy score. These are the weighting coefficients. The normalized mean absolute error. The normalized weighted Kappa coefficients are... This represents the normalized high-risk underreporting rate.
[0065] S110: Select the machine learning model with the highest model accuracy score as the evaluation model.
[0066] use The machine learning model with the highest value is used as the evaluation model for the coastal erosion risk of the target coastal area, and outputs the coastal erosion risk level value of all grid cells of the entire coastline.
[0067] S112: Collect the current erosion characteristics of the grid cell, input the erosion characteristics into the evaluation model, and obtain the coastal erosion level of the grid cell.
[0068] Using ArcGIS connection tools, the IDs of the output grid cells are connected to the attribute IDs of the coastline vector data. The connected field is the grid ID value. In ArcGIS, each segment of the coastline is classified and colored according to the grade value to generate a coastal erosion risk map.
[0069] To verify the technical effectiveness of the method proposed in this embodiment, the erosion risk of the Yancheng coast in Jiangsu Province is analyzed and evaluated using the above method, taking it as an example. The entire process includes steps S300 to S312.
[0070] S300: Divides the target coastal area into multiple grid cells.
[0071] In this embodiment, the coastal area of Sheyang County is divided into multiple grid units, as shown in the following figure. Figure 2 As shown.
[0072] S302: Based on historical survey data of the target coastal area, construct erosion characteristic samples for each grid cell at historical time points.
[0073] The data collected in this embodiment mainly includes: significant wave height data, tide gauge location data, slope data, tidal flat cross-section elevation measurement data, population density data, road data, and Landsat remote sensing data of Yancheng coastal area in 1997 and 2017.
[0074] The significant wave height was obtained from reanalysis data from the European Centre for Medium-Range Weather Forecasts (ECWF). Population density data were obtained from the WorldPop 2020 population density dataset, road data were obtained from OpenStreetMap, and tidal flat erosion rate data were obtained from monitoring data of Yancheng tidal flats in 2022-2023.
[0075] For Landsat remote sensing data, the coastline of Yancheng in 1997 and 2017 was extracted using visual interpretation methods, and the rate of coastline change was calculated. Specifically, this included: In ArcGIS, the shoreline time attribute was added to the coastline attribute data for 1997 and 2017. A baseline was drawn on the landward side of the coastline in a direction roughly parallel to the coastline. Coastal sections were generated using the ArcGIS software's "DSAS" tool, perpendicular to the baseline at 100m intervals. The endpoint rate algorithm was used to calculate the rate of change of the endpoints for each section.
[0076] The location data of the tide gauge stations were obtained from the hourly tide data of six tide gauge stations along the Jiangsu coast in 2020: Yanwei, Binhai Port, Sheyang Estuary, Xinyang Port, Dafeng Port and Jiang Port. The annual average tidal range of each tide gauge station was calculated.
[0077] The obtained tidal flat cross-section elevation measurement data, significant wave height, slope and population density indicators were interpolated to the grid cell size using the Kriging interpolation method to ensure that the interpolation results covered the coastline area.
[0078] For the road network density index, the obtained road network distribution data is matched with grid cells based on latitude and longitude coordinates, the length of the road in each grid cell is calculated, and the ratio of the road length to the area of the grid cell is used as the road network density.
[0079] Based on the data collected above, an erosion characteristic sample of the Yancheng coast was constructed.
[0080] S304: Obtain coastal erosion location data for each grid cell at the historical time node, determine the coastal erosion level of the grid cell based on the coastal erosion location data, and use the coastal erosion level as the label of the erosion feature sample.
[0081] This embodiment also collected actual coastal erosion survey data for the Yancheng coastal area in 2020. The data is numerical and includes historical coastal erosion point data for the Yancheng coastal area. The Jenks Natural Breaks Algorithm was used to classify the erosion into five levels—high risk, relatively high risk, medium risk, relatively low risk, and low risk—according to numerical values. Values of 5, 4, 3, 2, and 1 were assigned respectively, and the coordinates and erosion risk level of each point were recorded, generating vector data in shapefile format. The ArcGIS software "Join" tool was used to connect discrete grid cells with the label data based on spatial location. The highest erosion point level within each grid cell was calculated as the coastal erosion level for that grid cell, thus generating label data for each sample. ; In the formula, For the sample size, The target variable set.
[0082] S306: Divide the erosion feature samples into a training set and a test set, use the training set to train multiple machine learning models respectively, and use the test set to test the trained multiple machine learning models.
[0083] Support Vector Machine (SVM), Random Forest (Random Forest), and XGBoost (XGBoost) models were used as the aforementioned machine learning models.
[0084] The training set was used to fine-tune the two hyperparameters "C" and "gamma" in the support vector machine model. After multiple rounds of grid search, when the hyperparameters "C" = 10 and "gamma" = 0.1, the MAE value of the test set was 0.1889, and the support vector machine model was built based on this.
[0085] The three hyperparameters "n_estimators", "max_features" and "max_depth" in the random forest model were tuned using the training set. After multiple rounds of grid search, when the hyperparameters "max_depth" = 15, "max_features" = 'sqrt', and "n_estimators" = 300, the test set accuracy was 0.1356, and the random forest model was built based on this.
[0086] The training set was used to fine-tune the three hyperparameters "learning_rate", "max_depth", and "n_estimators" in the XGBoost model. After multiple rounds of grid search, when the hyperparameters "learning_rate" = 0.01, "max_depth" = 9, and "n_estimators" = 300, the test set accuracy was 0.1356, and the XGBoost model was built based on this.
[0087] The Support Vector Machine model, Random Forest model, and XgBoost model were tested using a test set, and the test results were obtained.
[0088] S308: For each machine learning model, calculate model accuracy evaluation metrics in different dimensions based on the test results of the machine learning model, and determine the model accuracy score of the machine learning model based on the accuracy evaluation metrics.
[0089] The model accuracy evaluation metrics include Mean Absolute Error (MAE), Weighted Kappa Coefficient (kappa_w), and High False Negative Rate (HMR). The MAE, Kappa_w, and HMR of the Support Vector Machine (SVM), Random Forest (RWH), and XGBoost (XGBoost) models on the test set are calculated respectively.
[0090] The formula for calculating the mean absolute error is: ;
[0091] Where MAE represents the mean absolute error, the smaller the MAE, the higher the model accuracy. This indicates the number of test samples in the test set. Indicates the first Labels of each test sample This indicates that the machine learning model is in the first... Predicted values on each test sample.
[0092] The formula for calculating the weighted Kappa coefficient is: ;
[0093] in, This represents the weighted Kappa coefficient; a larger kappa_w indicates higher model accuracy. Indicates linear weights, It is the th in the confusion matrix Line 1 The elements of the column represent labels. The predicted result is The number of test samples, It is the expected frequency under random conditions. This indicates that the prediction results are completely consistent. This indicates the error between adjacent levels of the prediction result. This indicates that the prediction results have a moderate error. This indicates that the prediction result has a large error. This indicates that the prediction result has extreme errors.
[0094] The formula for calculating the high-risk underreporting rate is: ;
[0095] The high-risk underreporting rate here refers to the accuracy of the machine learning model in identifying areas with a coastal erosion risk level of 4 or above (level ≥ 4), and the intersection ratio of the grids that predict level ≥ 4 and the actual grids that predict level ≥ 4.
[0096] This indicates that the actual risk level is the highest (level 5 or 4) but it is predicted to be level 3 or below. If the condition is met, the value is 1; otherwise, it is 0. This represents a sample that is actually at the highest risk level (level 5 or level 4). It is 1 if the condition is met, and 0 otherwise.
[0097] Next, a judgment matrix is constructed and the weight coefficients of three normalized accuracy evaluation indicators are calculated. Based on the weight coefficients, the model accuracy scores (CS) of the support vector machine model, random forest model, and Xgboost model are calculated.
[0098] The judgment matrix constructed in this embodiment is: ;
[0099] The normalized judgment matrix is: ;
[0100] After performing a consistency check, the calculation of this embodiment is obtained. It is 3.0092. It is 0.046. A value of 0.0079 (<0.1) passes the consistency test. The final calculated index weight value is: .
[0101] After determining the weighting coefficients of the accuracy evaluation indicators, the mean absolute error (MAE), weighted kappa coefficient (kappa_w), and high-risk false negative rate (HMR) are normalized. Based on the normalized accuracy evaluation indicators, the model accuracy score for each machine learning model is determined using the following formula: .
[0102] The CS calculation results of this embodiment are shown in Table 1: Table 1 ; S310: Select the machine learning model with the highest model accuracy score as the evaluation model.
[0103] Among the three machine learning models, the random forest model has the highest model accuracy score. Therefore, in this embodiment, the random forest model is selected as the evaluation model for the coastal erosion risk in the Yancheng coastal area.
[0104] S312: Collect the current erosion characteristics of the grid cell, input the erosion characteristics into the evaluation model, and obtain the coastal erosion level of the grid cell.
[0105] Using ArcGIS's "Join" tool, grid IDs are joined with coastline vector data, with the joined field being the grid ID value. Each segment of the coastline is then classified and colored according to five levels to generate a coastal erosion risk map.
[0106] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0107] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the protection scope of the present invention. Therefore, the protection scope of this invention patent should be determined by the appended claims.
Claims
1. A method for multi-dimensional evaluation of coastal erosion risk based on machine learning, characterized in that, The method comprises the following steps: dividing a target coastal area into a plurality of grid cells; constructing an erosion feature sample of each grid cell at a historical time node according to historical investigation data of the target coastal area, the erosion feature sample including tidal range, effective wave height, elevation, slope, subtidal erosion rate, coastline change rate, population density, and road network length; obtaining coastal erosion point data of each grid cell at the historical time node, determining a coastal erosion grade of the grid cell according to the coastal erosion point data, and taking the coastal erosion grade as a label of the erosion feature sample; dividing the erosion feature sample into a training set and a test set, training a plurality of machine learning models respectively by using the training set, and testing the trained plurality of machine learning models by using the test set; for each machine learning model, calculating model precision evaluation indexes of different dimensions according to a test result of the machine learning model, and determining a model precision score of the machine learning model according to the precision evaluation indexes; selecting a machine learning model with the highest model precision score as an evaluation model; collecting current erosion features of the grid cell, inputting the erosion features into the evaluation model, and obtaining a coastal erosion grade of the grid cell.
2. The method of claim 1, wherein, The machine learning model includes a support vector machine model, a random forest model, and an Xgboost model.
3. The method of claim 1, wherein, The model precision evaluation indexes include a mean absolute error, a weighted kappa coefficient, and a high-risk false negative rate.
4. The method of claim 3, wherein, The calculation method of the mean absolute error specifically comprises: ; Where MAE represents the mean absolute error, and N represents the number of test samples in the test set. y i Indicates the first i Labels of each test sample This indicates that the machine learning model is in the first... i Predicted values on each test sample.
5. The method of claim 3, wherein, The calculation method of the weighted kappa coefficient specifically comprises: ; wherein, represents a weighted kappa coefficient, represents a maximum value of the coastal erosion level, is a positive integer, and the higher the coastal erosion level is, the more serious the coastal erosion is, represents a linear weight, is an element of the confusion matrix in the i-th row and the j-th column, and represents the number of test samples whose label is i and whose prediction result is j, is an element of the confusion matrix in the i-th row and the j-th column, and represents the number of test samples whose label is i and whose prediction result is j, is an element of the confusion matrix in the i-th row and the j-th column, and represents the number of test samples whose label is i and whose prediction result is j, is an element of the confusion matrix in the i-th row and the j-th column, and represents the number of test samples whose label is i and whose prediction result is j, is an element of the confusion matrix in the i-th row and the j-th column, and represents the number of test samples whose label is i and whose prediction result is j, is a frequency expected in a random case.
6. The method of claim 3, wherein, The calculation method of the high-risk false negative rate specifically comprises: ; wherein, represents a high-risk false negative rate, represents the number of test samples in the test set, represents a decision result function; represents a decision condition, if the decision condition is satisfied, then , otherwise, ; The decision condition represented by indicates that the label of the first test sample is a preset high-risk coastal erosion level , but the prediction value of the corresponding machine learning model is less than The decision condition represented by indicates that the label of the first test sample is a preset high-risk coastal erosion level .
7. The method of claim 3, wherein, The method further comprises normalizing the mean absolute error, the weighted kappa coefficient, and the high-risk false negative rate; and determining the model precision score of the machine learning model according to the precision evaluation indexes, specifically comprising: calculating: ; wherein, represents a model accuracy score, is a pre-set weight coefficient, is a normalized mean absolute error, is a normalized weighted kappa coefficient, is a normalized high-risk false negative rate.
8. The method of claim 7, wherein, The method further comprises: taking the mean absolute error, the weighted kappa coefficient, and the high-risk false negative rate as a criterion layer; The importance of the mean absolute error, the weighted kappa coefficient and the high-risk false negative rate in the model accuracy score calculation of the machine learning model is scored by pairwise comparison using a 1-9 scale method to obtain a judgment matrix : ; wherein indicates an index relative to an index of importance, ; normalizing elements in the judgment matrix , obtaining , and further obtaining the normalized judgment matrix ; Computing a row mean of the middle elements, resulting in the weight coefficient: 。 9. The method of claim 8, wherein, The method further comprises: A consistency check is performed on the weight coefficients. If the consistency check fails, the judgment matrix is readjusted. The values of the elements in the matrix are determined until the judgment matrix passes the consistency check.
10. The method of claim 1, wherein, The method further comprises: According to the coastal erosion grade of the grid cell, a coastal erosion risk grade map is drawn.
Citation Information
Patent Citations
Coastal erosion susceptibility interpretable evaluation method based on random forest
CN120046491A
River downstream beach erosion risk identification method based on multi-source heterogeneous data fusion
CN121211329A
Data driving-based electricity-to-water coefficient composite model and prediction method
CN121327602A