River village mountain torrent disaster evaluation method based on machine learning
By constructing a machine learning-based mountain torrent disaster index system and random forest model in Yanhe Village, combined with the K-fold cross method and Gini index, the accuracy and targeted problems of the assessment of mountain torrent disasters in Yanhe Village, were solved in the existing technology, and achieved the Highly accurate risk assessment and disaster prevention direction guidance.
Patent Information
- Application Number
- CN202410944632.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-15
- Publication Date
- 2024-12-13
AI Technical Summary
The existing methods of mountain torrent disaster evaluation lack accuracy and pertinence in the risk assessment of villages along the river, especially ignore hidden danger factors in the river section, and rely on expert experience and qualitative analysis, with low efficiency and strong subjectivity.
Using machine learning-based methods, a mountain torrent disaster indicator system is constructed in the river village. Starting from the three dimensions of disaster-causing factors, disaster-care environment and disaster-bearing body, a comprehensive risk assessment system for villages, river sections, and river basins is selected, and a random forest model is used. Combining the K-fold Cross-Section Method and Gini Index Analysis Index importance, we will build an accurate classification of mountain torrent disaster risk levels and disaster prevention work direction.
Achieve high accuracy assessment of the risk of mountain torrent disasters in the river villages in the hilly area, improve the accuracy and reliability of the evaluation, extract useful information through feature engineering, optimize the prediction model, and the example analysis results show that the accuracy of the random forest model is as high as 82.47. %, and clarified the importance of hidden dangers in river sections in risks, providing a specific direction for disaster prevention.
Smart Images

