Bayesian theorem and machine learning-based drainage basin flood and drought disaster prediction method

By combining Bayes' theorem and machine learning, using loss functions and Bayesian optimization hyperparameter technology, we solve the problems of limited data assumptions and insufficient model adaptability in flood and drought disaster prediction, and achieve more accurate and flexible disaster prediction. predict.

CN118643940AInactive Publication Date: 2024-09-13ZHONGKE XINGTU YISHUI (SICHUAN) TECH CO LTD +1

Patent Information

Application Number
CN202410793642.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-19
Publication Date
2024-09-13
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing flood and drought disaster prediction methods are subject to assumptions about data distribution and model form when processing large-scale data, and have a certain degree of subjectivity in disaster probability interpretation. They cannot adapt to changes in data characteristics in a timely manner, resulting in inaccurate predictions and reduced model performance.

Method used

The loss function based on Bayes' theorem is used to generate Bayesian predictions, and the posterior prediction is constructed through the variational approximation of the generalized posterior, and three Bayesian optimization hyperparameter methods of confidence, improved probability and expectation improvement are combined for Gaussian The process is optimized to enhance the robustness and adaptability of the model.

Benefits of technology

It achieves robust processing of data uncertainty and noise, reduces the uncertainty of a single method, improves the accuracy of disaster prediction and the adaptability of the model, and can make optimal disaster predictions and adapt to different situations and Data characteristics.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118643940A
    Figure CN118643940A
Patent Text Reader

Abstract

The invention belongs to the technical field of disaster prediction, and particularly discloses a Bayesian theorem and machine learning-based drainage basin flood and drought disaster prediction method, which comprises the steps of data collection, disaster prediction model construction, disaster prediction model adjustment and real-time flood and drought disaster prediction. According to the method, Bayesian prediction is generated by using a loss function, posterior prediction is constructed through variation approximation of generalized posterior, uncertainty in data can be fully considered, and optimal disaster prediction can be helped to be made to minimize loss; according to the method, three Bayesian optimization hyper-parameter methods of upper confidence, improved probability and expectation improvement are combined to optimize a Gaussian process in a disaster prediction model, and through complementation of different methods, respective advantages of the three methods are combined, so that hyper-parameters can be optimized more comprehensively to adapt to different conditions and data features.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of disaster prediction, and in particular to a method for predicting watershed flood and drought disasters based on Bayesian theorem and machine learning. Background Art

[0002] Flood and drought disaster prediction can help people prepare for disasters in advance, reduce losses, improve disaster prevention and mitigation capabilities, reduce the impact of disasters, ensure the sustainable use of water resources, and promote the sustainable development of the economy and society. Flood and drought disaster prediction relies on a large number of parameters. When processing large-scale data, existing flood and drought disaster prediction methods have certain assumptions and restrictions on the distribution and model form of data, and the interpretation of disaster probability is subjective. At the same time, the existing disaster prediction model cannot adapt to new data features in a timely manner as time goes by and data changes, resulting in inaccurate predictions and a gradual decline in model performance. Summary of the invention

[0003] In view of the above situation, in order to overcome the defects of the prior art, the present invention provides a method for predicting watershed flood and drought disasters based on Bayesian theorem and machine learning. In view of the fact that flood and drought disaster prediction depends on a large number of parameters, the existing flood and drought disaster prediction methods have certain assumptions and restrictions on the distribution and model form of data when processing large-scale data, and the interpretation of disaster probability has a certain subjectivity. The present invention uses a loss function to generate a Bayesian prediction, and constructs a posterior prediction by variational approximation of the generalized posterior. It can fully consider the uncertainty in the data, has a certain robustness to the noise and outliers in the data, and can help make the best disaster prediction to minimize the loss; in view of the technical problem that the existing disaster prediction model cannot adapt to the new data features in time with the passage of time and the change of data, resulting in inaccurate prediction and the gradual decline of the performance of the model, the present invention uses the upper confidence, improved probability and expected improvement three Bayesian optimization hyperparameter methods to optimize the Gaussian process in the disaster prediction model. Through the complementarity of different methods, the advantages of the three methods are combined, and the hyperparameters can be optimized more comprehensively, adapted to different situations and data features, and the uncertainty of a single method is reduced.

