Research on residual GM optimization based on PEMEA-BP correction

With the advantages of small samples and high accuracy, Grey Model (GM) still has two major problems need to be addressed, high input data requirements and large margin of error. Hence, this paper proposes an algorithm based on Populational Entropy Based Mind Evolutionary Algorithm-Error Back Propagation Training Artificial Neural Algorithm to modify GM residual tail, which will not only keep the advantages of GM, but also expand its scope of use to various non-linear and even multidimensional objects. Meanwhile, it can avoid defects of other algorithms, such as slow convergence and easy to fall into the local minimum. In small samples data experiments, judging from SSE, MAE, MSE, MAPE, MRE and other indicators, this new algorithm has significant advantage over GM, BP algorithm and combined genetic algorithm in terms of simulation accuracy and convergence speed.

Scientific Reports | (2020) 10:21540 | https://doi.org/10.1038/s41598-020-77630-w www.nature.com/scientificreports/ prediction in energy generation. Zheng 8 utilized the Monte-Carlo simulation method to compare the discrete grey model (DGM) and traditional GM, finding that the predictive capabilities of the two models for random sequences conforming to normal distribution are nearly equivalent. However, the predictive capabilities of DGM for the other aspects of random sequences are all superior to those of GM. Ma et al. 9 proposed a fractional time delayed grey model to solve the time delayed effect and improve fractional GM. In order to optimize the value and grey derivatives, Tan 10 improved background value and redefined the solution formula for background value. Bo and Wei 11 established a new GM with a higher prediction capability by using the weighted mean of forward and backward difference quotients as the whitening value of grey derivative of GM model. Yuan et al. 12 established a hybrid model by combining autoregressive integrated moving average (ARIMA) model with GM model to predict the energy consumption of China. Gatabazi et al. 13 combined the grey model and Lotka-Volterra model to assess the interaction between cryptocurrencies. Zeng et al. 14 established a new grey dynamic prediction model, a linear correction term, and a random disturbance term to the traditional GM (1, N) model to improve the prediction accuracy. In order to predict the non-equidistant sequences with integral range or digital range, Yao et al. 15 proposed a generalized discrete grey model. By adopting background value optimization and central-point triangular whitenization weight function in GM and Markov chain, Ye et al. 16

Methods and innovations.
Similar to other methods, the grey model method also bears the limitation of insufficient accuracy and large error. Hence, the issue of improving the accuracy on the premise of multiple types of input has received considerable critical attention from researchers dedicated to GM. An effective way to correct and improve the simulation accuracy, which is called residual grey model, is to set a model for actual sequence value x (0) (k) and the residual sequence ε (0) (k) of analog sequence value x (0) (k) . Although the residual grey model simulation is known for its high accuracy, it is set under restricted conditions, that is, the tail segment eligible for modeling is linear with the same symbol. However, in reality, most sequences are in wave form or highly non-linear [23][24][25] . It is impossible to construct grey models for them to use the method of the residual tail. This paper proposes a new method based on Populational Entropy Based Mind Evolutionary Algorithm-Error Back Propagation Training Artificial Neural Algorithm (PEMEA-BP) to correct the residual tail segment to solve this problem. The basic idea is as follows: (a) Using the BP neural network to realize the mapping from N dimension to M dimension space and the ability to imitate multiple functions without having to assume that there is a certain relationship between data [26][27][28] . Take the residual tail as sample, enter it into the trained BP artificial neural network model, and obtain the effective residual sequence prediction value ε (0) (i) ; (b) To solve the problems that the BP artificial neural network is apt to fall into the local minimum and has low convergence speed, this new method adopt the Populational Entropy Based Mind Evolutionary Algorithm (PEMEA) to modify and output optimal connection value; (c) Obtain the final predicted value through residual grey model theory. The improved algorithm has the advantage of small GM residual model sample, high advantages of accuracy and the expanded the use scale which even covers the various nonlinear and multidimensional object. The practical application demonstrated that is algorithm is superior to other mainstream algorithms not only in analog accuracy but also in convergence speed. In brief, this paper contributes in two aspects: (a) Our algorithm extends the use of the grey residual model, mainly expands the applicable scope of tail-segment data to include data with different sign and non-linear data. (b) We bring forward an algorithm to rectify the disruptive nature of BP via PEMEA, that is its tendency toward local optimality and slow convergence.