Figure CN119130106A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of flash flood disaster research, and in particular to a flash flood disaster assessment method for villages along rivers based on machine learning. Background Art
[0002] In the existing flash flood disaster assessment, most of the evaluation index systems are constructed based on the watershed as a unit. For example, Wu Xiaojun et al. selected the terrain index and elevation in the watershed as the influencing factors of the disaster-prone environment based on the characteristics of small watersheds in Jiangxi Province; Ma Tingxu et al. selected the indicators based on the upstream watershed profile when constructing the flash flood disaster risk assessment index system. However, the riverside villages in small watersheds in hilly areas have more risk hazards and show diversity. If the indicators are selected based on the watershed as a unit, the hidden danger factors of the river section will be ignored. And because the disaster resistance of the villages along the river is poor, once a flood occurs, it will seriously threaten the safety of the villagers, so using the watershed as a unit lacks pertinence and suddenness.
[0003] Commonly used methods for flash flood disaster risk assessment include hydraulic hydrological models, remote sensing images and GIS technology, hierarchical analysis method, fuzzy comprehensive evaluation method, etc. For example, Hao Sijia et al. used distributed hydrological models and two-dimensional hydrodynamic models, combined with laser point cloud measurement technology to analyze the water flow and simulate the flood process of flash flood disasters caused by extreme rainfall in a typical flash flood disaster event; Meng Xuqin et al. used GIS spatial data analysis methods combined with hierarchical analysis method to obtain the refined flash flood disaster risk zoning in Chengde City; Jing Shuangyi et al. combined fuzzy comprehensive evaluation method, hierarchical analysis method and GIS method based on the geographical environment and regional profile of Datong City to complete the risk assessment process. However, these methods usually show that the weight values of indicator factors are difficult to determine and are highly subjective. Therefore, technicians in this field provide a flash flood disaster assessment method for riverside villages based on machine learning to solve the problems raised in the above background technology. Summary of the invention
[0004] 1. Technical issues to be resolved
[0005] In view of the shortcomings of the existing technology, the present invention provides a method for evaluating flash flood disasters in riverside villages based on machine learning, which solves the problem of inaccurate and targeted risk assessment of flash flood disasters in riverside villages in hilly areas.
[0006] (II) Technical solution
[0007] To achieve the above objectives, the present invention is implemented through the following technical solutions: a method for evaluating flash flood disasters in villages along rivers based on machine learning, comprising:
[0008] Construct a flash flood disaster indicator system for riverside villages: Based on the theoretical framework of the disaster system, the villages along the river in the hilly area are selected as the basic units. In combination with the unique characteristics of these villages, indicators are selected from the three dimensions of disaster-causing factors, disaster-prone environment and disaster-bearing bodies to construct a comprehensive risk assessment system for villages, river sections and watersheds;
[0009] Risk level classification: Based on the number of flash flood disasters in history and the degree of damage caused, the flash flood disaster risk level of villages along the river is classified;
[0010] Model construction: The flash flood disaster index of villages along the river is taken as the independent variable, and the flash flood disaster risk level obtained by combining historical flash floods and damage degree is taken as the dependent variable. The total sample set is divided into 70% training samples and 30% test samples to construct a random forest model;
[0011] Model verification: The K-fold crossover method is used to verify the model to ensure the validity and reliability of the model;
[0012] Indicator importance analysis: The Gini index in the random forest model is used to determine the importance of indicators; the importance of each indicator is calculated to provide ideas and directions for flash flood disaster prevention work in villages along the river.
[0013] Preferably, the construction of a flash flood disaster indicator system for villages along the river specifically includes:
[0014] Based on the on-site investigation and characteristic analysis of the villages along the river, and based on the formation mechanism of mountain torrent disasters by predecessors, and by referring to relevant research, we start from the research system combining points, lines and surfaces of "village-river section-watershed" to select indicators;
[0015] After determining the evaluation indicators and obtaining the data of each indicator, a quantitative evaluation indicator system was established. For quantitative indicators, the natural breakpoint method in ArcGIS was used to divide the flash flood disaster risk assessment indicators of villages along the river into four levels. For qualitative indicators, the indicators were graded by consulting experts and referring to the "Flash Flood Disaster and Mud-rock Flow Disaster Forecast" and other relevant materials.
[0016] Preferably, the risk level classification specifically includes:
[0017] The number and proportion of historical disaster points were counted, and the level of flash flood disasters was divided into four levels according to the number of historical flash flood disasters in villages along the river and the degree of damage caused, namely: low risk, medium risk, relatively high risk and high risk.
[0018] Preferably, the model construction comprises the following specific steps:
[0019] Random forest is a supervised learning model. Compared with the traditional CART method that uses the entire data set, the RF method trains each individual CART on the Bootstrap sample of the entire data set. It is characterized by high prediction accuracy and the ability to perform feature sensitivity analysis; Random Forest Algorithm Schematic Diagram, the model construction steps are as follows:
[0020] S1. Data preparation: The selected flash flood disaster impact index of the riverside villages is used as the independent variable, and the flash flood disaster risk level obtained by combining historical flash floods is used as the dependent variable. The data set is divided into a training set and a test set with a division ratio of 7:3;
[0021] S2. Random sampling: The random forest model uses the Bootstrap resampling method to randomly select n groups of samples from the total sample, and then obtain multiple sub-samples of the same size;
[0022] S3. Decision tree construction: Decision tree modeling is performed for each group of subsamples. Each decision tree randomly selects a small group of input variables to be split, and obtains the classification model {h1(X), h2(X), …, hn(X)};
[0023] S4. Training model: Use multiple random samples and random features to train multiple decision trees. The established classification model sequence can obtain n results. Finally, the voting method or the average value is used as the final prediction result. The final classification result of the majority vote is:
[0024]
[0025] Where: H(x) is the combined classification model; x is the input sample; h i is a single decision tree classification model; Y is the output variable; I(·) is the indicative function;
[0026] The average forecast results:
[0027]
[0028] Where: L(x) is the combined prediction model;
[0029] As one or more embodiments, the model verification specifically includes the following steps:
[0030] To ensure the effectiveness and reliability of the model, the k-fold crossover method is used to verify the model. This method divides the data set into k subsets, uses k-1 subsets for training each time, and uses the remaining 1 subset for verification; the process is repeated k times to ensure that each subset is used as a verification set once, and the average performance of k verifications is calculated as the evaluation indicator of the model.
[0031] Preferably, the indicator importance analysis specifically includes:
[0032] The Gini Impurity is used in the random forest model as a means of judging the importance of features and indicators. The Gini Index is mainly used in classification problems to evaluate the impurity of a data set, that is, the probability that two samples belong to different categories if they are randomly selected. The smaller the Gini Index, the higher the purity of the data set. In the random forest, the importance of a feature is evaluated by observing the average reduction in impurity of the feature at the split point in the tree.
[0033] Specifically, it is the average value of the impurity and Gini index reduced when the feature is used as a split feature in all trees; finally, the importance values of all features are usually standardized so that their sum is 1 for easy comparison;
[0034] For a single decision tree, the nodes are recursively split among the m variables based on the principle of minimum node impurity, that is, the minimum Gini coefficient. The calculation formula of the Gini index is as follows:
[0035]
[0036] Where t is the decision tree node, pi is the relative frequency of the i-th category at node t, and m is the total number of categories;
[0037] The importance of each risk indicator is analyzed by the percentage of the average Gini reduction value of the indicator to the sum of the average Gini reduction values of all indicators, so as to obtain the indicators that have a greater impact on the risk of flash flood disasters in villages along the river, providing ideas and directions for the prevention and control of flash flood disasters.
[0038] (III) Beneficial effects
[0039] The present invention provides a method for evaluating flash flood disasters in riverside villages based on machine learning. It has the following beneficial effects:
[0040] 1. In the present invention, the machine learning algorithm can process a large amount of complex and multi-dimensional data, and can optimize its own performance by continuously learning new data, gradually improve the accuracy and reliability of flash flood risk assessment, and have the ability of self-improvement; flash flood disaster risk assessment involves a variety of data such as meteorology, hydrology, topography, vegetation, etc., and the machine learning algorithm can effectively process these heterogeneous data, and extract useful information through feature engineering to optimize the prediction model; in addition, the traditional flash flood risk assessment relies on expert experience and qualitative analysis, which is inefficient and has a large subjective influence, and the use of the random forest model can solve this problem well; the results of the example analysis show that the accuracy of the random forest risk assessment model is as high as 82.47%, which means that in the flash flood disaster risk assessment, the random forest model shows good fitting ability and high accuracy.
[0041] 2. In the present invention, the risk index system constructed for riverside villages has a total of 16 indicators, including 9 indicators at the river section level, namely, "river section gradient, distance between village and river, relative elevation between village and river, river channel conditions, flood control capacity, bends, proportion of hydraulic water-blocking area, tributaries and narrowing". These indicators are unique to river sections of riverside villages, and the indicators and considerations involved are usually more detailed and specific, so as to better reflect the specific risk conditions in a small range.
[0042] 3. In the present invention, the importance of each indicator is analyzed by the Gini index: the Gini index of each risk indicator is calculated to obtain the importance of each risk indicator; in the example analysis, the total contribution of indicators at the level of hidden dangers in river sections reached 61.65%, which shows that when studying the risk of flash flood disasters based on villages, the hidden danger indicators of river sections are absolutely necessary; at the same time, this also provides direction and ideas for the prevention and control of flash flood disasters in villages along the river. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 It is a schematic diagram of the overall method flow of the present invention;
[0044] Figure 2 This is a diagram of the principle of selecting indicators in the present invention;
[0045] Figure 3 This is a schematic diagram of the random forest algorithm in the present invention;
[0046] Figure 4 It is the water system topographic map of the study area in this invention;
[0047] Figure 5 Select an example graph for the risk indicator in the present invention;
[0048] Figure 6 This is the mountain torrent disaster index library map of the villages along the river in the present invention;
[0049] Figure 7 This is the index grid data map of the study area in the present invention;
[0050] Figure 8 It is a risk indicator importance measurement diagram in the present invention;
[0051] Fig. 9 This is a table of the meanings of the impact values in the present invention;
[0052] Fig.10 This is a table for classifying the risk levels of villages along the river in the present invention;
[0053] Fig.11 This is the risk indicator factor influence classification table in the present invention;
[0054] Fig.12 This is the cross-validation accuracy evaluation table in the present invention. DETAILED DESCRIPTION
[0055] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions 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 are within the scope of protection of the present invention.
[0056] Embodiment 1:
[0057] like Figure 1-12 As shown, an embodiment of the present invention provides a method for evaluating flash flood disasters in villages along rivers based on machine learning, including:
[0058] Construct a flash flood disaster indicator system for riverside villages: Based on the theoretical framework of the disaster system, the villages along the river in the hilly area are selected as the basic units. In combination with the unique characteristics of these villages, indicators are selected from the three dimensions of disaster-causing factors, disaster-prone environment and disaster-bearing bodies to construct a comprehensive risk assessment system for villages, river sections and watersheds;
[0059] Risk level classification: Based on the number of flash flood disasters in history and the degree of damage caused, the flash flood disaster risk level of villages along the river is classified;
[0060] Model construction: The flash flood disaster index of villages along the river is taken as the independent variable, and the flash flood disaster risk level obtained by combining historical flash floods and damage degree is taken as the dependent variable. The total sample set is divided into 70% training samples and 30% test samples to construct a random forest model;
[0061] Model verification: The K-fold crossover method is used to verify the model to ensure the validity and reliability of the model;
[0062] Indicator importance analysis: The Gini index in the random forest model is used to determine the importance of indicators; the importance of each indicator is calculated to provide ideas and directions for flash flood disaster prevention work in villages along the river.
[0063] Preferably, a flash flood disaster indicator system for villages along the river is constructed, specifically including:
[0064] Based on the on-site investigation and characteristic analysis of the villages along the river, and based on the formation mechanism of mountain torrent disasters by predecessors, and by referring to relevant research, we start from the research system combining points, lines and surfaces of "village-river section-watershed" to select indicators;
[0065] After determining the evaluation indicators and obtaining the data of each indicator, a quantitative evaluation indicator system was established. For quantitative indicators, the natural breakpoint method in ArcGIS was used to divide the flash flood disaster risk assessment indicators of villages along the river into four levels. For qualitative indicators, the indicators were graded by consulting experts and referring to the "Flash Flood Disaster and Mud-rock Flow Disaster Forecast" and other relevant materials.
[0066] Preferably, the risk level classification specifically includes:
[0067] The number and proportion of historical disaster points were counted, and the level of flash flood disasters was divided into four levels according to the number of historical flash flood disasters in villages along the river and the degree of damage caused, namely: low risk, medium risk, relatively high risk and high risk.
[0068] Preferably, the model is constructed, and the specific steps include:
[0069] Random forest is a supervised learning model. Compared with the traditional CART method that uses the entire data set, the RF method trains each individual CART on the Bootstrap sample of the entire data set. It is characterized by high prediction accuracy and the ability to perform feature sensitivity analysis; Random Forest Algorithm Schematic Diagram, the model construction steps are as follows:
[0070] S1. Data preparation: The selected flash flood disaster impact index of the riverside villages is used as the independent variable, and the flash flood disaster risk level obtained by combining historical flash floods is used as the dependent variable. The data set is divided into a training set and a test set with a division ratio of 7:3;
[0071] S2. Random sampling: The random forest model uses the Bootstrap resampling method to randomly select n groups of samples from the total sample, and then obtain multiple sub-samples of the same size;
[0072] S3. Decision tree construction: Decision tree modeling is performed for each group of subsamples. Each decision tree randomly selects a small group of input variables to be split, and obtains the classification model {h1(X), h2(X), …, hn(X)};
[0073] S4. Training model: Use multiple random samples and random features to train multiple decision trees. The established classification model sequence can obtain n results. Finally, the voting method or the average value is used as the final prediction result. The final classification result of the majority vote is:
[0074]
[0075] Where: H(x) is the combined classification model; x is the input sample; h i is a single decision tree classification model; Y is the output variable; I(·) is the indicative function;
[0076] The average forecast results:
[0077]
[0078] Where: L(x) is the combined prediction model;
[0079] As one or more embodiments, model verification, the specific steps include:
[0080] To ensure the effectiveness and reliability of the model, the k-fold crossover method is used to verify the model. This method divides the data set into k subsets, uses k-1 subsets for training each time, and uses the remaining 1 subset for verification; the process is repeated k times to ensure that each subset is used as a verification set once, and the average performance of k verifications is calculated as the evaluation indicator of the model.
[0081] Preferably, the indicator importance analysis specifically includes:
[0082] The Gini Impurity is used in the random forest model as a means of judging the importance of features and indicators. The Gini Index is mainly used in classification problems to evaluate the impurity of a data set, that is, the probability that two samples belong to different categories if they are randomly selected. The smaller the Gini Index, the higher the purity of the data set. In the random forest, the importance of a feature is evaluated by observing the average reduction in impurity of the feature at the split point in the tree.
[0083] Specifically, it is the average value of the impurity and Gini index reduced when the feature is used as a split feature in all trees; finally, the importance values of all features are usually standardized so that their sum is 1 for easy comparison;
[0084] For a single decision tree, the nodes are recursively split among the m variables based on the principle of minimum node impurity, that is, the minimum Gini coefficient. The calculation formula of the Gini index is as follows:
[0085]
[0086] Where t is the decision tree node, pi is the relative frequency of the i-th category at node t, and m is the total number of categories;
[0087] The importance of each risk indicator is analyzed by the percentage of the average Gini reduction value of the indicator to the sum of the average Gini reduction values of all indicators, so as to obtain the indicators that have a greater impact on the risk of flash flood disasters in villages along the river, providing ideas and directions for the prevention and control of flash flood disasters.
[0088] Example analysis:
[0089] According to the overall deployment and arrangement of flash flood disaster prevention and control work in the country and Shandong Province, as of 2023, Weifang City has marked 1,105 flash flood prevention villages; therefore, this paper takes the 1,105 riverside villages in Weifang City as the research object, and takes the five flash flood prevention counties of Qingzhou City, Linqu County, Changle County, Anqiu City, and Zhucheng City where the riverside villages are located as the research area for analysis and evaluation;
[0090] The total area of the study area is 8395.78m8, of which 4594.388m8 is hilly, accounting for 54.72%; 4594.388m8 is plain, including river valley plain, accounting for 45.28%; its terrain is high in the south and low in the north, high in the west and low in the east, with the highest altitude of 1018 meters and the lowest altitude of 6 meters, and the average altitude of 163.76 meters; the total length of rivers in the study area is 3514.388m, and the rivers belong to the six major rivers of Xiaoqing River, Mi River, Bailang River, Wei River, North Jiaolai River and Wen River, and the five water systems of Wei River, Mi River, Bailang River, South Jiaolai River, North Jiaolai River and Zibo River. For an overview of the study area, see Figure 4 ;
[0091] The factors causing flash flood disasters are complex and diverse. Especially for riverside villages, the complex village terrain, the impact of human activities and the hidden dangers of river sections will inevitably aggravate the impact of flash flood disasters. The indicators and considerations involved in flash flood risk assessment based on villages are usually more detailed and specific, so as to better reflect the specific risk conditions in a small area. Based on the on-site investigation and characteristic analysis of 1105 riverside villages in Weifang City, based on the formation mechanism of flash flood disasters by predecessors, and by referring to relevant research, we started from the research system combining villages, river sections and watersheds, and selected indicators. Figure 2 ;
[0092] After determining the evaluation indicators and obtaining the data of each indicator, a quantitative evaluation indicator system is established. This is simple and clear, and can avoid subjective judgment errors in practice, making the classification scientific and reasonable. For quantitative indicators, the natural breakpoint method in ArcGIS is used to divide the flash flood disaster risk assessment indicators of villages along the river into 4 levels. For qualitative indicators, expert consultation and reference to the "Flash Flood Disaster and Mud-Rock Flow Disaster Forecast" and other relevant materials are used to classify the indicators. The meaning of the indicator impact degree is shown in Fig. 9 , the index classification results are shown in Fig.11 The final raster data is shown in Figure 7 ;
[0093] According to the characteristics of riverside villages in small watersheds in hilly areas, 16 indicators were selected from three aspects: disaster-causing factors, disaster-prone environment and disaster-bearing bodies, and a flash flood disaster risk assessment index database combining points, lines and surfaces was constructed. This database comprehensively reflects the various factors involved when riverside villages are threatened by flash flood disasters. Figure 6 ;
[0094] The number and proportion of historical disaster points were counted, and the flash flood disaster levels were divided into four levels according to the number of historical flash flood disasters and the degree of damage caused in the villages along the river in the study area: low risk, medium risk, relatively high risk and high risk;
[0095] The flash flood disaster impact index of the selected riverside villages is used as the independent variable, and the flash flood disaster risk level obtained from historical flash floods is used as the dependent variable. The random forest algorithm is used to train the flash flood disaster risk assessment model based on the riverside villages.
[0096] The model was validated using the 10-fold crossover method. After validation with 10 sets of random combination data, the average accuracy of the training set was 80.37%, the average accuracy of the validation set was 81.16%, and the average accuracy of the total sample was 80.76%. The validation results are shown in Fig.12 ; By calculating the Gini index of each risk indicator to analyze the importance of the indicator, the results are as follows Figure 8 As shown;
[0097] In summary, the random forest risk assessment model shows good fitting ability and high accuracy in flash flood disaster risk assessment, which confirms the efficiency and practicality of machine learning in flash flood disaster risk assessment; and by calculating the Gini index of each indicator, it can be obtained that the total contribution of indicators at the river section level reached 61.65%, which shows that when studying flash flood disaster risks based on villages, it is absolutely necessary to use the disaster mechanism and the combination of village-river section-watershed to construct a flash flood disaster risk assessment system.
[0098] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for evaluating flash flood disasters in riverside villages based on machine learning, characterized by: include: Construct a flash flood disaster indicator system for riverside villages: Based on the theoretical framework of the disaster system, the villages along the river in the hilly area are selected as the basic units. In combination with the unique characteristics of these villages, indicators are selected from the three dimensions of disaster-causing factors, disaster-prone environment and disaster-bearing bodies to construct a comprehensive risk assessment system for villages, river sections and watersheds; Risk level classification: Based on the number of flash flood disasters in history and the degree of damage caused, the flash flood disaster risk level of villages along the river is classified; Model construction: The flash flood disaster index of villages along the river is taken as the independent variable, and the flash flood disaster risk level obtained by combining historical flash floods and damage degree is taken as the dependent variable. The total sample set is divided into 70% training samples and 30% test samples to construct a random forest model; Model verification: The K-fold crossover method is used to verify the model to ensure the validity and reliability of the model; Indicator importance analysis: The Gini index in the random forest model is used to determine the importance of indicators; the importance of each indicator is calculated to provide ideas and directions for flash flood disaster prevention work in villages along the river.
2. The method for evaluating mountain torrent disasters in riverside villages based on machine learning according to claim 1 is characterized by: The construction of the flash flood disaster indicator system for villages along the river specifically includes: Based on the on-site investigation and characteristic analysis of the villages along the river, and based on the formation mechanism of mountain torrent disasters by predecessors, and by referring to relevant research, we start from the research system combining points, lines and surfaces of "village-river section-watershed" to select indicators; After determining the evaluation indicators and obtaining the data for each indicator, a quantitative evaluation indicator system was established. For quantitative indicators, the natural breakpoint method in ArcGIS was used to divide the flash flood disaster risk assessment indicators of villages along the river into four levels. For qualitative indicators, the indicators were graded by consulting experts and referring to the "Flash Flood and Mudslide Disaster Forecast" and other relevant materials.
3. The method for evaluating mountain torrent disasters in riverside villages based on machine learning according to claim 1, characterized in that: The risk level classification specifically includes: The number and proportion of historical disaster points were counted, and the level of flash flood disasters was divided into four levels according to the number of historical flash flood disasters in villages along the river and the degree of damage caused, namely: low risk, medium risk, relatively high risk and high risk.
4. The method for evaluating mountain torrent disasters in riverside villages based on machine learning according to claim 1, characterized in that: The model construction specifically includes the following steps: Random forest is a supervised learning model. Compared with the traditional CART method that uses the entire data set, the RF method trains each individual CART on the Bootstrap sample of the entire data set. It is characterized by high prediction accuracy and the ability to perform feature sensitivity analysis; Random Forest Algorithm Schematic Diagram, the model construction steps are as follows: S1. Data preparation: The selected flash flood disaster impact index of the riverside villages is used as the independent variable, and the flash flood disaster risk level obtained by combining historical flash floods is used as the dependent variable. The data set is divided into a training set and a test set with a division ratio of 7:3; S2. Random sampling: The random forest model uses the Bootstrap resampling method to randomly select n groups of samples from the total sample, and then obtain multiple sub-samples of the same size; S3. Decision tree construction: Decision tree modeling is performed for each group of subsamples. Each decision tree randomly selects a small group of input variables to be split, and obtains the classification model {h1(X), h2(X), …, hn(X)}; S4. Training model: Use multiple random samples and random features to train multiple decision trees. The established classification model sequence can obtain n results. Finally, the voting method or the average value is used as the final prediction result. The final classification result of the majority vote is: Where: H(x) is the combined classification model; x is the input sample; h i is a single decision tree classification model; Y is the output variable; I(·) is the indicative function; The average forecast results: Where: L(x) is the combined prediction model; As one or more embodiments, the model verification specifically includes the following steps: To ensure the effectiveness and reliability of the model, the k-fold crossover method is used to verify the model. This method divides the data set into k subsets, uses k-1 subsets for training each time, and uses the remaining 1 subset for verification; the process is repeated k times to ensure that each subset is used as a verification set once, and the average performance of k verifications is calculated as the evaluation indicator of the model.
5. The method for evaluating mountain torrent disasters in riverside villages based on machine learning according to claim 1, characterized in that: The analysis of the importance of the indicators specifically includes: The Gini Impurity is used in the random forest model as a means of judging the importance of features (indicators); the Gini Index is mainly used in classification problems to evaluate the impurity of a data set, that is, the probability that two samples belong to different categories if they are randomly selected; the smaller the Gini Index, the higher the purity of the data set; in the random forest, the importance of a feature is evaluated by observing the average reduced impurity of the feature at the split point in the tree; Specifically, it is the average value of the reduced impurity (Gini index) when the feature is used as a split feature in all trees; finally, the importance values of all features are usually standardized so that their sum is 1 for easy comparison; For a single decision tree, nodes are recursively split among m variables based on the principle of minimum node impurity (i.e., minimum Gini coefficient). The calculation formula of the Gini index is as follows: Where t is the decision tree node, pi is the relative frequency of the i-th category at node t, and m is the total number of categories; The importance of each risk indicator is analyzed by the percentage of the average Gini reduction value of the indicator to the sum of the average Gini reduction values of all indicators, so as to obtain the indicators that have a greater impact on the risk of flash flood disasters in villages along the river, providing ideas and directions for the prevention and control of flash flood disasters.
Citation Information
Cited By
Landslide susceptibility evaluation method based on machine learning
CN119831338A
Quantitative evaluation method for single-factor influence of mountain torrent breeding background data on mountain torrent partition
CN119941045A
Quantitative evaluation method of single factor impact of flash flood zoning based on flash flood incubation background data
CN119941045B