[0004] The technical solution adopted by the present invention is as follows: The present invention provides a method for predicting watershed flood and drought disasters based on Bayesian theorem and machine learning, which specifically includes the following steps:

[0005] Step S1: Data collection, collecting historical flood and drought disaster data related to the Kuye River Basin, the historical flood and drought disaster data including meteorological data, disaster influencing factors and corresponding disaster levels, the disaster levels are divided into five levels: major disaster, heavy disaster, medium disaster, minor disaster and slight disaster;

[0006] Step S2: Construct a disaster prediction model, create and initialize the XGboost model to construct a disaster prediction model, and construct a posterior prediction through a variational approximation of the generalized posterior;

[0007] Step S3: Adjust the disaster prediction model, and use three Bayesian optimization hyperparameter methods, namely upper confidence, improved probability, and expected improvement, to optimize the Gaussian process in the disaster prediction model;

[0008] Step S4: Real-time flood and drought disaster prediction: collect meteorological data of the Kuye River Basin in real time, input the meteorological data into the adjusted disaster prediction model, and implement the prediction of disaster level.

[0009] Furthermore, step S2, constructing a disaster prediction model, specifically comprises the following steps:

[0010] Step S21: Create and initialize the XGboost model to build a disaster prediction model, divide the historical flood and drought disaster data into a training set and a test set in a ratio of 7:3, and input the training set into the disaster prediction model for training;

[0011] Step S22: Definition is the realization vector of the random process in the complete probability space, using the loss function to generate Bayesian predictions and define the expected scoring rule under the true distribution. The formula used is as follows: ;

[0012] In the formula, is the expected scoring rule under the true distribution, is the true distribution, is a positive scoring rule, is the value of the realization vector;

[0013] Step S23: Using The sample estimate of is used to define the sample criterion and obtain the sample average distribution. The formula used is as follows: ;

[0014] In the formula, is the sample mean distribution, The value in the complete probability space is the parameter in the disaster prediction model. is the number of elements in the realization vector, yes One step ahead prediction of the moment, yes From 0 to The cumulative sum of

[0015] Step S24: using a generalized update rule to distinguish the disaster influencing factors in the disaster prediction model and weight the disaster influencing factors. The formula used is as follows: ;

[0016] In the formula, is the posterior density, is the prior density, is the scale factor;

[0017] Step S25: Calculate the one-step-ahead generalized posterior prediction using the following formula: ;

[0018] In the formula, is a one-step-ahead generalized posterior prediction;

[0019] Step S26: Definition is a probability measure class, in and When the distribution allows density, the evidence lower bound is maximized, and the formula used is as follows: ;

[0020] In the formula, It is the lower bound of evidence. is the prediction error;

[0021] Step S27: Select KL divergence and use Bayesian method to The posterior approximation is obtained by approximation using the following formula: ;

[0022] In the formula, is the a posteriori approximation;

[0023] Step S28, preset an error threshold, and repeat steps S25 to S27 until the prediction error reaches the error threshold.

[0024] Furthermore, step S3, adjusting the disaster prediction model, specifically comprises the following steps:

[0025] Step S31: Calculate the variance inflation factor and tolerance of historical flood and drought disaster data, test multicollinearity based on the variance inflation factor and tolerance, calculate the correlation of disaster influencing factors with multicollinearity, sort the correlation from low to high, and select the top 6 disaster influencing factors as input features;

[0026] Step S32: Use the upper confidence limit function to calculate the upper confidence limit of the Gaussian process. The formula used is as follows: ;

[0027] In the formula, is the upper confidence limit function, are the Gaussian process parameters, is the mean of the Gaussian process, is the standard deviation of the Gaussian process, is the exploration parameter;

[0028] Step S33: Use the improved probability function to calculate the maximum improved probability of the previously predicted point, and use the prediction with the maximum improved probability as the next prediction. The formula used is as follows: ;

[0029] In the formula, is the improved probability function, is the maximum objective function, is the equilibrium parameter;

[0030] Step S34: Use the expected improvement function to quantify the improvement degree of the new point, and take the prediction with the maximum expected value as the new prediction. The formula used is as follows: ;

[0031] In the formula, is the expected improvement function.

[0032] The beneficial effects achieved by the present invention using the above scheme are as follows:

