CN118312775A - Salt tide prediction method based on LSTM-GRU-CNN integrated model - Google Patents
Salt tide prediction method based on LSTM-GRU-CNN integrated model Download PDFInfo
- Publication number
- CN118312775A CN118312775A CN202410386389.1A CN202410386389A CN118312775A CN 118312775 A CN118312775 A CN 118312775A CN 202410386389 A CN202410386389 A CN 202410386389A CN 118312775 A CN118312775 A CN 118312775A
- Authority
- CN
- China
- Prior art keywords
- model
- data
- gru
- lstm
- training
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 47
- 150000003839 salts Chemical class 0.000 title claims abstract description 31
- 238000012549 training Methods 0.000 claims abstract description 61
- 238000012360 testing method Methods 0.000 claims abstract description 30
- 238000011156 evaluation Methods 0.000 claims abstract description 22
- 230000008569 process Effects 0.000 claims abstract description 13
- 238000007781 pre-processing Methods 0.000 claims abstract description 12
- 230000006870 function Effects 0.000 claims description 32
- 238000005259 measurement Methods 0.000 claims description 20
- 238000004364 calculation method Methods 0.000 claims description 16
- 238000010606 normalization Methods 0.000 claims description 11
- 238000011160 research Methods 0.000 claims description 9
- 238000004458 analytical method Methods 0.000 claims description 7
- 238000012797 qualification Methods 0.000 claims description 7
- 230000008859 change Effects 0.000 claims description 4
- 238000006243 chemical reaction Methods 0.000 claims description 4
- 230000003213 activating effect Effects 0.000 claims description 3
- 230000000295 complement effect Effects 0.000 claims description 3
- 238000000605 extraction Methods 0.000 claims description 3
- 238000011144 upstream manufacturing Methods 0.000 claims description 3
- 230000010354 integration Effects 0.000 claims 1
- 238000004088 simulation Methods 0.000 abstract description 5
- 230000000694 effects Effects 0.000 description 5
- 238000013136 deep learning model Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 230000018109 developmental process Effects 0.000 description 2
- 238000013178 mathematical model Methods 0.000 description 2
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000013135 deep learning Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 239000013505 freshwater Substances 0.000 description 1
- 230000007774 longterm Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 239000013535 sea water Substances 0.000 description 1
- 230000011218 segmentation Effects 0.000 description 1
- 239000004575 stone Substances 0.000 description 1
- 230000001502 supplementing effect Effects 0.000 description 1
- 238000010998 test method Methods 0.000 description 1
Landscapes
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention discloses a salt tide prediction method based on an LSTM-GRU-CNN integrated model, which comprises the following steps: step 1, constructing a comprehensive data set; step 2, data preprocessing; step 3, constructing an LSTM-GRU-CNN integrated model and training; step 4, model test and evaluation; and 5, predicting the salt tide. Compared with the current common numerical simulation method, the method has the advantages of small data demand and simple modeling process, can realize accurate prediction of the salt tide, improves the precision and efficiency of the salt tide prediction, and has wide applicability and effectiveness.
Description
Technical Field
The invention belongs to the technical field of salt tide prediction, and particularly relates to a salt tide prediction method based on an LSTM-GRU-CNN integrated model.
Background
The salty tide refers to a natural hydrologic phenomenon that seawater flows backward and invades a fresh water estuary or a river channel to cause a water body to become salty. Generally, the method occurs in winter or drought season, and occurs in the junction of the river and the sea, such as the surrounding areas of Yangtze river delta, zhujiang delta and the like. The salt tide disaster has become an important factor for limiting the development and utilization of water resources and the sustainable development of economy. The current salt tide prediction method in China mainly comprises field observation analysis, physical model test and numerical simulation. However, the on-site observation analysis method is limited by observation equipment and human resources, continuous and large-scale monitoring is difficult to realize, and the prediction accuracy is also influenced by subjective judgment of observers; the physical model test method is often limited by the model scaling effect and experimental environment factors, and the real estuary environment is difficult to completely reproduce; the numerical simulation method has the problem of low prediction precision, and most of researches are still limited to two-dimensional mathematical models, so that the application of the numerical simulation method to three-dimensional mathematical models is not common; the adoption of the deep learning method is relatively small. Therefore, how to improve the prediction accuracy of the salt tide is a technical problem to be solved urgently.
Disclosure of Invention
The invention aims to provide a salt tide prediction method based on an LSTM-GRU-CNN integrated model, so as to solve the technical problems.
In order to achieve the above purpose, the present invention provides the following technical solutions:
The invention discloses a salt tide prediction method based on an LSTM-GRU-CNN integrated model, which comprises the following steps:
step 1, constructing a comprehensive data set: acquiring actual measurement estuary salinity data, upstream flow data and estuary tide level data of a plurality of pump stations in a certain period of a research area, and constructing a comprehensive data set;
Step 2, data preprocessing: preprocessing data in the comprehensive data set, and dividing the preprocessed data into training period data and testing period data in proportion;
Step 3, constructing an LSTM-GRU-CNN integrated model and training: constructing an LSTM-GRU-CNN integrated model, training the model by using training period data, setting the number of steps of lag time and the number of steps of prediction time, taking the comprehensive data of the training period of the number of steps of the set lag time as model input, taking the actual measurement estuary salinity data of each pump station of the training period of the number of steps of the set prediction time as model output, and training the model until model training is completed;
And 4, model test and evaluation: inputting comprehensive data of the test period data into an integrated model after training, wherein the lag time step number and the prediction time step number are consistent with those during training, further obtaining a model prediction result, carrying out inverse normalization on the model prediction result to obtain predicted estuary salinity data, comparing the predicted estuary salinity data with actual measurement estuary salinity data of each pump station, and judging whether the model passes the test by adopting an evaluation index;
Step 5, salt tide prediction: and predicting the estuary salinity of the target period of the research area by using the model passing the test so as to execute corresponding salty tide prediction work.
Further, the preprocessing process in the step 2 comprises data merging, missing value filling, data normalization and format conversion;
The data are combined to generate a time sequence containing time points per hour according to the minimum value and the maximum value of the sequence, and the left connection is used for combining the original data and the time sequence, so that all the time points are contained;
the missing value filling is to complement missing salinity, flow and tide level data by using a method of previous filling, namely, the missing value is filled by using the latest non-missing value before the missing value, so that complete data is obtained;
The data normalization is carried out by using MinMaxScaler class in scikit-learn library in Python, and the characteristic value of the data is scaled into interval [0,1 ];
the format is converted into a format for converting the original data into supervised learning, namely, the data is divided into two parts of input features and output labels, and the corresponding relation between the input features and the output labels is kept.
Further, in the step 2, the dividing ratio of the training period data to the testing period data is 7:3.
Further, the specific process of constructing the LSTM-GRU-CNN integrated model in the step 3 is as follows:
Step 31, respectively constructing an LSTM model, a GRU model and a CNN model by using LSTM, conv1D, maxPooling1D, flatten, GRU, dense and a Dropout layer of a layers module in a Keras library in the Python, and respectively setting initial parameters of the three models;
Step 32: receiving data by constructing an input layer, and respectively connecting the output of the input layer to the inputs of an LSTM model, a GRU model and a CNN model;
Step 33: the outputs of the three models are connected together using Concatenate layers of the layers module in Keras libraries and the features they extract are fused;
step 34: adding a Dense layer to the connected output, wherein the output size is the characteristic quantity multiplied by the output time step number, and activating a function to use a ReLU to obtain the final stacked output;
Step 35: the Model class of models module in Keras library is used to construct LSTM-GRU-CNN integrated Model, the input of the integrated Model is the input layer constructed in step 32, and the output of the Model is the stack output obtained in step 34.
Further, the specific process of training the model in the step 3 until the model training is completed is as follows:
(1) Firstly, using a common loss function, and respectively setting weights of the pump stations in the step 1 according to the analysis of the prediction result of the initial model using the common loss function so as to adjust the importance degree of the model to different pump stations;
(2) Defining a weighted loss function, and calculating a relative error between a predicted value and a true value of each pump station by using a mean square logarithmic error; the data of the pump stations are contained in the comprehensive data set, so that the extraction of the data of the corresponding row and column positions of each pump station is realized through the slicing operation of Python;
(3) And calculating the loss of the corresponding pump station according to the weight, carrying out weighted summation on the loss of each pump station to obtain a total loss value, taking the total loss value as a return value of the function, outputting a change curve graph of a weighted loss function after training is finished, analyzing an image, and indicating that model training is finished when the function is converged.
Further, the specific process of judging whether the model passes the test by using the evaluation index in the step 4 is as follows:
the evaluation index includes: nash efficiency coefficient NSE, accuracy, recall, and ratio of prediction to actual measurement of salt tide times of each pump station;
The calculation formula of NSE is:
wherein: y i is the actual measurement value at the i-th time; is the predicted value of the ith moment; is the average of all measured values; n is the total number of measured values;
The calculation formula of the accuracy rate:
the calculation formula of the accuracy rate:
The calculation formula of the recall rate:
Wherein: TP is the number of samples that correctly predicts the positive class; TN is the number of samples that correctly predicts the negative category; FP is the number of samples that erroneously predict negative categories as positive categories; FN is the number of samples that erroneously predict a positive class as a negative class; the positive category refers to salty tides, and the negative category refers to non-salty tides;
calculating a calculation formula of a salt tide number prediction and actual measurement ratio:
And calculating each evaluation index of the model, judging whether each evaluation index reaches a qualified threshold, and when each evaluation index reaches the set qualified threshold, indicating that the model test passes.
Further, the NSE pass threshold is 0.6; the qualification threshold values of the precision rate, the accuracy rate and the recall rate are all 0.7; and the qualified threshold interval of the salt tide number prediction and actual measurement ratio is [0.8,1.2].
The beneficial effects of the invention are as follows: compared with the current common numerical simulation method, the method has the advantages of small data demand and simple modeling process, can realize accurate prediction of the salt tide, improves the precision and efficiency of the salt tide prediction, and has wide applicability and effectiveness.
The invention will be described in further detail with reference to the drawings and the detailed description.
Drawings
FIG. 1 is a flow chart of the method of the present invention;
FIG. 2 is a schematic diagram of the LSTM-GRU-CNN integrated model building process.
Detailed Description
The invention discloses a salt tide prediction method based on an LSTM-GRU-CNN integrated model, which is shown in figure 1 and comprises the following steps:
Step 1, constructing a comprehensive data set: and acquiring actual measurement estuary salinity data, upstream flow data and estuary tide level data of a plurality of pump stations in a certain period of a study area, and constructing a comprehensive data set.
Step 2, data preprocessing: preprocessing the data in the comprehensive data set, wherein the preprocessing process comprises data merging, missing value filling, data normalization and format conversion, and the preprocessed data is divided into training period data and testing period data according to a certain proportion.
The method specifically comprises the following steps:
step 21: generating a time sequence containing time points per hour according to the minimum value and the maximum value of the sequence, and combining the original data and the time sequence by using a left connection to ensure that all the time points are contained;
step 22: filling the missing value by using the previous filling method to complement the missing salinity, flow and tide level data, namely filling the missing value by using the latest non-missing value before the missing value, so as to obtain complete data;
step 23: performing data normalization by using MinMaxScaler class of scikit-learn library in Python, and scaling the data characteristic value into an interval [0,1 ];
Step 24: the definition function converts the original data into a supervised learning format, namely the data is divided into an input feature and an output label, and the corresponding relation between the input feature and the output label is kept, so that the training and the prediction of a follow-up supervised learning model are facilitated;
Step 25: the data processed by the method is divided into training period data and testing period data according to a certain proportion. The specific proportion is determined according to actual requirements and data characteristics, and the segmentation proportion of the common training period data and the test period data is 7:3.
Step 3, constructing an LSTM-GRU-CNN integrated model and training: an LSTM-GRU-CNN integrated model is built, the model is trained by using training period data, the lag time step number and the prediction time step number are set, comprehensive data of the training period of the lag time step number is set as model input, actual measurement estuary salinity data of each pump station of the training period of the prediction time step number is set as model output, and the model is trained until model training is completed.
As shown in fig. 2, the method specifically comprises the following steps:
Step 31, respectively constructing an LSTM model, a GRU model and a CNN model by using LSTM, conv1D, maxPooling1D, flatten, GRU, dense and a Dropout layer of a layers module in a Keras library in the Python, and respectively setting initial parameters of the three models;
Step 32: receiving data by constructing an input layer, and respectively connecting the output of the input layer to the inputs of an LSTM model, a GRU model and a CNN model;
Step 33: the outputs of the three models are connected together using Concatenate layers of the layers module in Keras libraries and the features they extract are fused;
step 34: adding a Dense layer to the connected output, wherein the output size is the characteristic quantity multiplied by the output time step number, and activating a function to use a ReLU to obtain the final stacked output; this indicates that the prediction for each time step is a vector determined by the number of features and that the number of repetitions of this vector over the whole time sequence is equal to the number of output time steps;
Step 35: constructing an LSTM-GRU-CNN integrated Model by using Model classes of models modules in Keras libraries, wherein the input of the integrated Model is an input layer constructed in the step 32, and the output of the Model is the stacking output obtained in the step 34;
step 36: training the integrated model by using training period data, setting the delay time step number and the prediction time step number, taking the comprehensive data of the training period of the delay time step number as model input, and taking the actual measurement estuary salinity data of each pump station of the training period of the prediction time step number as model output; during training, a common loss function is used firstly, and according to result analysis, a self-defined weighted loss function is used to improve the forecasting precision of all sites.
The function of the loss function is to measure the degree of difference or error between the model predicted value and the true value. The loss function is an objective function of model optimization, and is used for guiding the updating of model parameters so that the predicted value of the model is as close to the true value as possible. In the training process, after each training batch is finished, the model calculates the current loss function value (i.e. the predicted and real difference value), calculates the derivative of the function, and optimizes the parameters of the model along the direction of the derivative (i.e. the direction of minimizing the loss value). After each parameter update, the value of the loss function is calculated to check the training effect.
The method specifically comprises the following steps:
(1) Firstly, using a common loss function, and respectively setting targeted weights for the pump stations in the step 1 according to the analysis of an initial model prediction result using the common loss function so as to adjust the importance degree of the model to different pump stations;
(2) Defining a weighted loss function, and calculating a relative error between a predicted value and a true value of each pump station by using a mean square error (MSLE); the data of the pump stations are contained in the comprehensive data set, so that the extraction of the data of the corresponding row and column positions of each pump station is realized through the slicing operation of Python;
(3) And calculating the loss of the corresponding pump station according to the weight, and carrying out weighted summation on the loss of each pump station to obtain a total loss value which is used as a return value of the function. And outputting a change curve graph of the weighted loss function after training is finished, analyzing an image, and indicating that model training is finished when the function tends to be stable and no significant change occurs (namely, the function can be converged).
And 4, model test and evaluation: and inputting comprehensive data of the test period data into the integrated model after training, wherein the delay time step number and the prediction time step number are consistent with those during training, further obtaining a model prediction result, carrying out inverse normalization on the model prediction result to obtain predicted estuary salty degree data, comparing the predicted estuary salty degree data with actual estuary salty degree data of each pump station, and evaluating the reliability of the model by adopting an evaluation index, namely judging whether the model passes the test.
The selected evaluation indexes are Nash efficiency coefficient NSE, accuracy, recall rate and the ratio of the prediction and actual measurement of the salt tide times of each pump station.
The calculation formula of NSE is:
wherein: y i is the actual measurement value at the i-th time; is the predicted value of the ith moment; Is the average of all measured values; n is the total number of measured values.
The calculation formula of the accuracy rate:
the calculation formula of the accuracy rate:
The calculation formula of the recall rate:
Wherein: TP is the number of samples that correctly predicts the positive class; TN is the number of samples that correctly predicts the negative category; FP is the number of samples that erroneously predict negative categories as positive categories; FN is the number of samples that erroneously predict a positive class as a negative class; the positive category refers to salty tides, and the negative category refers to non-salty tides.
Calculating a calculation formula of a salt tide number prediction and actual measurement ratio:
Calculating each evaluation index of the model, wherein the value range of NSE is (-infinity, 1), the closer the value is to 1, the better the fitting degree of the prediction and the measured data of the model is, in general, when NSE is larger than 0.6, the fitting effect of the model is considered to be better, therefore, 0.6 can be taken as an NSE qualification threshold value, the estuary salty degree threshold value for judging the salty tide is 250, namely, the salty degree is judged to be one salty tide when the salty degree is larger than 250 (the three ratios and the ratio are calculated according to the salty tide times), the accuracy rate, the recall rate and the salty tide times are close to 1, the higher the accuracy of the predicted salty tide is shown, the qualification threshold value of the accuracy rate, the accuracy rate and the recall rate is generally 0.7 according to the experience value, and the qualification threshold value interval of the salty tide times prediction and the ratio is [0.8,1.2]. When each evaluation index reaches the set qualification threshold value, the model test is passed.
Step 5, salt tide prediction: and predicting the estuary salinity of the target period of the research area by using the model passing the test so as to execute corresponding salty tide prediction work.
Example 1
The present embodiment is an application example of the method, and the selected research area in the present embodiment is a knife gate water channel, which is located in the middle and south of Guangdong province and is one of the Zhujiang outlet.
The embodiment discloses a salt tide prediction method based on an LSTM-GRU-CNN integrated model, which comprises the following steps:
Step 1: constructing a comprehensive data set: obtaining river mouth salinity data, stone angle and high-importance flow data and tidal level data of the lantern mountain actually measured by the Guangchang pump station, the flat post pump station and the Zhuzhou head pump station in a research area. And selecting data from 1 st 10 th 2020 to 27 th 6 th 2022 as study data to construct a comprehensive data set.
Step 2: data preprocessing: preprocessing data in the comprehensive data set, including data merging, missing value filling, data normalization and format conversion; filling interpolation is used for supplementing missing salinity, flow and tide level data; then, carrying out data normalization processing, and scaling the data characteristic values into intervals [0,1 ]; after the data is converted into the supervised learning problem, the data from 1 st 3 rd to 1 st 2 nd 2021 nd 12 th are selected as training period data, and the data from 1 st 3 rd to 27 th 20 nd 2022 nd 6 th are selected as test period data.
Step 3: constructing an LSTM-GRU-CNN integrated model and training: constructing an LSTM-GRU-CNN integrated model, and training the model by using training period data; taking the comprehensive data of the training period with the lag time step number of 18 hours as input, taking the estuary salinity data of three pump stations with the predicted time step number of 6 hours as output, and training the LSTM-GRU-CNN integrated model (namely, predicting the salinity data of 6 hours in the future by using the hydrological data of 18 hours in the past); until the model training is completed.
Step 4: model test and evaluation: inputting the comprehensive data of the test period into a model after training to obtain a prediction result, and inversely normalizing the prediction result to obtain predicted estuary salinity data, wherein the lag time step number and the prediction time step number are consistent with those during training; comparing the predicted estuary salinity data with the actually measured estuary salinity data, wherein for three pump stations, the accuracy, the precision and the recall rate of the model are all more than 0.8, and the difference between the predicted and actually measured ratio of the salty tide times and 1 is less than or equal to 0.1, so that the model has higher accuracy and reliability in the aspect of identifying salty tide events; the nash efficiency coefficient NSE is 0.91, which indicates that the trained integrated model fitting effect is very good.
Step 5, salt tide prediction: and predicting the estuary salinity of the target period of the research area by using the model passing the test so as to execute corresponding salty tide prediction work.
The LSTM deep learning model and the GRU deep learning model can better capture long-term dependency in time sequence data, and the CNN model can capture local dependency and characteristics in time and learn nonlinear relations through convolution operation. Therefore, the LSTM-GRU-CNN integrated model can well complete time sequence prediction.
In addition, two additional sets of predictions were made in this example: the number of steps of the lag time was 36 hours, the number of steps of the predicted time was 12 hours, and the number of steps of the lag time was 72 hours, respectively, the number of steps of the predicted time was 24 hours. The Nash efficiency coefficient NSE obtained by calculation of the two groups of prediction results is 0.91 and 0.90 respectively, and the accuracy, the precision and the recall rate of the model are all larger than 0.8, so that the fitting effect of the integrated model is relatively stable.
According to comprehensive analysis of all evaluation indexes, the method disclosed by the embodiment has the characteristics of high efficiency and high precision, and can well predict the estuary salinity of a future period according to the hydrological data of the past period, so that the accurate prediction of the estuary salty tide condition is realized.
Finally, it should be noted that the above description is only for the purpose of illustrating the technical solution of the present invention and not for the purpose of limiting the same, and that although the present invention has been described in detail with reference to the preferred arrangement, it will be understood by those skilled in the art that modifications and equivalents may be made thereto without departing from the spirit and scope of the technical solution of the present invention.
Claims (7)
1. A salt tide prediction method based on an LSTM-GRU-CNN integrated model is characterized by comprising the following steps:
step 1, constructing a comprehensive data set: acquiring actual measurement estuary salinity data, upstream flow data and estuary tide level data of a plurality of pump stations in a certain period of a research area, and constructing a comprehensive data set;
Step 2, data preprocessing: preprocessing data in the comprehensive data set, and dividing the preprocessed data into training period data and testing period data in proportion;
Step 3, constructing an LSTM-GRU-CNN integrated model and training: constructing an LSTM-GRU-CNN integrated model, training the model by using training period data, setting the number of steps of lag time and the number of steps of prediction time, taking the comprehensive data of the training period of the number of steps of the set lag time as model input, taking the actual measurement estuary salinity data of each pump station of the training period of the number of steps of the set prediction time as model output, and training the model until model training is completed;
And 4, model test and evaluation: inputting comprehensive data of the test period data into an integrated model after training, wherein the lag time step number and the prediction time step number are consistent with those during training, further obtaining a model prediction result, carrying out inverse normalization on the model prediction result to obtain predicted estuary salinity data, comparing the predicted estuary salinity data with actual measurement estuary salinity data of each pump station, and judging whether the model passes the test by adopting an evaluation index;
Step 5, salt tide prediction: and predicting the estuary salinity of the target period of the research area by using the model passing the test so as to execute corresponding salty tide prediction work.
2. The method for predicting salty tide based on LSTM-GRU-CNN integrated model according to claim 1, wherein the preprocessing process in step 2 comprises data merging, missing value filling, data normalization and format conversion;
The data are combined to generate a time sequence containing time points per hour according to the minimum value and the maximum value of the sequence, and the left connection is used for combining the original data and the time sequence, so that all the time points are contained;
the missing value filling is to complement missing salinity, flow and tide level data by using a method of previous filling, namely, the missing value is filled by using the latest non-missing value before the missing value, so that complete data is obtained;
The data normalization is carried out by using MinMaxScaler class in scikit-learn library in Python, and the characteristic value of the data is scaled into interval [0,1 ];
the format is converted into a format for converting the original data into supervised learning, namely, the data is divided into two parts of input features and output labels, and the corresponding relation between the input features and the output labels is kept.
3. The method for predicting salty tide based on LSTM-GRU-CNN integrated model according to claim 1, wherein the dividing ratio of training period data and test period data in the step 2 is 7:3.
4. The method for predicting salty tide based on LSTM-GRU-CNN integrated model according to claim 1, wherein the specific process for constructing the LSTM-GRU-CNN integrated model in the step 3 is as follows:
Step 31, respectively constructing an LSTM model, a GRU model and a CNN model by using LSTM, conv1D, maxPooling1D, flatten, GRU, dense and a Dropout layer of a layers module in a Keras library in the Python, and respectively setting initial parameters of the three models;
Step 32: receiving data by constructing an input layer, and respectively connecting the output of the input layer to the inputs of an LSTM model, a GRU model and a CNN model;
Step 33: the outputs of the three models are connected together using Concatenate layers of the layers module in Keras libraries and the features they extract are fused;
step 34: adding a Dense layer to the connected output, wherein the output size is the characteristic quantity multiplied by the output time step number, and activating a function to use a ReLU to obtain the final stacked output;
Step 35: the Model class of models module in Keras library is used to construct LSTM-GRU-CNN integrated Model, the input of the integrated Model is the input layer constructed in step 32, and the output of the Model is the stack output obtained in step 34.
5. The method for predicting salty tide based on LSTM-GRU-CNN integrated model according to claim 1, wherein the specific process of training the model in the step 3 until model training is completed is as follows:
(1) Firstly, using a common loss function, and respectively setting weights of the pump stations in the step 1 according to the analysis of the prediction result of the initial model using the common loss function so as to adjust the importance degree of the model to different pump stations;
(2) Defining a weighted loss function, and calculating a relative error between a predicted value and a true value of each pump station by using a mean square logarithmic error; the data of the pump stations are contained in the comprehensive data set, so that the extraction of the data of the corresponding row and column positions of each pump station is realized through the slicing operation of Python;
(3) And calculating the loss of the corresponding pump station according to the weight, carrying out weighted summation on the loss of each pump station to obtain a total loss value, taking the total loss value as a return value of the function, outputting a change curve graph of a weighted loss function after training is finished, analyzing an image, and indicating that model training is finished when the function is converged.
6. The method for predicting salty tide based on LSTM-GRU-CNN integrated model according to claim 1, wherein the specific process of judging whether the model passes the test by adopting the evaluation index in the step 4 is as follows:
the evaluation index includes: nash efficiency coefficient NSE, accuracy, recall, and ratio of prediction to actual measurement of salt tide times of each pump station;
The calculation formula of NSE is:
wherein: y i is the actual measurement value at the i-th time; is the predicted value of the ith moment; is the average of all measured values; n is the total number of measured values;
The calculation formula of the accuracy rate:
the calculation formula of the accuracy rate:
The calculation formula of the recall rate:
Wherein: TP is the number of samples that correctly predicts the positive class; TN is the number of samples that correctly predicts the negative category; FP is the number of samples that erroneously predict negative categories as positive categories; FN is the number of samples that erroneously predict a positive class as a negative class; the positive category refers to salty tides, and the negative category refers to non-salty tides;
calculating a calculation formula of a salt tide number prediction and actual measurement ratio:
And calculating each evaluation index of the model, judging whether each evaluation index reaches a qualified threshold, and when each evaluation index reaches the set qualified threshold, indicating that the model test passes.
7. The method for predicting salt tide based on LSTM-GRU-CNN integration model according to claim 6, wherein the NSE qualification threshold is 0.6; the qualification threshold values of the precision rate, the accuracy rate and the recall rate are all 0.7; and the qualified threshold interval of the salt tide number prediction and actual measurement ratio is [0.8,1.2].
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410386389.1A CN118312775A (en) | 2024-04-01 | 2024-04-01 | Salt tide prediction method based on LSTM-GRU-CNN integrated model |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410386389.1A CN118312775A (en) | 2024-04-01 | 2024-04-01 | Salt tide prediction method based on LSTM-GRU-CNN integrated model |
Publications (1)
Publication Number | Publication Date |
---|---|
CN118312775A true CN118312775A (en) | 2024-07-09 |
Family
ID=91721318
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202410386389.1A Pending CN118312775A (en) | 2024-04-01 | 2024-04-01 | Salt tide prediction method based on LSTM-GRU-CNN integrated model |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN118312775A (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103106625A (en) * | 2013-03-08 | 2013-05-15 | 珠江水利委员会珠江水利科学研究院 | Reservoir, sluice and pump cluster combined saltwater tide control and scheduling method |
CN106815473A (en) * | 2016-12-30 | 2017-06-09 | 南方科技大学 | Hydrological simulation uncertainty analysis method and device |
CN113807570A (en) * | 2021-08-12 | 2021-12-17 | 水利部南京水利水文自动化研究所 | Reservoir dam risk level evaluation method and system based on XGboost |
CN117077554A (en) * | 2023-10-18 | 2023-11-17 | 珠江水利委员会珠江水利科学研究院 | Three-dimensional salty tide forecasting method based on ConvGRU |
CN117113854A (en) * | 2023-10-18 | 2023-11-24 | 珠江水利委员会珠江水利科学研究院 | Salt tide forecasting method based on ConvLSTM and three-dimensional numerical simulation |
KR102617312B1 (en) * | 2023-09-07 | 2023-12-27 | (주)바이브컴퍼니 | Method for forecasting temperature in underground utility tunnel based on CA-TimeGAN and residual CNN-LSTM |
-
2024
- 2024-04-01 CN CN202410386389.1A patent/CN118312775A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103106625A (en) * | 2013-03-08 | 2013-05-15 | 珠江水利委员会珠江水利科学研究院 | Reservoir, sluice and pump cluster combined saltwater tide control and scheduling method |
CN106815473A (en) * | 2016-12-30 | 2017-06-09 | 南方科技大学 | Hydrological simulation uncertainty analysis method and device |
CN113807570A (en) * | 2021-08-12 | 2021-12-17 | 水利部南京水利水文自动化研究所 | Reservoir dam risk level evaluation method and system based on XGboost |
KR102617312B1 (en) * | 2023-09-07 | 2023-12-27 | (주)바이브컴퍼니 | Method for forecasting temperature in underground utility tunnel based on CA-TimeGAN and residual CNN-LSTM |
CN117077554A (en) * | 2023-10-18 | 2023-11-17 | 珠江水利委员会珠江水利科学研究院 | Three-dimensional salty tide forecasting method based on ConvGRU |
CN117113854A (en) * | 2023-10-18 | 2023-11-24 | 珠江水利委员会珠江水利科学研究院 | Salt tide forecasting method based on ConvLSTM and three-dimensional numerical simulation |
Non-Patent Citations (1)
Title |
---|
ANKITA CHOPRA等: "Comparison Study of Different Neural Network Models for Assessing Employability Skills of IT Graduates", 2023 INTERNATIONAL CONFERENCE ON SUSTAINABLE COMMUNICATION NETWORKS AND APPLICATION (ICSCNA) | 979-8-3503-1398-7/23/$31.00 ©2023 IEEE | DOI: 10.1109/ICSCNA58489.2023.10368605, 31 December 2023 (2023-12-31), pages 189 - 194 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN117035201B (en) | Multi-target scheduling rule making method and system for plain river network water engineering cluster | |
CN112396152A (en) | Flood forecasting method based on CS-LSTM | |
CN110807554A (en) | Generation method and system based on wind power/photovoltaic classical scene set | |
CN111242351A (en) | Tropical cyclone track prediction method based on self-encoder and GRU neural network | |
CN104616078A (en) | Spiking neural network based photovoltaic system generation power prediction method | |
CN112966891A (en) | River water environment quality prediction method | |
CN112330065A (en) | Runoff forecasting method based on basic flow segmentation and artificial neural network model | |
CN115423163A (en) | Method and device for predicting short-term flood events of drainage basin and terminal equipment | |
CN115951014A (en) | CNN-LSTM-BP multi-mode air pollutant prediction method combining meteorological features | |
CN114154619A (en) | Ship track prediction method based on CNN and BILSTM | |
CN114169445A (en) | Day-ahead photovoltaic power prediction method, device and system based on CAE and GAN hybrid network | |
CN112686481A (en) | Runoff forecasting method and processor | |
CN113642255A (en) | Photovoltaic power generation power prediction method based on multi-scale convolution cyclic neural network | |
CN114492217B (en) | Typhoon and wave height prediction method based on mixed time series perceptron model | |
CN114498619A (en) | Wind power prediction method and device | |
CN116050595A (en) | Attention mechanism and decomposition mechanism coupled runoff amount prediction method | |
CN114357670A (en) | Power distribution network power consumption data abnormity early warning method based on BLS and self-encoder | |
CN116826737A (en) | Photovoltaic power prediction method, device, storage medium and equipment | |
CN106782577A (en) | A kind of voice signal coding and decoding methods based on Chaotic time series forecasting model | |
CN118312775A (en) | Salt tide prediction method based on LSTM-GRU-CNN integrated model | |
CN116011319A (en) | Urban expansion simulation method based on driving factor analysis | |
CN115296298A (en) | Wind power plant power prediction method | |
CN113204583A (en) | Reservoir group scheduling decision behavior mining method and reservoir scheduling automatic control device | |
CN115204437A (en) | Sea surface temperature forecasting method based on memory map convolution network | |
CN118194235B (en) | Multi-mode fused precipitation dry-wet time sequence change reconstruction method and system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |