Rainfall prediction method and device, server and storage medium
By traversing the combination of hyperparameters and input features, training and verifying the LSTM model, selecting the optimal score and error model, the problem of low rainfall prediction accuracy caused by improper parameter setting of LSTM model is solved, and higher rainfall prediction accuracy and stability are achieved.
Patent Information
- Application Number
- CN202510884838.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-30
- Publication Date
- 2025-08-01
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Improper setting of existing LSTM models results in low accuracy in rainfall prediction results.
By traversing all possible combinations of hyperparameters and input features, multiple candidate models are trained, and the optimal scoring model and optimal error model are selected through test data verification, and the rainfall prediction data is comprehensively determined.
It improves the accuracy and timeliness of rainfall prediction, and ensures the stability and prediction accuracy of the model.
Smart Images

Figure CN120408204A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of rainfall prediction, and particularly to a rainfall prediction method, device, server and storage medium. Background Art
[0002] Most meteorological data has strong temporal correlation, and the Long Short-Term Memory (LSTM) model has a unique design structure and is suitable for processing time series data. Therefore, the LSTM model is widely used in the field of meteorological prediction. In related technologies, the performance of the LSTM model highly depends on the setting of model parameters. If the model parameters are not properly set, the accuracy of the prediction results output by the model may be low. Summary of the Invention
[0003] In view of the above problems, embodiments of the present invention provide a rainfall prediction method, device, server and storage medium to solve the problem that if the LSTM model parameters are not properly set in the prior art, the accuracy of the prediction results output by the model may be low.
[0004] In a first aspect, an embodiment of the present invention provides a rainfall prediction method, and the method includes: Traverse all possible input combinations based on a hyperparameter value set and an input feature value set; the input combinations include hyperparameters and at least two input features; Train a plurality of candidate models based on different input combinations; Verify each candidate model through test data, and select an optimal scoring model and an optimal error model from the plurality of candidate models; Determine rainfall prediction data according to the outputs of the optimal scoring model and the optimal error model.
[0005] In a possible implementation manner, the input feature value set includes basic data and enhanced data. Before traversing all possible input combinations based on the hyperparameter value set and the input feature value set, it further includes: Slide a sliding window on the time series data composed of the basic data; Perform feature calculation on the basic data during the sliding process to obtain enhanced data.
[0006] In a possible implementation manner, the basic data includes elevation, time, precipitable water vapor (PWV), temperature, humidity, air pressure, water vapor pressure, wet refractive index, and hourly rainfall, and the enhanced data includes sliding anomaly value, change amount, sliding average value, sliding maximum value, and sliding minimum value.
[0007] In a possible implementation, the candidate model is a long short-term memory (LSTM) model, and the hyperparameters include a sliding window size, the number of layers of the LSTM model, the number of neurons in each layer, a regularization method, a random initial weight, and an input step size.
[0008] In a possible implementation, validating each candidate model with test data and selecting an optimal scoring model and an optimal error model from the multiple candidate models includes: Calculating a threat score of the candidate model according to the number of times of predicted rainfall but actual non-rainfall, the number of times of predicted non-rainfall but actual rainfall, and the number of times of predicted rainfall and actual rainfall. Determining the candidate model with the maximum threat score as the optimal scoring model.
[0009] In a possible implementation, validating each candidate model with test data and selecting an optimal scoring model and an optimal error model from the multiple candidate models includes: Judging whether the predicted data output by the candidate model is less than a preset threshold. If it is judged that the predicted data is less than the preset threshold, regarding the predicted data as invalid predicted data. If it is judged that the predicted data is greater than the preset threshold, regarding the predicted data as valid predicted data. Calculating the mean error of the candidate model according to the error between the real data and the valid predicted data. Determining the candidate model with the minimum mean error as the optimal error model.
[0010] In a second aspect, an embodiment of the present invention provides a rainfall prediction device, and the device includes: A traversing module, configured to traverse all possible input combinations based on a hyperparameter value set and an input feature value set; the input combinations include hyperparameters and at least two input features. A training module, configured to train multiple candidate models based on different input combinations. A selecting module, configured to validate each candidate model with a test data set and select an optimal scoring model and an optimal error model from the multiple candidate models. A determining module, configured to determine rainfall prediction data according to the outputs of the optimal scoring model and the optimal error model.
[0011] In a possible implementation, the input feature value set includes basic data and enhanced data, and the device further includes: A calculation module is configured to slide a time series data composed of the basic data through a sliding window; and calculate features of the basic data during the sliding process to obtain enhanced data.
[0012] In a third aspect, an embodiment of the present invention provides a server, which includes one or more processors; a memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more computer programs include instructions that, when executed by the server, cause the server to execute the rainfall prediction method as described in the first aspect or any possible implementation manner of the first aspect.
[0013] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, which includes a stored program, wherein when the program runs, it controls a device where the computer-readable storage medium is located to execute the rainfall prediction method as described in the first aspect or any possible implementation manner of the first aspect.
[0014] In the technical solution provided by the embodiment of the present invention, the optimal scoring model and the optimal error model are selected from multiple candidate models trained, ensuring the stability and prediction accuracy of the model. At the same time, the rainfall prediction data is comprehensively determined according to the optimal scoring model and the optimal error model, further improving the accuracy and timeliness of the rainfall prediction data. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 It is a flowchart of a rainfall prediction method provided by an embodiment of the present invention.
[0016] Figure 2 It is a schematic structural diagram of a rainfall prediction device provided by an embodiment of the present invention.
[0017] Figure 3 It is a schematic diagram of a server provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0018] To make the objectives, technical solutions and advantages of the present invention clearer and more understandable, the present invention will be further described below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of them. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0019] Figure 1 It is a flowchart of a rainfall prediction method provided by an embodiment of the present invention. As Figure 1 shown, the method includes: Step 101: Based on the hyperparameter value set and the input feature value set, traverse all possible input combinations.
[0020] In this step, the input combinations include hyperparameters and at least two input features. The hyperparameter value set includes the value sets of multiple hyperparameters, with each hyperparameter corresponding to a value set. A hyperparameter refers to a parameter that needs to be manually set before model training. Hyperparameters include the sliding window size, the number of layers of the LSTM model, the number of neurons in each layer, the regularization method, the random initial weight, and the input step size. Among them, the value set corresponding to the sliding window size is [3, 5, 7, 9], the value set corresponding to the number of layers of the LSTM model is [3, 5, 7, 9], and the value set corresponding to the number of neurons in each layer is [30, 50, 70, 100]. The value set corresponding to the input step size is [3, 4, 5, 6]. When the input step size is 3 and the output step size is 1, it indicates that the model predicts the rainfall data for the next hour based on the data of the past three hours.
[0021] In the embodiments of the present invention, the number of layers of the LSTM model and the number of neurons in each layer are two important hyperparameters that affect the model performance. When the number of layers of the LSTM model is small and the number of neurons in each layer is small, the model has a faster calculation speed, a shorter training time, a lower model complexity, a poorer generalization ability, and a poorer processing effect for complex data. When the number of layers of the LSTM is large and the number of neurons in each layer is large, the model has a slower calculation speed, a longer training time, a higher model complexity, a better generalization ability, and a better processing effect for complex data. When the number of layers of the LSTM is large and the number of neurons in each layer is large, it may lead to model overfitting, and the risk of model overfitting can be reduced by combining the regularization method.
[0022] Specifically, the regularization method reduces the risk of model overfitting and improves the generalization ability of the model by restricting the model complexity. The value set corresponding to the regularization method is [nan, L2, dropout, dropout&L2]. nan indicates not using regularization, L2 indicates implementing regularization through the L2 method, dropout indicates implementing regularization through the dropout method, and dropout&L2 indicates implementing regularization through the cooperation of the dropout method and the L2 method.
[0023] In the embodiments of the present invention, the value set corresponding to the random initial weights includes a variety of different initial weights. For example, the value set includes 40 different initial weights. During the model training process, if the same initial weight is assigned to neurons, it will cause the update method of each neuron to be the same, resulting in the neurons being unable to learn different features and affecting the learning ability of the model. Based on this, the embodiments of the present invention randomly assign different initial weights to each neuron, making different neurons have differences at the initial stage of model training, which is beneficial to model convergence. In addition, in practical applications, the number of initial weights and the values of the initial weights in the value set can be set based on the model training requirements, and the embodiments of the present invention do not limit this.
[0024] In the embodiments of the present invention, the input feature value set includes basic data and enhanced data. The basic data includes elevation, time, precipitable water vapor (PWV), temperature, humidity, air pressure, water vapor pressure, wet refractive index, and hourly rainfall. The enhanced data includes moving anomaly values, change amounts, moving average values, moving maximum values, and moving minimum values. Among the foregoing nine basic data, each basic data corresponds to five enhanced data, namely, moving anomaly values, change amounts, moving average values, moving maximum values, and moving minimum values. That is to say, the input feature value set includes nine basic data and five enhanced data corresponding to each basic data, for a total of 54 input features. That is to say, when at least two input features are selected from the input feature value set, there are kinds of input feature combinations.
[0025] In the embodiments of the present invention, before step 101, it further includes: sliding a sliding window over the time series data composed of the basic data; and performing feature calculation on the basic data during the sliding process to obtain enhanced data. The time series data is data arranged in chronological order, and there are often long-term dependence relationships in the time series data. The LSTM model is good at capturing the long-term dependence relationships in the time series data and solves the problems of gradient disappearance or gradient explosion that are prone to occur in traditional recurrent neural networks (RNNs) when processing long sequence data.
[0026] Table 1 shows the basic data for each hour during the period from 1:00 to 6:00. The basic data includes elevation, time, PWV (mm), temperature (°C), humidity (%), air pressure (hPa), water vapor pressure, wet refractive index, and hourly rainfall (mm). Among them, the precipitable water, also known as the atmospheric precipitable water, refers to the total amount of water vapor in the atmospheric column with a unit cross-sectional area from the ground to the top of the atmosphere. If all the water vapor condenses and falls to the ground, the resulting precipitation amount can be obtained. The precipitable water is observed by the Continuously Operating Reference Station (CORS) system.
[0027] Table 1 Time Elevation PWV Temperature Humidity Air pressure Vapor pressure Wet refractivity Hourly rainfall 1:00 87.48 49.76 30.38 61.04 99130 26.49 114.25 0 2:00 87.48 49.73 31.44 59.42 99170 27.39 117.34 8.39 3:00 87.48 49.67 30.09 63.14 99180 26.95 116.45 4.61 4:00 87.48 49.79 31.01 61.52 99200 27.68 118.88 0 5:00 87.48 49.43 31.46 60.09 99180 27.73 118.78 0 6:00 87.48 48.94 31.76 57.78 99190 27.13 115.95 0 Taking the PWV shown in Table 1 as an example for feature calculation, enhanced data is obtained. The time series data composed of PWV is [49.76, 49.73, 49.67, 49.79, 49.43, 48.94]. For example, the window size of the sliding window is 3, that is, the sliding window includes three data. When there are less than three data in the sliding window, zeros are filled. During the sliding process, the sliding window slides from left to right, and each time it slides one data to the right. When the sliding window slides on the time series data composed of PWV, 6 subsequences will be generated, namely the first subsequence [0, 0, 49.76], the second subsequence [0, 49.76, 49.73], the third subsequence [49.76, 49.73, 49.67], the fourth subsequence [49.73, 49.67, 49.79], the fifth subsequence [49.67, 49.79, 49.43], and the sixth subsequence [49.79, 49.43, 48.94].
[0028] Table 2 shows the enhanced data corresponding to PWV. The enhanced data includes the sliding anomaly value, the change amount, the sliding average value, the sliding maximum value, and the sliding minimum value. Among them, the sliding anomaly value is the difference between the current moment value and the sliding average value, the change amount is the difference between the current moment value and the previous moment value, the sliding average value is the average value of the data in the sliding window, the sliding maximum value is the maximum value of the data in the sliding window, and the sliding minimum value is the minimum value of the data in the sliding window. The current moment value is the last data in the current subsequence, and the previous moment value is the last data in the previous subsequence. For example, if the current subsequence is the third subsequence, the current moment value is 49.67, and the previous subsequence is the second subsequence, the previous moment value is 49.73.
[0029] Table 2 Time PWV Moving anomaly value Change amount Moving average value Moving maximum value Moving minimum value 1 49.76 49.76 49.76 49.76 49.76 49.76 2 49.73 49.73 -0.03 49.73 49.76 49.73 3 49.67 -0.05 -0.06 49.72 49.76 49.67 4 49.79 0.06 0.12 49.73 49.79 49.67 5 49.43 -0.20 -0.36 49.63 49.79 49.43 6 48.94 -0.44 -0.49 49.38 49.79 48.94 Step 102: Based on different input combinations, multiple candidate models are trained.
[0030] In this step, the candidate model is an LSTM model. The LSTM model is a classic RNN cell used to process sequential data and capture long-term dependencies. The LSTM cell effectively solves problems such as the vanishing gradient or exploding gradient that traditional RNN cells are prone to when dealing with long sequences by introducing a gating mechanism to control the flow of information. A standard LSTM cell includes an input gate, a forget gate, an output gate, a cell state, and a hidden state. Among them, the cell state is the core of the LSTM cell and is used to store long-term information. The input gate determines which new information is written into the cell state, the forget gate determines which information is discarded from the cell state, and the output gate determines which information in the cell state will be output. That is to say, the cell state is updated through the input gate and the forget gate and outputs information through the output gate.
[0031] Specifically, one parameter value is selected from the value sets corresponding to each hyperparameter, and the model training architecture is determined according to the parameter values; at least two input features are selected from the input feature value set as the training data of the model, and training is performed based on the model training architecture to obtain a candidate model. For example, the sliding window size is 3, the number of layers of the LSTM model is 5, the number of neurons in each layer is 50, the regularization method is L2 regularization, and the input step size is 3, which serves as the model training architecture. For example, when the input features selected from the input feature value set are PWV and temperature, then PWV and temperature are used as the training data of the model, and training is performed based on this model training architecture to obtain the first candidate model; when the selected input features are PWV, temperature, and humidity, then PWV, temperature, and humidity are used as the training data of the model, and training is performed based on this model training architecture to obtain the second candidate model, and so on, until training is performed based on this model training architecture with all possible combinations of input features as the training data to obtain multiple candidate models. Based on the next model training architecture, training is performed with all possible combinations of input features as the training data to obtain multiple candidate models. And so on, until all possible input combinations are traversed to train multiple candidate models.
[0032] Step 103: Verify each candidate model with test data, and select the optimal scoring model and the optimal error model from multiple candidate models.
[0033] In the embodiment of the present invention, according to the number of times of predicted rainfall but actual no rainfall, the number of times of predicted no rainfall but actual rainfall, and the number of times of predicted rainfall and actual rainfall, the threat score of the candidate model is calculated; the candidate model with the maximum threat score is determined as the optimal scoring model.
[0034] The calculation formula for the threat score is as follows:
[0035] Among them, TS represents the threat score, TD represents the number of times of actual rainfall in the predicted rainfall, TC represents the number of times of actual rainfall in the predicted non-rainfall, and TB represents the number of times of non-rainfall in the predicted rainfall.
[0036] It can be understood that the threat score can reflect the proportion of the number of times of actual rainfall in the predicted rainfall in the total number of predicted times. A larger threat score of the model indicates that the first predicted data output by the optimal score model can more accurately predict whether it will rain in the short term in the future, effectively reducing false detections and missed detections, thereby improving the accuracy of rainfall prediction.
[0037] In the embodiments of the present invention, affected by model errors or data noise, the predicted data output by the candidate model may include some invalid predicted data with extremely small values. By presetting a threshold to filter out the invalid predicted data, the influence of noise on the model performance can be reduced, and the prediction performance of the model can be improved. For example, the preset threshold is 0.5 mm, and the specific value of the preset threshold can be set based on actual needs, and the embodiments of the present invention do not limit this.
[0038] Specifically, it is determined whether the predicted data output by the candidate model is less than the preset threshold; if it is determined that the predicted data is less than the preset threshold, the predicted data is regarded as invalid predicted data; if it is determined that the predicted data is greater than the preset threshold, the predicted data is regarded as valid predicted data; the mean error of the candidate model is calculated according to the error between the true data and the valid predicted data; the candidate model with the smallest mean error is determined as the optimal error model.
[0039] It can be understood that the mean error can reflect the difference between the valid predicted data and the true data. A smaller mean error of the model indicates that the error between the second predicted data output by the optimal error model and the true data is generally small. The optimal error model has a higher prediction accuracy and can output more accurate predicted data closer to the true data, thereby improving the accuracy of the rainfall prediction data.
[0040] Step 104: Determine the rainfall prediction data according to the outputs of the optimal score model and the optimal error model.
[0041] In this step, the average value of the first predicted data output by the optimal score model and the second predicted data output by the optimal error model is used as the rainfall prediction data. The rainfall prediction data is the predicted rainfall data in the short term in the future. How long the rainfall prediction data can predict the rainfall in the future depends on the size of the model output step. For example, when the output step is 1, the rainfall prediction data is the predicted rainfall data within the next hour.
[0042] In the embodiment of the present invention, rainfall prediction data is determined through an optimal scoring model and an optimal error model, which can combine the advantages of the two models. While accurately predicting whether it will rain, it can also output rainfall prediction data with a small error, thereby comprehensively improving the accuracy and reliability of the rainfall prediction data.
[0043] In the technical solution provided by the embodiment of the present invention, the optimal scoring model and the optimal error model are selected from multiple trained candidate models, ensuring the stability and prediction accuracy of the models. At the same time, the rainfall prediction data is comprehensively determined according to the optimal scoring model and the optimal error model, further improving the accuracy and timeliness of the rainfall prediction data.
[0044] Figure 2 is a structural schematic diagram of a rainfall prediction device provided by an embodiment of the present invention, as Figure 2 shown, the device includes a traversal module 11, a training module 12, a selection module 13, and a determination module 14. The traversal module 11 is used to traverse all possible input combinations based on a hyperparameter value set and an input feature value set; the input combinations include hyperparameters and at least two input features; the training module 12 is used to train multiple candidate models based on different input combinations; the selection module 13 is used to verify each candidate model through a test data set and select the optimal scoring model and the optimal error model from multiple candidate models; the determination module 14 is used to determine the rainfall prediction data according to the outputs of the optimal scoring model and the optimal error model.
[0045] In the embodiment of the present invention, the input feature value set includes basic data and enhanced data. The device further includes a calculation module 15, which is used to slide a sliding window on the time series data composed of the basic data; during the sliding process, feature calculation is performed on the basic data to obtain enhanced data.
[0046] In the embodiment of the present invention, the selection module 13 is specifically used to calculate the threat score of the candidate model according to the number of times of predicting rainfall but actually no rainfall, the number of times of predicting no rainfall but actually rainfall, and the number of times of predicting rainfall and actually rainfall; and determine the candidate model with the maximum threat score as the optimal scoring model.
[0047] In the embodiment of the present invention, the selection module 13 is specifically used to determine whether the prediction data output by the candidate model is less than a preset threshold; if it is determined that the prediction data is less than the preset threshold, the prediction data is regarded as invalid prediction data; if it is determined that the prediction data is greater than the preset threshold, the prediction data is regarded as valid prediction data; calculate the mean error of the candidate model according to the error between the real data and the valid prediction data; and determine the candidate model with the minimum mean error as the optimal error model.
[0048] In the technical solution provided by the embodiment of the present invention, the optimal scoring model and the optimal error model are selected from multiple candidate models during training, ensuring the stability and prediction accuracy of the model. At the same time, the rainfall prediction data is comprehensively determined according to the optimal scoring model and the optimal error model, further improving the accuracy and timeliness of the rainfall prediction data.
[0049] Figure 3 It is a schematic diagram of a server provided by an embodiment of the present invention. As Figure 3 shown, the server 3 of this embodiment includes: a processor 301, a memory 302, and a computer program 303 stored in the memory 302 and operable on the processor 301. When the processor 301 executes the computer program 303, the steps in the above-mentioned method embodiments are implemented. Alternatively, when the processor 301 executes the computer program 303, the functions of each module / unit in the above-mentioned device embodiments are implemented.
[0050] The server 3 can be an electronic device such as a desktop computer, a notebook, a palm computer, and a cloud server. The server 3 may include, but is not limited to, the processor 301 and the memory 302. Those skilled in the art can understand that Figure 3 this is only an example of the server 3 and does not constitute a limitation on the server 3. It may include more or fewer components than shown in the figure, or different components.
[0051] The processor 301 may be a central processing unit (Central Processing Unit, abbreviated as CPU), or other general-purpose processors, digital signal processors (Digital Signal Processor, abbreviated as DSP), application specific integrated circuits (Application Specific Integrated Circuit, abbreviated as ASIC), field programmable gate arrays (Field-Programmable Gate Array, abbreviated as FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0052] The memory 302 may be an internal storage unit of the server 3. For example, the hard disk or memory of the server 3. The memory 302 may also be an external storage device of the server 3. For example, a plug-in hard disk equipped on the server 3, a smart media card (SmartMedia Card, abbreviated as SMC), a secure digital (Secure Digital, abbreviated as SD) card, a flash card (FlashCard), etc. The memory 302 may also include both the internal storage unit and the external storage device of the server 3. The memory 302 is used to store computer programs and other programs and data required by the electronic device.
[0053] Those skilled in the art can clearly understand that, for the convenience and conciseness of description, only the above division of each functional unit and module is used as an example. In actual applications, the above functions can be allocated to different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiments can be integrated into a processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
[0054] An embodiment of the present invention provides a computer-readable storage medium. The computer-readable storage medium includes a stored program. When the program runs, it controls the device where the computer-readable storage medium is located to execute the steps of the embodiments of the above rainfall prediction method. For specific descriptions, reference can be made to the embodiments of the above rainfall prediction method.
[0055] As described above, only the preferred specific embodiments of the present invention are given, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by those skilled in the art within the technical scope disclosed by the present invention should be covered by the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.
Claims
1. A rainfall prediction method, characterized in that, The method includes: Based on the hyperparameter value set and the input feature value set, traverse all possible input combinations; the input combinations include hyperparameters and at least two input features; Based on different input combinations, train multiple candidate models; Verify each candidate model through test data, and select the optimal scoring model and the optimal error model from the multiple candidate models; Determine rainfall prediction data according to the outputs of the optimal scoring model and the optimal error model.
2. The method according to claim 1, characterized in that The input feature value set includes basic data and enhanced data. Before traversing all possible input combinations based on the hyperparameter value set and the input feature value set, it further includes: Slide a sliding window over the time series data composed of the basic data; During the sliding process, perform feature calculation on the basic data to obtain enhanced data.
3. The method according to claim 2, wherein The basic data includes elevation, time, precipitable water vapor PWV, temperature, humidity, air pressure, water vapor pressure, wet refractive index, and hourly rainfall. The enhanced data includes sliding anomaly values, change amounts, sliding average values, sliding maximum values, and sliding minimum values.
4. The method according to claim 1, wherein The candidate model is a long short-term memory network LSTM model, and the hyperparameters include the sliding window size, the number of layers of the LSTM model, the number of neurons in each layer, the regularization method, the random initial weight, and the input step size.
5. The method according to claim 1, characterized in that, The step of verifying each candidate model through test data and selecting the optimal scoring model and the optimal error model from the multiple candidate models includes: Calculate the threat score of the candidate model according to the number of times of predicted rainfall but actual no rainfall, the number of times of predicted no rainfall but actual rainfall, and the number of times of predicted rainfall and actual rainfall; Determine the candidate model with the maximum threat score as the optimal scoring model.
6. The method according to claim 1, characterized in that, The step of verifying each candidate model through test data and selecting the optimal scoring model and the optimal error model from the multiple candidate models includes: Judge whether the predicted data output by the candidate model is less than a preset threshold; If it is judged that the predicted data is less than the preset threshold, then regard the predicted data as invalid predicted data; If it is judged that the predicted data is greater than the preset threshold, then regard the predicted data as valid predicted data; Calculate the mean error of the candidate model according to the error between the real data and the valid predicted data; Determine the candidate model with the minimum mean error as the optimal error model.
7. A rainfall prediction device, characterized in that, The device includes: A traversal module for traversing all possible input combinations based on the hyperparameter value set and the input feature value set; the input combinations include hyperparameters and at least two input features; A training module for training multiple candidate models based on different input combinations; A selection module for verifying each candidate model through a test data set and selecting the optimal scoring model and the optimal error model from the multiple candidate models; A determination module for determining rainfall prediction data according to the outputs of the optimal scoring model and the optimal error model.
8. The device according to claim 7, characterized in that, The input feature value set includes basic data and enhanced data, and the device further includes: A calculation module, configured to slide on the time series data composed of the basic data through a sliding window; and calculate features of the basic data during the sliding process to obtain enhanced data.
9. A server, characterized in that, The server includes one or more processors; a memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more computer programs include instructions that, when executed by the server, cause the server to execute the rainfall prediction method according to any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein, when the program runs, it controls the device where the computer-readable storage medium is located to execute the rainfall prediction method according to any one of claims 1-6.
Citation Information
Patent Citations
Time sequence prediction method based on time convolution and LSTM
CN108764460A
Model parameter processing method and device, equipment and computer storage medium
CN109800884A
Precipitation prediction method and device based on multi-LSTM model fusion
CN109991685A
Hyper-parameter optimization method and device, computer equipment and storage medium
CN111105040A
Load prediction method and device based on heuristic configuration and storage medium
CN115907158A