[0033] (1) The prediction of flood and drought disasters depends on a large number of parameters. The existing flood and drought disaster prediction methods have certain assumptions and restrictions on the distribution and model form of data when processing large-scale data, and the interpretation of disaster probability has certain subjectivity. The present invention uses a loss function to generate Bayesian predictions, and constructs posterior predictions by variational approximation of generalized posterior. It can fully consider the uncertainty in the data, has certain robustness to noise and outliers in the data, and can help make the best disaster prediction to minimize losses.

[0034] (2) In order to address the technical problem that the existing disaster prediction model cannot adapt to new data features in a timely manner as time goes by and data changes, resulting in inaccurate predictions and a gradual decline in model performance, the present invention uses a combination of three Bayesian optimization hyperparameter methods, namely upper confidence, improved probability and expected improvement, to optimize the Gaussian process in the disaster prediction model. By complementing different methods and combining the advantages of the three methods, the hyperparameters can be optimized more comprehensively, adapting to different situations and data features, and reducing the uncertainty of a single method. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1A flow chart of the steps of a method for predicting flood and drought disasters in a watershed based on Bayesian theorem and machine learning provided by the present invention;

[0036] Figure 2 A flowchart of the process of building a disaster prediction model provided by the present invention.

[0037] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention. DETAILED DESCRIPTION

[0038] The technical solutions 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, rather than all the embodiments; based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0039] Example 1: See Figure 1 The present invention provides a method for predicting flood and drought disasters in a river basin based on Bayesian theorem and machine learning, which specifically includes the following steps:

[0040] Step S1: Data collection, collecting historical flood and drought disaster data related to the Kuye River Basin, the historical flood and drought disaster data including meteorological data, disaster influencing factors and corresponding disaster levels, the disaster levels are divided into five levels: major disaster, heavy disaster, medium disaster, minor disaster and slight disaster;

[0041] Step S2: Construct a disaster prediction model, create and initialize the XGboost model to construct a disaster prediction model, and construct a posterior prediction through a variational approximation of the generalized posterior;

[0042] Step S3: Adjust the disaster prediction model, and use three Bayesian optimization hyperparameter methods, namely upper confidence, improved probability, and expected improvement, to optimize the Gaussian process in the disaster prediction model;

[0043] Step S4: Real-time flood and drought disaster prediction: collect meteorological data of the Kuye River Basin in real time, input the meteorological data into the adjusted disaster prediction model, and implement the prediction of disaster level.

[0044] Example 2: See Figure 1 and Figure 2 This embodiment is based on the above embodiment. Further, step S2, building a disaster prediction model, specifically includes the following steps:

[0045] Step S21: Create and initialize the XGboost model to build a disaster prediction model, divide the historical flood and drought disaster data into a training set and a test set in a ratio of 7:3, and input the training set into the disaster prediction model for training;

[0046] Step S22: Definition is the realization vector of the random process in the complete probability space, using the loss function to generate Bayesian predictions and define the expected scoring rule under the true distribution. The formula used is as follows: ;

[0047] In the formula, is the expected scoring rule under the true distribution, is the true distribution, is a positive scoring rule, is the value of the realization vector;

[0048] Step S23: Using The sample estimate of is used to define the sample criterion and obtain the sample average distribution. The formula used is as follows: ;

[0049] In the formula, is the sample mean distribution, The value in the complete probability space is the parameter in the disaster prediction model. is the number of elements in the realization vector, yes One step ahead prediction of the moment, yes From 0 to The cumulative sum of

[0050] Step S24: using a generalized update rule to distinguish the disaster influencing factors in the disaster prediction model and weight the disaster influencing factors. The formula used is as follows: ;

[0051] In the formula, is the posterior density, is the prior density, is the scale factor;

[0052] Step S25: Calculate the one-step-ahead generalized posterior prediction using the following formula: ;

[0053] In the formula, is a one-step-ahead generalized posterior prediction;

[0054] Step S26: Definition is a probability measure class, in and When the distribution allows density, the evidence lower bound is maximized, and the formula used is as follows: ;

[0055] In the formula, It is the lower bound of evidence. is the prediction error;

[0056] Step S27: Select KL divergence and use Bayesian method to The posterior approximation is obtained by approximation using the following formula: ;

[0057] In the formula, is the a posteriori approximation;

[0058] Step S28, preset an error threshold, and repeat steps S25 to S27 until the prediction error reaches the error threshold.

[0059] Through the above operations, in view of the fact that flood and drought disaster prediction relies on a large number of parameters, the existing flood and drought disaster prediction methods have certain assumption restrictions on the distribution and model form of data when processing large-scale data, and the technical problem that the interpretation of disaster probability has a certain subjectivity, the present invention uses a loss function to generate a Bayesian prediction, and constructs a posterior prediction by variational approximation of the generalized posterior, which can fully consider the uncertainty in the data, has a certain robustness to noise and outliers in the data, and can help make the best disaster prediction to minimize the loss.

[0060] Example 3, see Figure 1 This embodiment is based on the above embodiment. Further, step S3, adjusting the disaster prediction model, specifically includes the following steps:

[0061] Step S31: Calculate the variance inflation factor and tolerance of historical flood and drought disaster data, test multicollinearity based on the variance inflation factor and tolerance, calculate the correlation of disaster influencing factors with multicollinearity, sort the correlation from low to high, and select the top 6 disaster influencing factors as input features;

[0062] Step S32: Use the upper confidence limit function to calculate the upper confidence limit of the Gaussian process. The formula used is as follows: ;

[0063] In the formula, is the upper confidence limit function, are the Gaussian process parameters, is the mean of the Gaussian process, is the standard deviation of the Gaussian process, is the exploration parameter;

[0064] Step S33: Use the improved probability function to calculate the maximum improved probability of the previously predicted point, and use the prediction with the maximum improved probability as the next prediction. The formula used is as follows: ;

[0065] In the formula, is the improved probability function, is the maximum objective function, is the equilibrium parameter;

[0066] Step S34: Use the expected improvement function to quantify the improvement degree of the new point, and take the prediction with the maximum expected value as the new prediction. The formula used is as follows: ;

[0067] In the formula, is the expected improvement function.

[0068] Through the above operations, in order to solve the technical problem that the existing disaster prediction model cannot adapt to new data features in time as time goes by and data changes, resulting in inaccurate predictions and gradually declining model performance, the present invention uses the three Bayesian optimization hyperparameter methods of upper confidence, improved probability and expected improvement to optimize the Gaussian process in the disaster prediction model. Through the complementarity of different methods, the advantages of each of the three methods are combined, and the hyperparameters can be optimized more comprehensively to adapt to different situations and data characteristics, thereby reducing the uncertainty of a single method.

[0069] Embodiment 4: This embodiment is based on the above embodiment. In Embodiment 1, the classification of disaster levels adopts multi-factor five-level classification indicators and standards, which conform to the pagoda-shaped regular distribution. The corresponding multi-factor conversion standards are as follows:

[0070] Conversion of death toll: If the death toll is greater than If the death toll is greater than 1 and less than or equal to People, recorded as ,in is the number of deaths. If the number of deaths is less than or equal to 1, it is recorded as 0;

[0071] Conversion of disaster-affected area: If the disaster-affected area is larger than Ten thousand mu, recorded as 1, if the affected area is greater than 10,000 mu and less than or equal to Ten thousand acres, recorded as ,in is the disaster-affected area. If the disaster-affected area is less than or equal to 10,000 mu, it is recorded as 0;

[0072] Conversion of direct losses: If the direct loss is greater than 100 million yuan, recorded as 1, if the direct loss is greater than 100 million yuan and less than or equal to 100 million yuan, recorded as ,in If the direct loss is less than or equal to RMB 100 million, it is recorded as 0;

[0073] According to the converted values, the five-level classification standard for water and drought disaster levels is unified as: major disaster (0.8, 1.0), serious disaster (0.6, 0.8), moderate disaster (0.4, 0.6), minor disaster (0.2, 0.4), and slight disaster (0, 0.2).

[0074] Embodiment 5: This embodiment is based on the above embodiment. In actual flood and drought disaster prediction, the covariate and dependent variable have a complex nonlinear relationship. Specifically, the time series process of disaster prediction is determined by a three-dimensional random process. The time series process is expressed as , the three-dimensional random process is expressed as , where the covariate , the joint distribution of the first two covariates is , the third covariate is independent of the first two covariates and is distributed according to an AR(4) process, ,in, ;

[0075] Dependent Variable ,in, , , It is derived from the AR (4) model The marginal distribution function of .

[0076] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.

[0077] 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.