Residual grey model
Grey model is among the most widely used model of the grey prediction theory, especially the mean value GM (1, 1) model proposed by Professor Deng Julong. When the mean G M (1, 1) modeled fail to meet the requirements, the residual model is adopted and amend it. The construction process of mean G M (1, 1) model is as follows: 1. Construct the 1-AGO sequence of X sequence 29 .
3. Construct and solve the whitening differential equation.
Set x (0) (k) + az (1) (k) = b as the mean value form of G M (1, 1), hence the whitening differential equation would be: Set the parameter vector as â = (a, b) T , therefore least squares method could be used to estimate 4. Calculate the response time.
Parameter vector â could be calculated from (4) and (5), therein-a is development coefficient, which reflects the development trend of x (1) and x (0) , and b is the gray action. The time response of x (1) (k) would be: From (6), the reduced reduction equation would be: And the analog sequence would be obtained from (8).
The prediction results are evaluated by square sum error (SSE), mean absolute error (MAE), mean square error (MSE), mean absolute percentage error (MAPE), and mean relative error (MRE), as in Eqs. (9) to (13): . . . If the accuracy is not up to the requirement, the residual tail segment method is used for correction. The residual sequence is defined as: If ∀k ≥ k 0 , the symbol of k 0 is the same as that of ε (0) (k) and n − k 0 ≥ 4 , then is modellable residual segment, which can be constructed according to steps (1) to (4). Its response time after the reduced reduction correction is: That is, the analog value of the G M (1, 1) model is used as the prediction result before k 0 , and the simulated value after the residual segment compensation is used as the prediction result after k 0 . Then perform the error test again and put it into use.

