Optimized extreme learning machine incoming water quantity prediction method based on grey correlation analysis
The optimization extreme learning machine method based on gray relational analysis solves the problem of lack of accuracy of existing water inflow prediction methods. The beetle swarm algorithm and adaptive boosting algorithm are used to optimize the model to achieve accurate prediction of incoming water volume.
Patent Information
- Application Number
- CN202411502087.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-25
- Publication Date
- 2025-01-21
AI Technical Summary
The existing incoming water volume prediction methods lack accuracy and fail to effectively utilize the similarity between historical incoming water volume data and daily incoming water volume, resulting in inaccurate prediction results.
Using the method of optimizing the extreme learning machine based on the gray -based analysis, the initial sample set is used to calculate the gray correlation of historical data and the predictive day -to -day water volume, and use the Tianniu cluster algorithm and adaptive improvement algorithm to optimize the extreme learning machine model to improve the improvement to improve it. The accuracy of water volume prediction.
Improving the accuracy of water prediction, considering the irregularity of precipitation and environmental climate, and enhancing the precise predictive prediction ability of the future water volume.
Smart Images

Figure CN119338067A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of water conservancy engineering, and in particular relates to a water inflow prediction method based on an optimized extreme learning machine based on grey correlation analysis. Background Art
[0002] Water inflow is the core of hydropower generation. Reasonable allocation of water resources can maximize the use of natural resources and reduce unnecessary losses. In recent years, flood discharge holes have been frequently opened, and the water level in the middle and lower reaches of the Yangtze River has risen, which not only wastes water resources, but is also likely to have a significant impact on the lives and even safety of residents in the basin.
[0003] At present, the existing water inflow prediction method uses a single neural network to predict the water inflow, and only considers the impact of environmental factors on the water inflow, without referring to the similarity of historical water inflow data and daily water inflow, resulting in the lack of accuracy of the prediction results of the existing prediction method. Summary of the invention
[0004] The technical problem of the present invention is: analyzing the correlation between historical water inflow and predicted daily water inflow, constructing a water inflow sample set, and using an optimized extreme learning machine algorithm model to improve the accuracy of predicted daily water inflow and achieve accurate prediction of future water inflow.
[0005] The purpose of the present invention is to solve the above problems and propose a water inflow prediction method based on an optimized extreme learning machine based on grey correlation analysis, which comprises the following steps: S1: Use the grey correlation analysis method to calculate the grey correlation between historical data and predicted daily water inflow, and select similar days with large grey correlation values to form the initial sample set; S2: Normalize the initial sample set to construct the data set D1, and divide the data set D1 into a training set and a test set; S3: construct an ELM data optimization model, use the beetle swarm algorithm to input the training set of data set D1 into the ELM data optimization model for training, obtain individual optimal values and global optimal values, and construct data set D2; S4: Establish an ELM water flow prediction model, input the data set D2 into the ELM water flow prediction model, and obtain an optimized sample set; S5: using an adaptive boosting algorithm, calculating the weights of the optimized sample set obtained in step S4, inputting it into the ELM water inflow prediction model to obtain a weak classifier, and combining the results of the iterated weak classifiers to obtain an optimized ELM water inflow model; S6: Input the test set of data set D1 into the optimized ELM water inflow prediction model to obtain the prediction result of daily water inflow.
[0006] Furthermore, in step S1, the correlation between historical data and predicted daily water inflow is obtained by using grey correlation analysis. In order to analyze the process and trend of the factors affecting water inflow by using grey correlation analysis, the data sequence of water inflow is used as a reference sequence, and the data sequence of precipitation is used as a comparison sequence. The correlation between the data sequence and the comparison sequence is calculated, including the following steps: 1) Calculate the difference between the comparison sequence and the reference sequence one by one. The calculation formula is: , i =1,2…n, k =1,2,…m; In the formula, Represents the difference result, represents the kth value of the reference sequence, Indicates the comparison sequence k value, k and i is the data sequence number; 2) Calculate the correlation coefficient using the formula: ; In the formula, Indicates calculating the maximum absolute difference, Indicates calculating the minimum absolute difference. represents the resolution coefficient, The value range of is [0,1]; 3) Calculate the grey correlation degree, the calculation formula is: ; In the formula, Indicates the correlation between the reference series and the comparison series.
[0007] Optimized, step S3 includes the following sub-steps: 1) Set the parameters of the beetle group algorithm; 2) Initialize the position and speed of the longhorn beetle, calculate the individual fitness value of the longhorn beetle, and select the optimal individual fitness value as the global optimal value. The calculation formula is: 3) Update the new position of each beetle based on the iterative formula and the current position, speed, and personal and global optimal positions of the beetle.
[0008] 4) Calculate the fitness value of each new position of the longicorn, update the individual optimal solution and the global optimal solution, and output the global optimal value; 5) Assign the global optimal value to the extreme learning machine and build the optimal extreme learning machine prediction model.
[0009] Furthermore, in step S5, the adaptive boosting algorithm includes the following sub-steps: S51: Initialize weights and assign equal initial weights to each training sample in the sample set; S52: Train the weak classifier, train the weak classifier according to the current sample weight and calculate the error of the prediction result; S53: Update the weights, increase the weights of the samples classified by errors, and reduce the weights of the samples classified by correct samples; S54: Combine the classifiers to combine the weighted results of all weak classifiers to obtain a strong classifier; S55: Iteration, repeat the above steps until the specified number of iterations is reached.
[0010] Optimized, in step S52, the calculation formula for calculating the error is: ; In the formula, represents the i-th data sequence in the sample set, Indicates the error result.
[0011] Furthermore, in step S53, the weight is calculated according to the error of the prediction result, and the weight calculation formula is: ; In the formula, The weight value representing the error result.
[0012] Optimized, in step S53, the calculation formula for updating the weight is: ; ; In the formula, represents the predicted value of the k-th predictor, Indicates the actual value, Z k represents the normalization factor, represents a constant, Represents the difference of the i-th data sequence.
[0013] Furthermore, in step S54, the expression of the strong predictor is: ; ; In the formula, is the error sequence weight, represents the predicted value of the k-th predictor.
[0014] Compared with the prior art, the beneficial effects of the present invention include: 1) The present invention uses grey correlation analysis to calculate the grey correlation between historical water inflow data and predicted daily water inflow, and uses the grey correlation value to construct a data set, and uses the beetle swarm algorithm and extreme learning machine data optimization model to optimize the data set, and then uses the adaptive algorithm to improve the prediction accuracy of the extreme learning machine water inflow prediction model.
[0015] 2) The present invention takes into account the irregularity of precipitation and environmental climate that affect the water inflow, and will seek samples of historical similar days with a high degree of similarity to the environmental climate of the forecast day, and use this to establish a forecast model to improve the accuracy of the forecast of water inflow on the forecast day. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0017] Figure 1 The figure is a flow chart of a method for predicting water flow according to an embodiment of the present invention. DETAILED DESCRIPTION
[0018] like Figure 1 As shown, the water inflow prediction method based on the optimized extreme learning machine of grey correlation analysis includes the following steps: S1: Use the grey correlation analysis method to calculate the grey correlation between historical data and predicted daily water inflow, and select similar days with large grey correlation values to form the initial sample set; Grey correlation analysis is used to obtain the correlation between historical data and predicted daily water inflow. In order to use grey correlation analysis to analyze the process and trend of factors affecting water inflow, the data sequence of future water inflow is used as a reference sequence, and the data sequence of precipitation is used as a comparison sequence. The correlation between the data sequence and the comparison sequence is calculated, including the following steps: 1) Calculate the difference between the comparison sequence and the reference sequence one by one. The calculation formula is: ,i=1,2…n,k=1,2,…m; In the formula, Represents the difference result, represents the kth value of the reference sequence, Indicates the kth value in the comparison sequence, k and i are the data sequence numbers; 2) Calculate the correlation coefficient using the formula: ; In the formula, Indicates calculating the maximum absolute difference, Indicates calculating the minimum absolute difference. represents the resolution coefficient, The value range of is [0,1]; 3) Calculate the grey correlation degree, the calculation formula is: ; In the formula, Indicates the correlation between the reference series and the comparison series.
[0019] S2: Normalize the initial sample set to construct the data set D1, and divide the data set D1 into a training set and a test set; S3: construct an ELM data optimization model, use the beetle swarm algorithm to input the training set of data set D1 into the ELM data optimization model for training, obtain individual optimal values and global optimal values, and construct data set D2; Step S3 includes the following sub-steps: 1) Set the parameters of the beetle group algorithm; 2) Initialize the position and speed of the longhorn beetle, calculate the individual fitness value of the longhorn beetle, and select the optimal individual fitness value as the global optimal value. The calculation formula is: ; ; ; In the formula, k represents the number of iterations, K represents the maximum number of iterations, and λ represents a constant. represents the speed of the beetle, represents the increment of the beetle's position movement, , They represent the positions of the right and left antennae of the longhorn beetle, c1 and c2 represent constants, r and r1 represent random numbers between the interval [0, 1], ω represents the inertia weight, represents the maximum weight, represents the minimum weight, 3) Update the new position of each beetle according to the iterative formula and the current position, speed, and personal and global optimal positions of the beetle. The calculation formula is: ; ; ; Where f( ) represents the fitness function value, sign( ) represents the sign function, and d represents the quotient of σ and c2.
[0020] 4) Calculate the fitness value of each new position of the longicorn, update the individual optimal solution and the global optimal solution, and output the global optimal value; 5) Assign the global optimal value to the extreme learning machine and build the optimal extreme learning machine prediction model.
[0021] S4: Establish an ELM water inflow prediction model, input the data set D2 into the ELM water inflow prediction model, and obtain an optimized sample set; S5: using an adaptive boosting algorithm, calculating the weights of the optimized sample set obtained in step S4, and inputting the weights into the ELM water inflow prediction model, thereby obtaining an optimized ELM water inflow model; The adaptive boosting algorithm consists of the following sub-steps: S51: Initialize weights and assign equal initial weights to each training sample in the sample set; S52: Train the weak classifier, train the weak classifier according to the current sample weight and calculate the error of the prediction result; The calculation formula for the calculation error is: ; In the formula, represents the i-th data sequence in the sample set, Indicates the error result.
[0022] The weight is calculated according to the error of the prediction result. The weight calculation formula is: ; In the formula, The weight value representing the error result.
[0023] S53: Update the weights, increase the weights of misclassified samples, and reduce the weights of correctly classified samples; The calculation formula for updating weights is: ; ; In the formula, represents the predicted value of the k-th predictor, Indicates the actual value, Z k represents the normalization factor, represents a constant, Represents the difference of the i-th data sequence.
[0024] S54: Combine the classifiers to combine the weighted results of all weak classifiers to obtain a strong classifier; The expression of the strong predictor is: ; ; In the formula, is the error sequence weight, represents the predicted value of the k-th predictor.
[0025] S6: Input the test set of data set D1 into the optimized ELM water inflow prediction model to obtain the prediction result of daily water inflow.
Claims
1. The optimized extreme learning machine water flow prediction method based on grey correlation analysis is characterized by: The following steps are involved: S1: Use the grey correlation analysis method to calculate the grey correlation between historical data and predicted daily water inflow, and select similar days with large grey correlation values to form the initial sample set; S2: Normalize the initial sample set to construct the data set D1, and divide the data set D1 into a training set and a test set; S3: construct an ELM data optimization model, use the beetle swarm algorithm to input the training set of data set D1 into the ELM data optimization model for training, obtain individual optimal values and global optimal values, and construct data set D2; S4: Establish an ELM water flow prediction model, input the data set D2 into the ELM water flow prediction model, and obtain an optimized sample set; S5: using an adaptive boosting algorithm, calculating the weights of the optimized sample set obtained in step S4, inputting it into the ELM water inflow prediction model to obtain a weak classifier, and combining the results of the iterated weak classifiers to obtain an optimized ELM water inflow model; S6: Input the test set of data set D1 into the optimized ELM water inflow prediction model to obtain the prediction result of daily water inflow.
2. The water inflow prediction method based on the optimized extreme learning machine of grey relational analysis according to claim 1 is characterized in that: In step S1, the grey correlation analysis is used to obtain the correlation between the historical data and the predicted daily water inflow. The grey correlation analysis is used to analyze the process and trend of the factors affecting the water inflow. The data sequence of the water inflow is used as a reference sequence, and the data sequence of the historical precipitation is used as a comparison sequence. The correlation between the data sequence and the comparison sequence is calculated, including the following steps: 1) Calculate the difference between the comparison sequence and the reference sequence one by one. The calculation formula is: ,i=1,2…n,k=1,2,…m; In the formula, Represents the difference result, represents the kth value of the reference sequence, Indicates the kth value in the comparison sequence, k and i are the data sequence numbers; 2) Calculate the correlation coefficient using the formula: ; In the formula, Indicates calculating the maximum absolute difference, Indicates calculating the minimum absolute difference. represents the resolution coefficient, The value range of is [0,1]; 3) Calculate the grey correlation degree, the calculation formula is: ; In the formula, Indicates the correlation between the reference series and the comparison series.
3. The water inflow prediction method based on the optimized extreme learning machine of grey relational analysis according to claim 1 is characterized in that: Step S3 includes the following sub-steps: 1) Set the parameters of the beetle group algorithm; 2) Initialize the position and speed of the longhorn beetle, calculate the individual fitness value of the longhorn beetle, and select the optimal individual fitness value as the global optimal value; 3) Update the new position of each beetle based on the iterative formula and the current position, speed, and personal and global optimal positions of the beetle; 4) Calculate the fitness value of each new position of the longicorn, update the individual optimal solution and the global optimal solution, and output the global optimal value; 5) Assign the global optimal value to the extreme learning machine and build the optimal extreme learning machine prediction model.
4. The water inflow prediction method based on the optimized extreme learning machine of grey relational analysis according to claim 1 is characterized in that: In step S5, the adaptive boosting algorithm includes the following sub-steps: S51: Initialize weights and assign equal initial weights to each training sample in the sample set; S52: Train the weak classifier, train the weak classifier according to the current sample weight and calculate the error of the prediction result; S53: Update the weights, increase the weights of the samples classified by errors, and reduce the weights of the samples classified by correct samples; S54: Combine the classifiers to combine the weighted results of all weak classifiers to obtain a strong classifier; S55: Iteration, repeat the above steps until the specified number of iterations is reached.
5. The water inflow prediction method based on the optimized extreme learning machine of grey relational analysis according to claim 4 is characterized in that: In step S52, the calculation formula for calculating the error is: ; In the formula, represents the i-th data sequence in the sample set, Indicates the error result.
6. The water inflow prediction method based on the optimized extreme learning machine of grey relational analysis according to claim 4 is characterized in that: In step S53, the weight is calculated according to the error of the prediction result, and the weight calculation formula is: ; In the formula, The weight value representing the error result.
7. The water inflow prediction method based on the optimized extreme learning machine of grey relational analysis according to claim 4 is characterized in that: In step S53, the calculation formula for updating the weight is: ; ; In the formula, represents the predicted value of the k-th predictor, Indicates the actual value, Z k represents the normalization factor, represents a constant, Represents the difference of the i-th data sequence.
8. The water inflow prediction method based on the optimized extreme learning machine of grey relational analysis according to claim 4 is characterized in that: In step S54, the expression of the strong predictor is: ; ; In the formula, is the error sequence weight, Represents the predicted value of the kth weak classifier.
Citation Information
Patent Citations
Dynamic combination analysis method of new energy generating capacity influenced by meteorological information
CN102184337A
GA-ELM-based short-term water demand prediction method
CN111310974A
Internet financial client application fraud detection method based on AdaBoost
CN112581265A
Modeling method for optimizing Elman neural network motorized spindle thermal error based on beetle antennae algorithm
CN114861879A