[0078] The present invention and its embodiments are described above, and such description is not restrictive. The drawings show only one embodiment of the present invention, and the actual structure is not limited thereto. In short, if ordinary technicians in the field are inspired by it, without departing from the purpose of the invention, they can design a structure and embodiment similar to the technical solution without creativity, which should belong to the protection scope of the present invention.

Claims

1. A method for predicting flood and drought disasters in river basins based on Bayesian theorem and machine learning. It is characterized in that The specific steps include: Step S1: Data collection, collecting historical flood and drought disaster data related to the Kuye River Basin, the historical flood and drought disaster data including meteorological data, disaster influencing factors and corresponding disaster levels, the disaster levels are divided into five levels: major disaster, heavy disaster, medium disaster, minor disaster and slight disaster; Step S2: Construct a disaster prediction model, create and initialize the XGboost model to construct a disaster prediction model, and construct a posterior prediction through a variational approximation of the generalized posterior; Step S3: Adjust the disaster prediction model, and use three Bayesian optimization hyperparameter methods, namely upper confidence, improved probability, and expected improvement, to optimize the Gaussian process in the disaster prediction model; Step S4: Real-time flood and drought disaster prediction: collect meteorological data of the Kuye River Basin in real time, input the meteorological data into the adjusted disaster prediction model, and implement the prediction of disaster level.

2. A method for predicting flood and drought disasters in a river basin based on Bayesian theorem and machine learning according to claim 1, It is characterized in that Step S2, constructing a disaster prediction model, specifically includes the following steps: Step S21: Create and initialize the XGboost model to build a disaster prediction model, divide the historical flood and drought disaster data into a training set and a test set in a ratio of 7:3, and input the training set into the disaster prediction model for training; Step S22: Definition is the realization vector of the random process in the complete probability space, using the loss function to produce Bayesian predictions and define the expected scoring rule under the true distribution; Step S23: Using The sample estimation of defines the sample criterion and obtains the sample average distribution; Step S24: using a generalized update rule to distinguish disaster influencing factors in the disaster prediction model and weighting the disaster influencing factors; Step S25: Calculate the one-step-ahead generalized posterior prediction; Step S26: Definition is a probability measure class, in and When the distribution allows density, the prediction error is calculated to maximize the lower bound of the evidence; Step S27: Select KL divergence and use Bayesian method to Make an approximation to obtain the posterior approximation; Step S28, preset an error threshold, and repeat steps S25 to S27 until the prediction error reaches the error threshold.

3. A method for predicting flood and drought disasters in a river basin based on Bayesian theorem and machine learning according to claim 1, It is characterized in that Step S3, adjusting the disaster prediction model, specifically includes the following steps: Step S31: Calculate the variance inflation factor and tolerance of historical flood and drought disaster data, test multicollinearity based on the variance inflation factor and tolerance, calculate the correlation of disaster influencing factors with multicollinearity, sort the correlation from low to high, and select the top 6 disaster influencing factors as input features; Step S32: Use the upper confidence limit function to calculate the upper confidence limit of the Gaussian process. The formula used is as follows: ; In the formula, is the upper confidence limit function, are the Gaussian process parameters, is the mean of the Gaussian process, is the standard deviation of the Gaussian process, is the exploration parameter; Step S33: Use the improved probability function to calculate the maximum improved probability of the previously predicted point, and use the prediction with the maximum improved probability as the next prediction. The formula used is as follows: ; In the formula, is the improved probability function, is the maximum objective function, is the equilibrium parameter; Step S34: Use the expected improvement function to quantify the improvement degree of the new point, and take the prediction with the maximum expected value as the new prediction. The formula used is as follows: ; In the formula, is the expected improvement function.

Citation Information

Patent Citations

  • Runoff probability prediction method and system based on deep learning

    CN110969290A

  • Jiangxi province small watershed mountain torrent susceptibility mapping method based on lifting algorithm

    CN114493244A

  • Landslide early warning method based on XGB and CatBoost dual-boosting tree algorithm

    CN115359630A

  • Optimization control method and system for vehicle detrapping in soft terrain

    CN117193006A

  • Precipitation forecast post-processing correction method

    CN117214976A

Cited By

  • Flood session division method and device based on deep learning

    CN120372216A

  • Flood event division method and device based on deep learning

    CN120372216B