BP artificial neural algorithm and thinking evolutionary algorithm based on population evolution entropy
BP artificial neural algorithm. Artificial neural network can simulate human brain to guide the process some highly complex nonlinear problems through simple algorithms. It is a complex network system that reflects the essential characteristics of human brain 30 . Artificial neural network has the characteristics of distributed storage, parallelism and adaptability, etc. which can effectively deal with some uncertain and ambiguous problems, because it is an operational model 31 . BP neural network is the most widely used artificial neural network, which mainly trained by error back propagation, usually descent method 32 , i.e., the correction is completed in accordance with the direction of the negative gradient of the error function. It includes the following two directions: (a) Signal forward propagation. The sample data enters the input layer, passes through the hidden layer, and outputs the result at the output layer. The output data is compared with the expected value, and if the expected value is met, end the process. Otherwise, it will be returned in the reverse direction. (b) Error back propagation. If the output value greatly differentiates from the expected value, the error signal would propagate backwards, from the output layer to the hidden layer to the input layer, the value and threshold are continuously modified during the propagation process to minimize the error value.
Taking the three-layer BP neural network as an example, the input vector is X = (x 1 , x 2 . . . , x i , . . . x n ) T , the hidden layer input vector is Y = (y 1 , y 2 . . . , y j , . . . wherein v j represents the neuron value vector of j in the hidden layer, the value matrix of hidden layer to the output layer is W = (w 1 , w 2 . . . , w k , . . . w l ) T , in which w k represents the neuron value vector of k in output layer .
For the hidden layer: For the output layer to satisfy: The activation function of each layer can be a unipolar, bipolar Sigmoid or linear function. For a three-layer BP artificial neural network (one input layer, one hidden layer, and one output layer), its algorithm process is: 1. Initialization. Initialize the value matrix W and V , assign them with random numbers. The learning rate η ∈ (0, 1) , and training precision E min is positive decimal.   Populational entropy based mind evolutionary algorithm (PEMEA). Mind Evolutionary Algorithm (MEA) is an evolutionary algorithm simulating the human mind evolutionary progress, which mainly uses convergence and alienation to replace the individual optimization by group optimization and avoid the defects of genetic algorithm. The convergence operation is the process of becoming the winner through individual competition within the group, while the alienation operation is the process of sub-group competition. This process ensures that new points are continuously explored throughout the solution space. Convergence and alienation operations are iteratively performed until the algorithm termination condition is met. The positive feedback mechanism in MEA is conducive to the development of the group to survive, the negative feedback mechanism to prevent the algorithm premature and avoid falling into the local optimal solution. Structurally speaking, the parallelism of MEA has high search efficiency and is also exceedingly robust to interference 33 .
PEMEA introduces the thermodynamic entropy concept to form an entropy based sampling optimization method to estimate the search space, making exploration more adequate and more purposeful 34 . When solving the optimization problem, the MEA algorithm first randomly generates the initial population of the scale N in the solution space, performs local search in the vicinity of each individual through the convergence operation, and then a new individual is generated globally by the alienation operation to supplement the eliminated partial solution. As evolution progresses, population progress gradually approaches the optimal solution. The population evolution entropy characterizes the degree to which the population is close to the optimal solution. At the beginning of evolution, the distribution is completely random, and the optimal solution is completely undetermined. At this time, the entropy value H is the largest. As the evolution progresses, the population gradually grasps the change of the optimal solution, and slowly determines it until it is completely affirmed. From the change of entropy value, the higher the position of the optimal solution is, the smaller the search range of the algorithm is. The efficiency of the algorithm becomes higher and the entropy value H gradually reduces. When the population is already distributed in the limited range of optimal solution, the entropy value H reaches a minimum. In the PEMEA algorithm, the alienation operation ensures the global traversal of the population, avoiding local optimization, and the convergence operation achieves the task of "fine search". Therefore, linking the change of evolutionary entropy with the convergence search width will improve the searching efficiency of MEA.
Set σ i as the i generation of convergence variance, M as population size, m i represents the individual in the population which is assigned to the interval i, p i represents the probability that an individual appears in interval i. Ĥ P (i) is the evolutionary entropy estimate of the i generation population, and the relationship between σ i and Ĥ P (i) is expressed as follows: Evolutionary entropy as: The steps of the PEMEA algorithm are as follows: www.nature.com/scientificreports/ 1. Initialization. The initial population is randomly generated in the solution space, and the score is calculated. The score function is the reciprocal of the mean square error of the sample. Select N S highest individuals to form the winner sub-population, publish it on the global bulletin board and sort them, and the rest are temporary sub-populations, which are randomly distributed to form N T temporary sub-populations. 2. Convergence. The convergence operation is carried out in the above two sub-populations, and the progeny individuals are randomly generated centering on the parent sub-population, and the production process is as shown in (29). Then, the local search and competition are conducted among the winners to generate the new winners are generated. The individual information will be published on the local bulletin board, and the score of each sub-population winner is the score of the sub-population.
wherein r is the random number generated by the standard normal distribution N(0, 1) . Equations (25) to (29) indicate that as the entropy value becomes smaller and smaller, the search width becomes smaller and smaller, the search accuracy would become finer and finer, and the search efficiency also increases. 3. Alienation. The alienation operation is carried out in a global scope, and the sub-populations with low scores are replaced by sub-populations with high scores, and the sub-populations that are replaced are redistributed in space to form new temporary sub-populations. 4. Judgment convergence. If the conditions to end the process is not reached, repeat (25) to (29).

Residual GM network model based on BP-PEMEA correction
Reasons behind BP-PEMEA. Since its inception, GM has become essential for a wide range of fields and achieved considerable promising application results. But it is not perfect. The biggest challenges are its large prediction bias and narrow scope of application 35 . The modellable residual tail segment can effectively correct GM to improve the prediction accuracy, but it strictly limited the conditions that at least more than 4 tail segments should have the same residual sign. Geometrically speaking, the whole simulated sequence tail segment must be adjusted above or below the actual sequence segment and to be corrected through providing reverse adjustment. However, such a situation is not shared in practical applications; most practical situations present the feature of volatility or alternation, which can greatly limit the application of GM.
This paper includes BP artificial neural network to modify the tail segment mainly due to its three characteristics: (a) Its capability of simulating a variety of functions, such as nonlinear functions, piecewise functions, etc. (b) It does not require to assume in advance that there is a certain type of functional relationship between the data, and the artificial neural network can establish the correlation relationship according to the provided training data and its own attributes without designing the parameter distribution in advance. (c) It can realize high information utilization and effectively avoid the loss of information triggered by positive and negative offset in the data processing process. Therefore, the artificial neural network is particularly suitable for residual correction of the GM (1, 1) model and effectively provide the required "supplemental amount". However, BP artificial neural network also has its own shortcomings, the most crucial drawbacks are: (a) The learning speed of convergence is slow. Gradient descent method is the core of BP algorithm. Because of the complex and variable nonlinearity of its processing, the appearance of "zigzag phenomenon" is inevitable. In the flat area of the error surface, the error gradient will have some small changes. Even with a larger value adjustment, the error reduction is still slow. (b) It is easy to get a local minimum. After the initial value is given to the network, the value is adjusted according to the forward direction and error reversed. If the initial value is improperly assigned, it may fall into a local minimum. Therefore, the BP algorithm needs to be further modified. According to the current mainstream algorithms, the BP model based on genetic algorithm (GA-BP) has higher accuracy, but its convergence speed is slower, and it is not guaranteed to obtain the global maximum. This is because the GA algorithm's crossover and mutation operations can produce both good genes and inferior disruptive genes, indicating that evolution is not oriented in genetic algorithms. To solve the above-mentioned problems, we use PEMEA to amend the BP artificial neural networks. Unlike genetic algorithms, MEA records the competition information of individual and sub-populations for each iteration, allowing evolution to move in a favorable direction. In other words, evolution is directional in MEA. Meanwhile, the convergence and dissimilation operations in MEA algorithm represent the selection within the sub-population and the whole group respectively, and the two processes are developed in parallel to improve the global search efficiency of the whole system. On the basis of MEA, the meaning of information entropy is introduced, that is, with the development of evolution, the position change of the population to the optimal solution is determined from complete uncertainty to final affirmation and the search range becomes smaller and more detailed. Linking the change in information entropy to the search width also further improves search efficiency 36-38 . The procedure of residual GM based on PEMEA-BP correction. After PEMEA algorithm output the optimal connection value to the BP artificial neural network, the residual BP sequence will be simulated by a trained BP artificial neural network to provide the "replenishment amount" required for the entire GM model. In this way, it can not only have the advantages of GM to simulate small samples with high precision, but also expand the scope of use to various nonlinear or even multi-dimensional objects. Moreover, it can avoid the defects that BP artificial neural network converges slowly and is easy to fall into local minimum. The specific steps are as follows: Scientific Reports | (2020) 10:21540 | https://doi.org/10.1038/s41598-020-77630-w www.nature.com/scientificreports/ 1. Establish a system behavior time series X (0) according to (1) and (2) and then generate a 1-AGO sequence X (1) and an immediate sequence Z (1) .The construction of these two sequences is a param feature of GM, which aims to further uncover the information inherent in these seemingly erratic data. 2. Using the least squares estimation to obtain the parameter vector â according to (3) to (8), the obtained time response equation X (0) and the subtractive reduction equation x (0) (k) , then establish a simulation sequence.If the requirement for simulation accuracy is low, a preliminary simulation can be performed at this time, but the simulation value gradually increases with the prediction time. 3. Calculate the error and use it if the accuracy meets the requirements according to (9) to (11); otherwise, establish a residual sequence ε (0) in accordance with (13). Use the residual GM method if the residual tail segment modeling condition is met. If not, normalize the residual sequence.The purpose of data normalization is to allow pre-processed data to be confined to a certain range, thus eliminating the effects of differences in magnitude, etc. 4. Use the residual sequence to generate the test set and training set, determine the numbers of input layer, hidden layer and output layer nodes, and construct the topology of BP artificial neural network. 5. Encode the network connection value, determine the score function, and generate the initial population according to the score function. Rank the individuals according to the score, and the individuals with high scores are taken as the center, and new individuals are generated in the vicinity of the individual to form the superior subpopulation and the temporary sub-populations; and publish them on the global bulletin board. 6. Perform a convergence operation in the sub-populations. Determine whether each sub-population is mature, and if true, end the convergence; otherwise, generate progeny population around the parent according to the Eq. (29) and continue the convergent operation until the sub-population matures. Each individual information is announced on a local bulletin board; and set the highest score of each subpopulation as its group score. 7. Perform an alienation operation in the global scope. If the temporary sub-population score is higher than the matured sub-population, then replaced it. Then redistribute the individuals within the replaced subpopulation in space to form new sub-populations; otherwise, release the temporary sub-population. 8. Determine the convergence. If it converges or reaches the end condition, proceeds to step (9), otherwise returns to step (6). 9. Decode the optimal individual and set it as the value of BP artificial neural network. Complete the training of BP network by using the test set and expected value in step (4). 10. Predicate residual sequence {ε (0) (L)} by the trained BP network and construct a new simulation sequence The simulated sequence is the predicted value of the combined model. 11. Calculate the error accuracy.
The PEMEA-MP modified GM residual model flow chart is shown in Fig. 1.

Empirical study
Parameter determination. Compared with the grey prediction model, the artificial neural network has a powerful learning ability. It can learn from the predictable mutation data to predict the occurrence of some special situations. However, artificial neural networks also have their weaknesses, that is, they require a large amount of widely representative training data, which is difficult to provide in actual practice. And the untrained artificial neural network will have large margin of error when making predictions. If the neural network prediction completely replaces the grey prediction, then the smooth data that accounts for most of the data must be trained. Too many training modes will necessarily require a larger network structure, which reduces the learning efficiency and consumes considerable resources, and the learning of a few special data points may also be overwhelmed by a large amount of normal data, which makes it not prominent enough. Neural network prediction is not suitable for process prediction with stable processes but sudden change points [38][39][40][41][42][43] .
Data training and input layer determination. Set e (0) (L) as residual sequence. If S is the prediction order, the input samples for network training are e (0) (i − 1) , e (0) (i − 2), . . . ,e (0) (1 − S),and e (0) (i) is the corresponding output samples of the network, where i = 1,2,..., n. Here, the prediction order is 3, which means that the number of network input layers is 3.
Data volume determination. Randomly generate 10,20,30,40,50,60, 70 data, and fit the BP, GENETIC-BP, and PEMEA-BP algorithms to obtain the mean square error as shown in the following Table 1.
To be more intuitive, the above values are normalized and displayed in the following Fig. 2.
Although the grey prediction model studies "some information is known and some information is unknown" "small sample" and "poor information" uncertain systems, if you want to optimize the grey prediction model by neural network, you need to determine the minimum data size. As can be seen from the Table 1 and Fig. 2, BP can converge when the amount of data is small, and it is difficult to converge to the global optimal value when the amount of data is increased. GENETIC, PEMEA is difficult to converge to the optimal value when the amount of data is small, the amount of data is increased, and the accuracy is gradually accurate. As can be seen from the figure above, when the amount of data reaches 50, the error of the BP algorithm increases significantly. Therefore, the number of residual tails in this experiment is 40.    Table 2, and the number of confirmed cases from July 19 to July 31 as the test data of residual tail in Table 3. According to Eqs. (4) to (8), a = − 0.0513 and b = 51434. The simulation diagram is shown in Fig. 3. From the simulation, the average simulation relative error of the original model is 1.0224%, the error is too high, and the residual sequence ε (0) does not meet the modeling conditions of the tail section.   Table 4.
To be more intuitive, the above values are normalized and displayed in Fig. 5. It can be seen from Table 4 and Fig. 5 that PEMEA-BP has significantly improved in time and accuracy compared with BP and GENETIC-BP.This model aims at the situation that there are many uncertain factors in small samples, so there are still some relative errors. It is more suitable for a macro relatively accurate prediction. However, when it comes to a specific point, it is still neural network and ordinary differential equation with known variables that are more accurate.
Prediction accuracy. The residual sequence predicted by the BP network training model is {ê (0) (L)} , and the predicted value constructed using this predicted value is x (0) (i, 1) =x (0) (i) +ê (0) (i) . The predicted value x (0) (i, 1) is obtained by the combination model of grey and neural network.The forecast accuracy table is shown in Table 5.
To be more intuitive, the above values are normalized and displayed in Fig. 6. From Table 5 and Fig. 6, it can be seen that the residual GM modified by PEMEA-BP greatly compensates for the lack of accuracy of GM.The accuracy and BP convergence rate of GM in the case of inconsistent residual tail symbols are effectively compensated.

Conclusion
The GM method is widely used because it can effectively solve the problem of "less data" and "poor information", but it has high requirements on the input data, that is, the input tail data should be linear and bear the same sign. However, in reality, More sequences present waveform or highly non-linear features. If these characteristics are not met before input data, the prediction accuracy will be low. The algorithm proposed in this paper uses the residual tail as a sample to input the trained BP artificial neural network model, which can obtain an effective residual sequence prediction value ε (0) . BP artificial neural network has the characteristics of being easy to fall into a local minimum and slow convergence. This is corrected by PEMEA to output the best connection weight. Finally, the residual grey model is used to obtain the final predicted value. The residual grey model modified by PEMEA-BP not only has the advantages of GM, i.e. small samples and high accuracy, but also can expand the scope of use to various non-linear and even multidimensional objects. Meanwhile, it can avoid defects of other algorithms, such as slow convergence and easy to fall into the local minimum. In small sample data experiments, judging from SSE, MAE, MSE, MAPE, MRE and other indicators, this new algorithm has significant advantage over GM, BP algorithm and combined genetic algorithm in terms of simulation accuracy and convergence speed.