Typhoon rainfall prediction method and system based on machine learning and bma model
By combining machine learning and Bayesian model averaging methods, and comprehensively considering typhoon characteristics and meteorological characteristics, and dynamically weighting typhoon characteristics, the spatial heterogeneity and model uncertainty problems in typhoon rainfall forecasting are solved, and more accurate and stable typhoon rainfall predictions are achieved.
Patent Information
- Application Number
- CN202510182134.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-19
- Publication Date
- 2026-02-03
- Estimated Expiration
- 2045-02-19
AI Technical Summary
Existing typhoon rainfall forecasting methods fail to effectively consider the spatial heterogeneity within the typhoon-affected area, resulting in inaccurate forecasts and a lack of robustness. The prediction results of a single model are easily affected by data and parameter settings.
We employ machine learning and Bayesian model averaging (BMA) in combination with multiple models (RF, SVM, KNN, XGBoost) to predict typhoon rainfall. By acquiring typhoon features, grid spatial attributes, and meteorological features, we dynamically weight typhoon features, quantify model credibility using Bayesian methods, and perform weighted averaging to improve prediction accuracy.
It improves the accuracy and interpretability of typhoon rainfall forecasts, reduces forecast uncertainty, enhances forecast stability and robustness, and maintains high forecast performance in different scenarios.
Smart Images

Figure CN120559754B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of extreme weather event prediction, and particularly relates to a typhoon rainfall prediction method and system based on machine learning and BMA model. BACKGROUND
[0002] The prior art of typhoon rainfall prediction currently has the following defects:
[0003] Current research mainly focuses on rainfall prediction at the station scale, but does not effectively consider the spatial heterogeneity within the typhoon influence area. There is a large spatial difference in rainfall distribution within the typhoon influence area, so if only based on the data of a single station for prediction, it is often difficult to accurately predict the rainfall distribution of the entire typhoon influence area. This means that many local features of typhoon rainfall may be ignored, resulting in prediction results that cannot fully reflect the actual impact of the typhoon.
[0004] Many current typhoon rainfall prediction methods choose a single optimal model for prediction. However, the selection of the optimal model usually depends on the specific settings of the data set and model parameters, which makes the prediction results susceptible to the quality of the data, model assumptions or parameter settings, resulting in high uncertainty in the prediction. In addition, ignoring the uncertainty in the model selection process also leads to a lack of sufficient robustness in the prediction results, which cannot remain stable and accurate under different scenarios or conditions. SUMMARY
[0005] The main purpose of the embodiments of the present application is to provide a typhoon rainfall prediction method and system based on machine learning and BMA model.
[0006] The technical solution adopted by the present application is:
[0007] On the one hand, the embodiments of the present application provide a typhoon rainfall prediction method based on machine learning and BMA model, which comprises the following steps:
[0008] Obtaining feature information; the feature information includes typhoon features, grid space attributes and meteorological features;
[0009] According to the feature information, a machine learning model is obtained; the machine learning model includes an RF model, an SVM model, a KNN model and an XGBoost model;
[0010] According to the machine learning model, a BMA model is obtained;
[0011] According to the BMA model, typhoon rainfall prediction data is obtained.
[0012] Further, the step of obtaining feature information comprises the following steps:
[0013] acquiring typhoon center data;
[0014] constructing a buffer zone by a grid data extraction method according to the typhoon center data;
[0015] obtaining feature information according to the buffer zone; the feature information includes typhoon features, grid space attributes, and meteorological features;
[0016] the typhoon features include longitude of a typhoon center, latitude of the typhoon center, maximum sustained wind speed, weighted typhoon wind speed, typhoon center pressure, weighted typhoon center pressure, moving speed of the typhoon center, weighted typhoon moving speed, and moving direction of the typhoon center; the weighted typhoon wind speed, the weighted typhoon center pressure, and the weighted typhoon moving speed are dynamic weighted typhoon features in the typhoon features; the maximum sustained wind speed, the typhoon center pressure, and the moving speed of the typhoon center are original typhoon features of the typhoon center in the typhoon features;
[0017] the grid space attributes include grid latitude, grid longitude, elevation information, distance of each grid from the typhoon center, and orientation of each grid relative to the typhoon center;
[0018] the meteorological features include rainfall, temperature, relative humidity, wind speed, and wind direction of each grid;
[0019] the lag time of the rainfall is selected by using an autocorrelation coefficient;
[0020] a formula used for calculating the dynamic weighted typhoon features in each grid includes:
[0021] ω i = 1 - d i / r;
[0022] Weighted_f i = f·ω i ;
[0023] wherein i is a natural number, d i is the distance of the i-th grid from the typhoon center, r is the radius of the buffer zone, ω i is the dynamic weight of the i-th grid, f represents the original typhoon features, and Weighted_f i is the dynamic weighted typhoon features of the i-th grid.
[0024] Further, the lag time of the rainfall is selected by using an autocorrelation coefficient, and a formula used includes:
[0025]
[0026] Where N is the total number of observations in the time series; t is the first time point, tk is the second time point; R t,i R represents the rainfall of the grid at the first moment; t-k,i The rainfall at the second time point is the amount recorded on the grid. The average rainfall of the grid at the first moment; ρ(k) represents the average rainfall of the grid at the second time point; k is an integer, 1≤k≤24; ρ(k) is the lag time of the rainfall.
[0027] Furthermore, obtaining the machine learning model based on the feature information includes the following steps:
[0028] The feature information is processed using the Z-score standardization method, and each feature information is rescaled so that all feature information has zero mean and unit standard deviation, thus obtaining model training data;
[0029] Based on the model training data, an initial training model is trained; the initial training model includes an initial RF model, an initial SVM model, an initial KNN model, and an initial XGBoost model;
[0030] The performance of each of the initial training models was evaluated by five-fold cross-validation, and the hyperparameters were tuned using a grid search algorithm to obtain the optimal combination of hyperparameters for each of the initial training models.
[0031] Based on the optimal combination of hyperparameters, a machine learning model is obtained; the machine learning model includes the RF model, SVM model, KNN model, and XGBoost model.
[0032] Further, obtaining the BMA model based on the machine learning model includes the following steps:
[0033] Obtain the prediction results for each of the machine learning models;
[0034] Based on the prediction results, obtain the model weights;
[0035] Based on the model weights, the BMA model is obtained.
[0036] Furthermore, the formula used to obtain the model weights based on the prediction results includes:
[0037]
[0038] Among them, M j Let be the model prediction value of the j-th machine learning model; D = [y1, y2, ..., y N ] represents observation data; P(D|Mj M is the predicted value of the given model. j Conditional probability of rainfall data; P(M j ) represents the prior probability of the j-th machine learning model; M i P(M) represents the model prediction value of the i-th machine learning model. i P(M) represents the prior probability of the i-th machine learning model. i |D) represents the model's predicted value M i The posterior probability; P(M) j |D) represents the model's predicted value M j The posterior probability, w j For model weights, satisfying
[0039] Furthermore, the typhoon rainfall prediction method based on machine learning and BMA models also includes the following steps:
[0040] Obtain rainfall observations;
[0041] Obtain the predicted values from the BMA model;
[0042] Based on the observed rainfall values and the predicted values, evaluation data is obtained; the evaluation data includes the coefficient of determination, mean absolute error, and root mean square error.
[0043] Furthermore, the formula used to obtain the evaluation data based on the observed rainfall values and the predicted values includes:
[0044]
[0045] in, This is the i-th rainfall observation; This is the i-th predicted value; R is the average of the observed rainfall values; 2 is the coefficient of determination; MAE is the mean absolute error; RMSE is the root mean square error.
[0046] On the other hand, embodiments of the present invention also provide a typhoon rainfall prediction system based on machine learning and BMA models, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the typhoon rainfall prediction method based on machine learning and BMA models as described above.
[0047] On the other hand, embodiments of the present invention also provide a computer-readable storage medium storing computer-executable instructions for causing a computer to execute the typhoon rainfall prediction method based on machine learning and BMA models as described above.
[0048] The embodiments of this application include at least the following beneficial effects: This application provides a typhoon rainfall prediction method and system based on machine learning and BMA models. This invention can acquire feature information; the feature information includes typhoon features, grid spatial attributes, and meteorological features; based on the feature information, a machine learning model is acquired; the machine learning model includes RF model, SVM model, KNN model, and XGBoost model; based on the machine learning model, a BMA model is acquired; based on the BMA model, typhoon rainfall prediction data is obtained. This invention can improve the accuracy and interpretability of typhoon rainfall prediction. Attached Figure Description
[0049] Figure 1 This invention provides a typhoon rainfall prediction method based on machine learning and BMA models.
[0050] Figure 2 This is a schematic diagram of the research area and grid extraction provided in an embodiment of the present invention;
[0051] Figure 3 These are the 28 typhoon paths and 462 typhoon centers (2020-2023; 3-hour intervals) provided in this embodiment of the invention. Detailed Implementation
[0052] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit it. In the following description, when referring to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with those of this application; they are merely examples of apparatuses and methods consistent with some aspects of the embodiments of this application as detailed in the appended claims.
[0053] It is understood that the terms “first,” “second,” etc., used in this application may be used herein to describe various concepts, but unless otherwise stated, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. For example, without departing from the scope of the embodiments of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the words “if,” “when,” or “in response to a determination” as used herein may be interpreted as “when…” or “when…” or “in response to a determination.”
[0054] As used in this application, the terms "at least one", "multiple", "each", "any", etc., "at least one" includes one, two or more, "multiple" includes two or more, "each" refers to each of the corresponding multiples, and "any" refers to any one of the multiples.
[0055] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0056] Before providing a detailed description of the embodiments of this application, some of the nouns and terms involved in the embodiments of this application will be explained first. The nouns and terms involved in the embodiments of this application are subject to the following interpretations.
[0057] 1) BMA (Bayesian Model Averaging) is an ensemble learning method based on Bayesian theory. It obtains the final prediction by weighted averaging of the prediction results of multiple models.
[0058] 2) RF model (Random Forest), is an ensemble learning method and an extension of decision trees;
[0059] 3) SVM (Support Vector Machine) model is a supervised learning model;
[0060] 4) KNN model (K-Nearest Neighbors), K-Nearest Neighbors (KNN) is an instance-based learning algorithm;
[0061] 5) XGBoost model (Extreme Gradient Boosting): XGBoost is an efficient gradient boosting tree (GBDT) algorithm;
[0062] 6) Coefficient of determination (R²) 2 (), is an evaluation metric in regression analysis used to measure how well a model fits the data;
[0063] 7) Mean Absolute Error (MAE) is an evaluation metric for regression models, representing the average absolute difference between predicted and actual values.
[0064] 8) Root Mean Squared Error (RMSE) is an evaluation metric for regression models, representing the average of the square roots of the differences between predicted and actual values.
[0065] 9) Z-score standardization is a data preprocessing method;
[0066] 10) Five-fold cross-validation is a model evaluation method;
[0067] 11) Grid Search is a method for hyperparameter optimization.
[0068] The embodiments of the present invention will be further described below with reference to the accompanying drawings.
[0069] On one hand, embodiments of the present invention provide a typhoon rainfall prediction method based on machine learning and BMA models, referring to... Figure 1 A typhoon rainfall prediction method based on machine learning and BMA models includes the following steps:
[0070] S100. Obtain feature information; feature information includes typhoon characteristics, grid spatial attributes, and meteorological characteristics;
[0071] S200. Based on the feature information, obtain the machine learning model; the machine learning model includes RF model, SVM model, KNN model and XGBoost model;
[0072] S300. Obtain the BMA model based on the machine learning model;
[0073] S400. Based on the BMA model, typhoon rainfall forecast data is obtained.
[0074] Step S100 of this embodiment of the invention, which involves obtaining feature information, includes the following steps:
[0075] S110, Obtain typhoon center data;
[0076] S120. Based on the typhoon center data, a buffer is constructed using a grid data extraction method;
[0077] S130. Based on the buffer zone, obtain the feature information; the feature information includes typhoon features, grid spatial attributes, and meteorological features;
[0078] S140. Typhoon characteristics include the longitude of the typhoon center, the latitude of the typhoon center, the maximum sustained wind speed, the weighted typhoon wind speed, the typhoon center pressure, the weighted typhoon center speed, the weighted typhoon speed, and the direction of the typhoon center's movement. The weighted typhoon wind speed, the weighted typhoon center pressure, and the weighted typhoon speed are the dynamic weighted typhoon characteristics in the typhoon characteristics section. The maximum sustained wind speed, the typhoon center pressure, and the typhoon center speed are the original typhoon characteristics of the typhoon center in the typhoon characteristics section.
[0079] S150, the grid spatial attributes include the grid latitude, grid longitude, elevation information, grid distance from the typhoon center, and grid orientation relative to the typhoon center for each grid;
[0080] S160. Meteorological characteristics include rainfall, temperature, relative humidity, wind speed, and wind direction for each grid.
[0081] S170, The lag time of rainfall is selected using the autocorrelation coefficient;
[0082] S180. The formulas used to calculate the dynamic weighted typhoon characteristics in each grid include:
[0083] ω i =1-d i / r;
[0084] Weighted_f i =f·ω i ;
[0085] Where i is a natural number: d i ω is the distance of the i-th grid from the typhoon center; r is the radius of the buffer zone; ω i The dynamic weight of the i-th grid; f represents the original typhoon feature; Weighted_f i It is the dynamically weighted typhoon feature of the i-th grid.
[0086] The lag time of rainfall in step S170 of this embodiment of the invention is selected by means of the autocorrelation coefficient, and the formula used includes:
[0087]
[0088] Where N is the total number of observations in the time series; t is the first time point, tk is the second time point; R t,i R represents the rainfall at the first moment in the grid. t-k,i The rainfall at the second moment is the value of the grid. The average rainfall for the grid at the first moment; ρ(k) represents the average rainfall of the grid at the second time step; k is an integer, 1≤k≤24; ρ(k) is the lag time of the rainfall.
[0089] Step S200 of this embodiment of the invention discloses obtaining a machine learning model based on feature information, including the following steps:
[0090] S210. The feature information is processed using the Z-score standardization method. Each feature information is rescaled so that all feature information has zero mean and unit standard deviation, thus obtaining model training data.
[0091] S220. Train the initial training model based on the model training data; the initial training model includes the initial RF model, the initial SVM model, the initial KNN model, and the initial XGBoost model;
[0092] S230. The performance of each initial training model is evaluated by five-fold cross-validation, and the hyperparameters are tuned using a grid search algorithm to obtain the optimal combination of hyperparameters for each initial training model.
[0093] S240. Based on the optimal combination of hyperparameters, obtain the machine learning model; the machine learning model includes RF model, SVM model, KNN model and XGBoost model.
[0094] Step S300 of this embodiment of the invention discloses obtaining a BMA model based on a machine learning model, including the following steps:
[0095] S310. Obtain the prediction results for each machine learning model;
[0096] S320. Obtain the model weights based on the prediction results;
[0097] S330. Based on the model weights, obtain the BMA model.
[0098] As an optional implementation, the BMA (Bayesian Model Averaging) of this invention is an ensemble learning method used to fuse the prediction results of multiple models through a weighted average. The BMA model not only combines the predictions of different models but also quantifies the reliability of each model using Bayesian methods.
[0099] The steps include:
[0100] 1. Model Evaluation:
[0101] The prediction results of each machine learning model are evaluated, and metrics such as cross-validation, AUC, and mean squared error (MSE) are typically used to judge the predictive ability of each model.
[0102] Based on the evaluation results, the posterior probability of each model is calculated, which is the weight of each model.
[0103] 2. Model weighting:
[0104] The output of each machine learning model (e.g., precipitation prediction) is weighted and averaged according to its posterior probability.
[0105] The weighting process adjusts the weights based on the credibility of each model, with higher-accuracy models receiving higher weights.
[0106] 3. Bayesian inference:
[0107] The posterior probability of each model is calculated using Bayesian inference, and this probability is used to adjust the model's output. The Bayesian inference process effectively merges the prediction results of each model, ultimately yielding a weighted typhoon rainfall prediction.
[0108] Step S320 of this embodiment of the invention obtains model weights based on the prediction results, and the formula used includes:
[0109]
[0110] Among them, M j Let be the model prediction value of the j-th machine learning model; D = [y1, y2, ..., y N ] represents observation data; P(D|M j M is the predicted value of the given model. j Conditional probability of rainfall data; P(M j Let M be the prior probability of the j-th machine learning model; i P(M) represents the model prediction value of the i-th machine learning model. i P(M) represents the prior probability of the i-th machine learning model; i |D) represents the model's predicted value M i The posterior probability; P(M) j |D) represents the model's predicted value M j The posterior probability, w j For model weights, satisfying
[0111] The typhoon rainfall prediction method based on machine learning and BMA model disclosed in this invention further includes the following steps:
[0112] S500, Obtain rainfall observations;
[0113] S600, Obtain the predicted value of the BMA model;
[0114] S700. Based on observed and predicted rainfall values, evaluation data is obtained; the evaluation data includes the coefficient of determination, mean absolute error, and root mean square error.
[0115] The step S700 disclosed in this embodiment of the invention obtains evaluation data based on observed and predicted rainfall values, and the formula used includes:
[0116]
[0117] in, This is the i-th rainfall observation; This is the i-th predicted value; R is the average of the observed rainfall values. 2is the coefficient of determination; MAE is the mean absolute error; RMSE is the root mean square error.
[0118] As an optional implementation, this invention develops a robust BMA model for quantitatively predicting hourly typhoon rainfall in typhoon-affected areas during the 0-6 hour lead time. The specific steps are as follows:
[0119] Step 1: Selection of Feature Variables (Feature Information). First, a buffer zone with a radius of 400 kilometers is constructed based on the typhoon center as the typhoon's influence range. Then, three types of data (feature information) are collected within this range: typhoon features, grid spatial attributes, and meteorological features, as shown in Table 1. Typhoon features include parameters such as the location of the typhoon center (including the longitude and latitude of the typhoon center), wind speed (including the maximum sustained wind speed), air pressure (including the air pressure at the typhoon center), the movement speed of the typhoon center, and the movement direction of the typhoon center. In addition, the dynamic weighted typhoon features of each grid (including weighted typhoon wind speed, weighted typhoon center air pressure, and weighted typhoon movement speed) need to be calculated based on the distance of each grid from the typhoon center. The specific calculation methods are shown in Equations (1) and (2). Grid spatial attributes include the location of each grid (including grid latitude and grid longitude), elevation information, the distance of the grid from the typhoon center, and the orientation of the grid relative to the typhoon center. Meteorological features include variables such as rainfall, temperature, relative humidity, wind speed, and wind direction for each grid. The lag time for rainfall is selected using the autocorrelation coefficient, as shown in equation (3), with a threshold set to 0.5. All feature variables are processed using the Z-score standardization method, rescaling each variable to have zero mean and unit standard deviation, as shown in equation (4). Through standardization, variables with different dimensions can be compared under the same standard, avoiding the influence of data scale on model training.
[0120] ω i =1-d i / r (1)
[0121] Weighted_f i =f·ω i (2)
[0122]
[0123]
[0124] In the formula: d i ω represents the distance from grid i to the typhoon center (km); r is the buffer radius (400km); ω iis the dynamic weight of grid i; f represents the original typhoon characteristics of the typhoon center, including the maximum sustained wind speed (Typhoon_wind), typhoon center pressure (Typhoon_pressure), and typhoon center movement speed (Translation_speed) in Table 1; Weighted_f i R is the dynamically weighted typhoon characteristic of grid i; N is the total number of all observations in the time series; k is the lag time, ranging from k = 1, 2, ..., 24; t,i and R t-k,i Let be the rainfall at times t and tk, respectively, for grid i. and σ is the average rainfall at the corresponding time; X is the original data (feature information); μ is the mean of the variable; σ is the standard deviation of the variable.
[0125] Table 1. Model Inputs
[0126]
[0127] Variable description:
[0128] Typhoon_lon Longitude of the typhoon center
[0129] Latitude of the center of Typhoon_lat
[0130] Typhoon_wind Maximum sustained wind speed
[0131] Weighted typhoon wind speed
[0132] Typhoon pressure
[0133] Weighted typhoon pressure
[0134] Translation_speed: The speed at which the center of the typhoon moves.
[0135] Weighted translation speed (weighted typhoon movement speed)
[0136] Translation_direction: Direction of movement of the typhoon center
[0137] elevation grid elevation
[0138] distance from the center of the typhoon
[0139] grid_direction: The orientation of the grid relative to the center of the typhoon.
[0140] gird_lat grid latitude
[0141] grid_lon grid longitude
[0142] R t-4 ,R t-3 ,R t-2 ,R t-1 Rainfall variables with a lag time of t-4 to t-1
[0143] d2m 2m dew point temperature
[0144] t2m 2m temperature
[0145] SKT surface temperature
[0146] MSL (mean sea level pressure)
[0147] sp Surface air pressure
[0148] cbh cloud base altitude
[0149] relative humidity (rh)
[0150] u100 The u component of the 100m wind speed
[0151] v100 is the v component of the wind speed at 100m.
[0152] u10 The u component of the 10m wind speed
[0153] v10 The v component of the 10m wind speed
[0154] wind_direction_100m 100m composite wind direction
[0155] wind_direction_10m 10m composite wind direction
[0156] wind_speed_100m 100m composite wind speed
[0157] wind_speed_10m 10m composite wind speed
[0158] Step 2, Model Construction. Four machine learning models were selected and integrated into the BMA model: Random Forest (RF), Support Vector Machine (SVM), K-Nearest Neighbors (KNN), and XGBoost. During hyperparameter tuning, 5-fold cross-validation was used to optimize model performance, and a grid search algorithm was employed to explore different hyperparameter combinations for each model. Specific options are detailed in Table 2. Finally, the model with the highest R-value in the validation set was selected. 2 Scoring was used to select the optimal hyperparameter combination for each model. After obtaining the prediction results of the four machine learning models, the model weights were calculated using the Differential Evolution Adaptive Metropolis Markov Chain Monte Carlo (MCMC) MATLAB toolbox developed by Jasper A. Vrugt based on the Bayesian Model Averaging (BMA) method, as shown in Equation (5). The weight combinations obtained from 20 toolbox runs and one set of average weight combinations were used to calculate the R values. 2 The highest weighted combination W i =(w i,1 ,w i,2 ,w i,3 ,w i,4 The optimal weight combination of the four machine learning models is used to calculate the predicted value of the BMA model, as shown in equation (6).
[0159]
[0160]
[0161] Where: M j y1 is the predicted value of the j-th machine learning model; 4 is the number of machine learning models in this study; D = [y1, y2, ..., y3] N ] represents observation data; P(D|M j M is the predicted value of the given model. j The conditional probability of rainfall data, P(M j M represents the prior probability of the j-th model; i P(M) represents the model prediction value of the i-th machine learning model. i P(M) represents the prior probability of the i-th machine learning model; i |D) represents the model's predicted value M i The posterior probability; P(M) j |D) represents the model's predicted value M j The posterior probability, w j For model weights, satisfying pj (y|M j D) is the prediction of M given the model. j The posterior distribution of y for the observed data D. opt,j Let y be the predicted value of the j-th machine learning model, and p(y|D) be the predicted value of the BMA model.
[0162] Table 2. Hyperparameter options for RF, SVM, KNN, and XGBoost models
[0163]
[0164] Step 3, Result Evaluation. Evaluation is conducted based on three indicators: the coefficient of determination (R²). 2 The performance of the BMA model in this example is evaluated using mean absolute error (MAE) and root mean square error (RMSE), as shown in equations (7), (8) and (9).
[0165]
[0166]
[0167]
[0168] In the formula: and These are the observed and predicted values for the i-th rainfall event, respectively. This represents the average of the observed values.
[0169] As an optional implementation method, this embodiment of the invention takes Guangdong Province as the research area for application:
[0170] refer to Figure 2 This case study utilizes a grid data extraction method to construct a 400-kilometer radius buffer zone based on the typhoon center. The grid overlapping the buffer zone and the study area is identified as the typhoon's impact area and used as the target region for typhoon rainfall prediction. This study ultimately selected 28 typical typhoon events, as detailed below. Figure 3 As shown, 28 typhoon paths and 462 typhoon centers were extracted from 2020 to 2023, with the typhoon centers being obtained every 3 hours.
[0171] Compared to four individual machine learning models—RF, SVM, KNN, and XGBoost—the BMA model, which applies the method proposed in this example, is the most robust method for typhoon rainfall forecasting. By optimizing and weighting the prediction results of multiple models, BMA effectively utilizes the strengths of each model while minimizing the risk of overfitting. Individual models often ignore structural uncertainties, while BMA explicitly quantifies these uncertainties, resulting in more reliable and trustworthy predictions. The evaluation results of the BMA model and the four machine learning models are shown in Tables 3, 4, and 5.
[0172] Table 3. R² of the BMA model and four machine learning models
[0173] Forecast horizon (h) 0 1 2 3 4 5 6 BMA 0.90 0.84 0.82 0.82 0.82 0.81 0.81 RF 0.86 0.75 0.75 0.76 0.77 0.76 0.77 SVM 0.87 0.82 0.79 0.79 0.78 0.77 0.77 KNN 0.86 0.78 0.76 0.75 0.75 0.74 0.74 XGBoost 0.88 0.81 0.81 0.80 0.81 0.80 0.81
[0174] Table 4. MAE of BMA model and four machine learning models
[0175] Forecast horizon (h) 0 1 2 3 4 5 6 BMA 0.30 0.38 0.40 0.40 0.43 0.43 0.42 RF 0.36 0.51 0.52 0.52 0.50 0.50 0.49 SVM 0.31 0.39 0.41 0.42 0.42 0.44 0.44 KNN 0.36 0.43 0.45 0.46 0.47 0.49 0.48 XGBoost 0.34 0.43 0.45 0.45 0.46 0.46 0.46
[0176] Table 5. RMSE of the BMA model and four machine learning models
[0177] Forecast horizon (h) 0 1 2 3 4 5 6 BMA 0.61 0.76 0.80 0.81 0.81 0.83 0.83 RF 0.70 0.94 0.96 0.94 0.92 0.94 0.92 SVM 0.68 0.81 0.86 0.88 0.89 0.93 0.91 KNN 0.71 0.88 0.93 0.95 0.95 0.99 0.97 XGBoost 0.65 0.81 0.84 0.84 0.83 0.85 0.84
[0178] Key points of this invention:
[0179] (1) Selection of model feature variables: This invention constructs a buffer zone with a radius of 400 kilometers based on the typhoon center as the typhoon's influence range, comprehensively considering three types of features within the typhoon's influence range: typhoon features, grid spatial attributes, and meteorological features. Specifically, the dynamic weight of each grid is calculated based on the distance between each grid in the study area and the typhoon center, and the dynamically weighted typhoon features are further calculated; the lag time of the rainfall variable is calculated and selected based on the autocorrelation coefficient; before the model runs, all variables are rescaled using the Z-score standardization method.
[0180] (2) BMA Model Construction Method: This invention selects four machine learning models (RF, SVM, KNN, and XGBoost) to integrate into the BMA model. Hyperparameter tuning is performed through 5-fold cross-validation and grid search algorithm to optimize the performance of individual machine learning models. The BMA model prediction value is calculated by weighting the Bayesian model average method to obtain a more robust and accurate typhoon rainfall prediction with a lead time of 0-6 hours.
[0181] Advantages of this invention:
[0182] (1) Key Contribution of Dynamically Weighted Typhoon Features: Typhoon features play a crucial role in typhoon rainfall forecasting. Among them, dynamically weighted typhoon wind speed contributes the most to rainfall forecasting, reflecting the close correlation between wind intensity and rainfall in each grid within the typhoon-affected area. The dynamic weighting method can effectively capture and describe the patterns of wind speed changes within the typhoon-affected area, thereby significantly improving the accuracy and interpretability of typhoon rainfall forecasting. Compared with traditional methods, this invention further optimizes forecast accuracy and improves the consistency and reliability of results by considering the spatial variation of typhoon intensity.
[0183] (2) Advantages of the BMA model in typhoon rainfall forecasting: This invention introduces the Bayesian Model Averaging (BMA) method, which quantifies the predictive uncertainty of multiple machine learning models by assigning weights to them, thereby effectively integrating the advantages of different models. Compared with the traditional single optimal model, BMA not only significantly reduces the overall prediction error but also reduces conventional and extreme prediction errors, improving the robustness of the prediction results. The application of BMA makes typhoon rainfall forecasting more stable, effectively copes with model uncertainties and complex meteorological conditions, and improves the reliability of forecasts.
[0184] On the other hand, embodiments of the present invention also provide a typhoon rainfall prediction system based on machine learning and BMA models, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the typhoon rainfall prediction method based on machine learning and BMA models as described above.
[0185] The processor and memory can be connected via a bus or other means. Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, which can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0186] On the other hand, embodiments of the present invention also provide a computer-readable storage medium storing computer-executable instructions for causing a computer to perform the typhoon rainfall prediction method based on machine learning and BMA models as described above.
[0187] It will be understood by those skilled in the art that all or some of the steps and systems in the methods disclosed above can be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, as is known to those skilled in the art, communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.
[0188] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.
Claims
1. A typhoon rainfall prediction method based on machine learning and BMA model, characterized in that, The typhoon rainfall prediction method based on machine learning and BMA models includes the following steps: Acquire feature information; the feature information includes typhoon features, grid spatial attributes, and meteorological features; Based on the feature information, a machine learning model is obtained; the machine learning model includes RF model, SVM model, KNN model and XGBoost model; Based on the machine learning model, obtain the BMA model; Based on the BMA model, typhoon rainfall forecast data was obtained; The acquisition of feature information includes the following steps: Obtain typhoon center data; Based on the typhoon center data, a buffer is constructed using a grid data extraction method; Based on the buffer, feature information is obtained; the feature information includes typhoon features, grid spatial attributes, and meteorological features; The typhoon characteristics include the longitude of the typhoon center, the latitude of the typhoon center, the maximum sustained wind speed, the weighted typhoon wind speed, the typhoon center pressure, the weighted typhoon center speed, the typhoon center's moving speed, the weighted typhoon's moving speed, and the typhoon center's moving direction; the weighted typhoon wind speed, the weighted typhoon center pressure, and the weighted typhoon moving speed are the dynamic weighted typhoon characteristics in the typhoon characteristics; the maximum sustained wind speed, the typhoon center pressure, and the typhoon center's moving speed are the original typhoon characteristics of the typhoon center in the typhoon characteristics. The grid spatial attributes include the grid latitude, grid longitude, elevation information, grid distance from the typhoon center, and grid orientation relative to the typhoon center for each grid. The meteorological features include rainfall, temperature, relative humidity, wind speed, and wind direction for each grid. The lag time of the rainfall was selected using the autocorrelation coefficient; The formulas used to calculate the dynamically weighted typhoon characteristics in each grid include: ; ; in, For natural numbers: For the first The distance of each grid from the center of the typhoon; r The radius of the buffer zone; For the first Dynamic weights of each grid; This indicates the original typhoon characteristics; It is the first The dynamic weighted typhoon characteristics of each grid.
2. The typhoon rainfall prediction method based on machine learning and BMA model according to claim 1, characterized in that, The lag time of the rainfall was selected using the autocorrelation coefficient, and the formula used included: ; in, N This represents the total number of all observations in the time series. t For the first moment, tk For the second moment; The rainfall amount for the grid at the first moment; The rainfall at the second time point is the amount recorded on the grid. The average rainfall of the grid at the first moment; The average rainfall of the grid at the second time point; k It is an integer, 1 ≤ k ≤ 24; This refers to the lag time of rainfall.
3. The typhoon rainfall prediction method based on machine learning and BMA model according to claim 1, characterized in that, The step of obtaining a machine learning model based on the feature information includes the following steps: The feature information is processed using the Z-score standardization method, and each feature information is rescaled so that all feature information has zero mean and unit standard deviation, thus obtaining model training data; Based on the model training data, an initial training model is trained; the initial training model includes an initial RF model, an initial SVM model, an initial KNN model, and an initial XGBoost model; The performance of each of the initial training models was evaluated by five-fold cross-validation, and the hyperparameters were tuned using a grid search algorithm to obtain the optimal combination of hyperparameters for each of the initial training models. Based on the optimal combination of hyperparameters, a machine learning model is obtained; the machine learning model includes the RF model, SVM model, KNN model, and XGBoost model.
4. The typhoon rainfall prediction method based on machine learning and BMA model according to claim 1, characterized in that, The step of obtaining the BMA model based on the machine learning model includes the following steps: Obtain the prediction results for each of the machine learning models; Based on the prediction results, obtain the model weights; Based on the model weights, the BMA model is obtained.
5. The typhoon rainfall prediction method based on machine learning and BMA model according to claim 4, characterized in that, The formula used to obtain the model weights based on the prediction results includes: ; in, For the first j The model prediction values of the machine learning model; Represents observation data; For a given model prediction value The conditional probability of rainfall data; For the first j The prior probabilities of the machine learning models described above; For the first i The model prediction values of the machine learning model; For the first i The prior probabilities of the machine learning models described above; For model predictions The posterior probability; For model predictions The posterior probability, For model weights, satisfying .
6. The typhoon rainfall prediction method based on machine learning and BMA model according to claim 1, characterized in that, The method further includes the following steps: Obtain rainfall observations; Obtain the predicted values from the BMA model; Based on the observed rainfall values and the predicted values, evaluation data is obtained; the evaluation data includes the coefficient of determination, mean absolute error, and root mean square error.
7. The typhoon rainfall prediction method based on machine learning and BMA model according to claim 6, characterized in that, The formula used to obtain the evaluation data based on the observed rainfall values and the predicted values includes: ; ; ; in, For the first i One rainfall observation value; For the first i One predicted value; This is the average of the observed rainfall values; The coefficient of determination; Mean absolute error; This is the root mean square error.
8. A typhoon rainfall prediction system based on machine learning and BMA models, characterized in that, The method includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the typhoon rainfall prediction method based on machine learning and BMA model as described in any one of claims 1 to 7.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions for causing a computer to perform the typhoon rainfall prediction method based on machine learning and BMA model as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Typhoon vortex initialization method and system
CN119740406A
Weather forecast learning system based on artificial intelligence algorithm
CN120178381A