Comparison of Forecasting Energy Consumption in East Africa Using the MGM, NMGM, MGM-ARIMA, and NMGM-ARIMA Model

: Forecasting energy demand is the basis for sustainable energy development. In recent years, the new discovery of East Africa’s energy has completely reversed the energy shortage, having turned the attention of the world to the East African region. Systematic research on energy forecasting in Africa, particularly in East Africa, is still relatively rare. In view of this, this study uses a variety of methods to comprehensively predict energy consumption in East Africa. Based on the traditional grey model, this study: (1) Integrated the power coe ﬃ cient and metabolic principles, and then proposed non-linear metabolic grey model (NMGM) forecasting model; (2) Used Auto Regressive Integrated Moving Average Model (ARIMA) for secondary modeling, and then developed a metabolic grey model-Auto Regressive Integrated Moving Average Model (MGM-ARIMA) and non-linear metabolic grey model-Auto Regressive Integrated Moving Average Model (NMGM-ARIMA) combined models. In terms of the prediction interval, the data for 2000–2017 is a ﬁt to the past stage, while the data for 2018–2030 is used for the prediction of the future stage. To measure the e ﬀ ect of the prediction, the study used the average relative error indicator to evaluate the accuracy of di ﬀ erent models. The results indicate that: (1) Mean relative errors of NMGM, MGM-ARIMA, and NMGM-ARIMA are 2.9697%, 2.0969%, and 1.4654%, proving that each prediction model is accurate; (2) Compared with the single model, the combined model has higher precision, conﬁrming the superiority and feasibility of model combination. After prediction, the conclusion shows that East Africa’s primary energy consumption will grow by about 4 percent between 2018 and 2030. In addition, the limitation of this study is that only single variable are considered.


Introduction
Energy forecasting is the basis for countries and regions to develop energy development strategies and achieve sustainable energy using. Africa is rich in energy resources. In recent years, the new discovery of energy in East Africa has completely reversed the situation of energy shortage and put the energy industry on the track of rapid development. At the same time, the world has turned its attention to East Africa. However, most of the existing research on energy in Africa focuses on North Africa, Southern Africa and sub-Saharan Africa, which provides a gap for our research [1,2]. Therefore, a comprehensive analysis of East Africa's energy consumption by various methods will be helpful to the mastery of East Africa's energy in the future.
Taking East Africa as an example, this work forecasts the primary energy demand from 2018 to 2030 with the help of the primary energy consumption from 2000 to 2017 published by BP Statistical Review of World Energy 2018. Forecasting results will provide insights into rational allocation for existing resources in East Africa, which will be conducive to coping with future opportunities and challenges and formulating sustainable development strategies. In this paper, two categories and five methods are utilized to predict the primary energy demand in East Africa. First, NMGM (non-linear metabolic grey model) forecasting model is proposed by integrating the power coefficient and metabolic principles to grey model (GM) model. Then, based on the strategy of quadratic modeling, the combined metabolic grey model-Auto Regressive Integrated Moving Average Model (MGM-ARIMA) and non-linear metabolic grey model-Auto Regressive Integrated Moving Average Model (NMGM-ARIMA) models are developed. According to the forecasting results of various methods, the future energy consumption in East Africa will be more comprehensively reflected.
The structure of this paper is as follows: the second section mainly reviews the research on energy forecasting in Africa and the development and application of GM and ARIMA Model. The third section mainly explains the prediction principles and steps of the five methods. The fourth section shows the actual prediction process and related parameters. Fifth section summarizes the entire paper.

Literature Review
This section begins with a review and discussion of African energy forecasting studies. Then the development of Grey model and ARIMA model and related applications in recent years are discussed. Finally, based on the above analysis, this section gives a summary of the existing literature.

Review of Energy Research in Africa
For the whole of Africa, Mulugetta et al. [3] made an economic assessment of biodiesel and studied the energy transition [4]. Sanoh et al. [5] analyzed the optimal project for supplying electricity to national economies by using high voltage lines. Mentis et al. [6] assessed the potential of wind energy technology. Ouedraogo et al. [7] studied the long-term sustainable electricity supply and demand. In addition, other scholars have studied the issue of renewable energy technologies [8] and development [9]. Besides, energy research in Africa is generally carried out by region, i.e., North Africa, West Africa, East Africa, Central Africa, Southern Africa, and sub-Saharan Africa.
For North Africa, Tsikalakisa et al. [10] studied the best way of use solar energy in MENA countries [11]. Lacher et al. [12] discussed potential threats to energy security and the development of renewable energy plans. For West Africa, Gnansounoua [13] discussed the prospects for the development of the West African electric power industry. Lee and Leal [14] provided a systematic review of the energy planning (EP) activities being conducted in the Economic Community of West African States (ECOWAS). Ameyaw et al. [15] predicted and discussed the relationship between CO 2 Emissions and GDP in five West African countries. For East Africa, James [16] discussed energy transformation in rural. Tigabu et al. [17] analyzed technology innovation systems (TIS) by comparing Kenya with Rwanda. For middle Africa, Kenfack et al. [18] used Cameroon as an example to discuss renewable energy and energy efficiency in Central Africa.For Southern Africa, there are relatively few studies. Conway et al. [19,20] discussed the relevance between climate and water-energy-food. Then they studied hydroelectric plans in Southern and Eastern Africa.Rafeya et al. [21] studied the implications of the Medupi coal-fired power plant in South Africa Fant et al. [22] assessed the impact of climate change on wind and solar energy resources. For sub-Saharan Africa, Bazilian et al. [23] used long-term forecasting methods to forecast installed generation capacity. Esso [24] studied the relationship between threshold cointegration, causality, energy use and growth. Al-mulali [25] and Kivyiroab et al. [26] studied the relationship between energy consumption and CO2 emissions and economic growth, respectively. Asumadu-Sarkodie et al. [27] forecasted Nigeria's energy consumption by an econometric approach. Emodia et al. [28] explored the relationship between energy supply and demand and carbon emissions from 2010 to 2040. Another researcher studied the relationship between Nigeria's carbon dioxide emissions and GDP [29]. Wu et al. [30] predicted South Africa's carbon dioxide emissions. Lebotsa et al. [31] tested the forecasting model using South Africa's electricity consumption and made a prediction of short-term electricity demand. Sigauke et al. [32] predicted daily peak load demand in South Africa. Moreover, scholars have studied the price and income elasticity of South Africa's oil import demand [33], the economic growth and Electricity consumption [34].
In summary, a review of the literature on energy forecasting in Africa reveals that there is relatively more energy research in North Africa and sub-Saharan Africa and less systematic research on primary energy consumption projections in East Africa.

Review of Grey Model
The grey theory, first put forward by Professor Deng [35], is the theory that some of the information is unclear and has an uncertain phenomenon. The resulting Grey Model is commonly used in the field of prediction. Xie et al. [36] used grey model to predict China's energy demand and self-sufficiency rate. Mao [37] used GM (1,1) in vehicle fatality risk estimation and got accurate prediction. Jouini et al. [38] applied GM(1,1) model to forecast historical medical sensor data towards system preventive in smart home e-health for elderly person. Jiang et al. [39] applied grey model to the operating energy performance of air cooled water chillers. Although GM is widely used in forecasting, there is room for improvement. As for the GM model, the data obtained by the prediction are not fully utilized. Therefore MGM (grey model of metabolism) improved the grey model according to the principle of metabolic, added the latest predicted data into the original data for grey prediction again, and so on to obtain the predicted value of the target. At present, it is also commonly used in the field of prediction. Wang et al. [40] applied GM and MGM to forecast the consumption of coal in the US. Truong et al. [41] studied the feasibility of applying MGM (1,1) to real-time control of wave energy converters (WECs). Tang et al. [42] combined MGM with BP neural network to construct a tandem Grey Neural Network model for load forecasting of smart grid. Lee et al. [43] used MGM model and GM model to evaluate air quality in traffic tunnels. Wang et al. [44] applied MGM to forecast future energy consumption in China and India. Akay et al. [45] used Grey prediction with rolling mechanism (GPRM) to forecast the Turkey's total and industrial electricity consumption. Kumar et al. [46] used a variety of models to predict India's energy consumption. Among them, MGM was used to predict India's coal consumption. Despite the fact that MGM models are used more in energy prediction, they become inaccurate when the time series is nonlinear. By adding the power factor β to the MGM model, a new model, the non-linear metabolic grey model (NMGM), has been created. It is a nonlinear prediction method, which obtains both linear and nonlinear prediction results by proper adjustment of power coefficient, so that the results are more accurate. Today, energy forecasting is widely available. Wang et al. [47] established the NMGM model and applied it to the prediction of shale oil production in the United States and compared with other three model [48]. Later, NMGM served several times in the field of energy forecasting [49].
Furthermore, other researchers have enhanced the Grey model. For instance:Lee et al. [50] combined genetic programming with grey model to improve the grey model. Bahrami et al. [51] used PSO (particle swarm optimization) algorithm to improve the grey model and used the model to forecast the short-term electric load. Ding et al. [52] improved grey model byalterable weighted coefficients and rolling mechanism. Chen [53] investigates forecasting by using novel nonlinear grey bernoulli model (NGBM). Xu et al. [54] proposed a adaptive grey model with buffered rolling method. Zeng et al. [55] proposed a new multivariate grey model by combining multivariate grey model with univariate grey model. Li et al. [56] used BP (Back Propagation) to improve the NMGM model. To sum up, after years of development, the grey model has been optimized in more and more ways, and the prediction effect has become better and better.

Review of ARIMA Model
ARIMA Model is recognized as Autoregressive Integrated Moving Average Model and abbreviated as ARIMA. It is a famous time series prediction method proposed by Box and Jenkins in the early 1970s [57]. The basic idea of the ARIMA model is to process the data sequence formed by the predicted object into a random sequence over time, which is roughly described by a precise mathematical model.
Once identified, the model can predict future values from the past and present values of the time series. Nowadays, ARIMA model is applicable to ecological, economic, energy and other aspects of time series prediction. In terms of ecology, Kumar et al. [58] applied ARIMA to the prediction of atmospheric pollutants (Ozone, carbon monoxide, nitric oxide, nitrogen dioxide) and could effectively predict short-term atmospheric pollutants. Nieto et al. [59] used four models to predict PM10 concentration, including ARIMA. Aasim et al [60] proposed combined repeated wavelet transform and ARIMA to forecast short-term wind speed. S. Swain et al. [61] applied ARIMA to forecast Monthly Rainfall. On the economic front, Nyangarika et al. [62] used the modified ARIMA model to predict oil prices. Prasad et al. [63] applied ARIMA model to the prediction of India's total export value. Hossain et al. [64] used ARIMA to forecast the prices of motor, mash and mung. For energy, Edigera et al. [65] used ARIMA to forecast Turkey's primary energy consumption and found that the ARIMA forecasting of the total primary energy demand appears to be more reliable than the summation of the individual forecasts. Musaylh et al. [66] used ARIMA to forecast short-term electricity demand in Australia. Jiang [67] take advantage of ARIMA to calculate China's coal consumption and price from 2016 to 2030. Mehedintu et al. [68] used five single methods to predict the share of renewable energy consumption in total consumption in 2020, including ARIMA model. It can be seen that ARIMA model is widely used, and the accuracy of prediction results is also accepted by researchers. Because the application of ARIMA model has been paid a lot of attention, so many researchers have made optimization and improvement of the ARIMA model. For instance, Wang et al. [69] combined ARIMA with MNGM to establish the MNGM-ARIMA model that produced more accurate forecasting results. Ludlow and Enders [70] found that a non-linear time-series can be represented by a deterministic time-dependent coefficient model without first specifying the nature of the non-linearity. Chen et al. [71] proposed a nonlinear ARIMA model based on SVR (support vector regression). Zhang et al. [72] combined EEMD and ARIMA to establish the EEMD-ARIMA model to predict hotel daily occupancy rate, which has obvious advantages in short-term prediction Celestino et al. [73] combined ARIMA and SVM models for the remaining useful life of aircraft engines forecasting. Lee et al. [74] combined ARIMA model with genetic programming to improve both models and commit the effectiveness of the new model. Baraka and Sadegh [75] proposed a hybrid ARIMA-ANFIS (Adaptive Neuro Fuzzy Inference System) algorithm which based on three different pattern. Dindarloo [76] compared ARIMA and ANN (Artificial Neural Network). Daz-Roblesa et al. [77] combined ARIMA with ANN (Artificial Neural Network) to predict particulate matter in urban areas. Wang et al. [78] combined ARIMA with ANN to forecast shale gas monthly production in Pennsylvania and Texas of the United States and compared with single model and the result of application shows the advantages of this method. Zhang et al. [79] improved MEEMD-ARIMA model by using PE. Matyjaszek et al. [80] used the full time series, GRNN (generalized regression neural network) models to improve ARIMA model. These improvements make ARIMA's predictions more convincing.
Although GM and ARIMA model have been widely used in real life, there is still room for improvement. Therefore, the model needs to be strengthened to get more accurate predictions. At present, there are roughly three improved methods. First, put together a few single models to predict and compare prediction accuracy, and finally put the results together to show or select the most accurate model. Secondly, the theory of single model is improved. For example, the MGM model, the NMGM model. Third, the combination of more than two models complements the advantages to achieve more accurate results.
Based on this, this study has the following contributions: (1) From the existing research, it was found that the systematic prediction of energy resources in East Africa is a gap. This study predicts primary energy demand in East Africa from 2018 to 2030. The forecasting results will be helpful for a comprehensive understanding of the current energy situation in East Africa and for the prospects of energy development.
(2) For more accurate prediction, various prediction methods have been developed and used in this study. On the one hand, NMGM (non-linear metabolic grey) forecasting model was proposed by integrating the power coefficient and metabolic principles to GM model. On the other hand, the improved grey model and ARIMA model are combined by the strategy of secondary modeling, thus resulting in MGM-ARIMA and NMGM-ARIMA models.

Method
This section will detail the operation of five models used to predict primary energy consumption in East Africa one by one. Five are MGM, NMGM, ARIMA MGM-ARIMA, and NMGM-ARIMA, of which the latter two models are combinations of the first three models. The relevant formulas and steps will be presented. In addition, a formula for measuring the prediction accuracy of the five models is attached at the end of this section.
For ease of understanding, Table 1 presents the meaning of the relevant symbols in the formulas.

Notation Explanation Notation Explanation
Matrix of data and constants q Order of moving average C n Matrix of data

MGM Model
MGM model is a shorthand for metabolic grey model. This method uses the obtained data sequence to establish the grey differential equation. The objective is to obtain the law of these data and predict the future data. Assume that the original data sequence is: . . . , X (0) (n)}. In most cases, the original data's rules are not obvious, and cannot be directly used for modeling. For the sake of getting a more stable time series data, we accumulate it and get the once accumulated sequence (1-AGO): After that, the following differential equation is established by means of the obtained cumulative sequence: For differential Equation (1), the cumulative matrix D, constant term C n and the values of 'a' and 'b' are obtained by using the least square method. The construction results are as follows: Put the calculated value of "a" and "b" into the Equation (1) to get the result. Since the results are also cumulative sequences, the predicted values are obtained by cumulative subtraction.
The forecast is calculated as follows:

NMGM Model
The NMGM model is called the nonlinear metabolic grey model, which is a nonlinear prediction method and an improvement of MGM. The difference between NMGM and MGM is the addition of power factor "β". When the data is non-linear, MGM becomes inaccurate. Therefore, by properly adjusting the power coefficient, the results will be more accurate when considering linearity and nonlinearity. In general, grey predictions are calculated using 4 to 10 data, and here are five data for convenience. Suppose the original time series data is: X = {X(1) X(2) · · · X(n)}. The steps of the calculation are as follows: i. Extract 5 pieces of data from the original data: ii. Get the cumulative sequence: Based on (7), get the linear addition sequence: iii. On the basis of (7) and (8), the differential equations of NMGM are as follows: After the differential equations are listed, the following equations are used to solve them: Referring to the fourth-order Runge-Kutta, the equation is iv. The cumulative sequence of the predicted value can be obtained from the iii, and the predicted values are obtained by deducting it. The formula is as follows:

ARIMA Model
The principle of ARIMA is to transform the non-stationary time series into stationary time series, and then return its lag value and random error term and establish a model. In fact, ARIMA model consists of auto-regressive (AR) model and moving average (MA) model. On the one hand, AR can describe the relationship between the current value and the historical value. On the other hand, the historical time data of the variable itself can also be used to estimate and predict itself. The MA model is devoted to the accumulation of error terms from the regression model, which can effectively eliminate the random fluctuations in the prediction.
The p-order autoregressive formula AR (p) is: Where the ε t is the error term. The q-order moving average formula is MA(q) for: By combining AR (p) and MA (q), the autoregressive average moving formula ARMA (p, q) is obtained as follows: Firstly, aiming to meet the requirement of stability, the order in which the time series becomes smooth is denoted as "d". Secondly, the two specific parameters related to AR and MA are "p" and "q". "P" is called autoregressive term, and "q" is called moving average term. Therefore, the ARIMA model can be written as ARIMA (p, d, q). In addition, set the original time series In the process of solving the Equation (19), it is found that Y * t can be represented by Y t , the specific formula is as follows:

MGM-ARIMA and NMGM-ARIMA Model
Based on three single MGM, NMGM, and ARIMA models, this study conducted a combination of models and proposed MGM-ARIMA and NMGM-ARIMA. The principle is to use the MGM and NMGM for initial forecasting, and then recalibrate the error series by ARIMA, so as to reduce the error and get more accurate prediction results. Therefore, the prediction steps for combining models include three parts. First of all, the predicted value is obtained and then the error is corrected and new error sequence is obtained. Finally, the novel predicted value can be obtained by subtracting the predicted value obtained by MGM from the new relative error time series.
For ease of understanding, set the error series to be: Figure 1 shows this process.

The Comparison of Five Models and Formulas for Measuring Accuracy
Based on the interpretation of these five methods, the conclusions shown in Table 2 are derived. Besides, mean absolute per error (MAPE) is used to measure the accuracy of the model. The formula is equation (22). Raw data: Residual Sequence:

The Comparison of Five Models and Formulas for Measuring Accuracy
Based on the interpretation of these five methods, the conclusions shown in Table 2 are derived. Besides, mean absolute per error (MAPE) is used to measure the accuracy of the model. The formula is Equation (22).
Accordingly, the predicted goodness can also be calculated based on the relative error. The formula is as follows: Figure 2 shows the primary energy consumption in East Africa and the growth rates from 2000 to 2017 (data from the BP Statistical Review of World Energy 2018). The data demonstrates that the overall trend in primary energy consumption in East Africa is increasing. Since 2008, the overall trend has remained relatively stable.

Empirical Results and Discussion
Built on the explanation of Figure 2. This section mainly demonstrates the prediction process of the five models, MGM, NMGM, ARIMA, MGM-ARIMA, and NMGM-ARIMA, the generation of relevant parameters and the fitting data. In addition, after the fitting results are obtained, the accuracy of the five models is analyzed and compared with the original data. Then make a forecast of the energy consumption of East Africa from 2018 to 2030.

Forecasting Process of MGM Model
Using the raw data, first step adds up to a cumulative time series. As shown in Figure 3, the cumulative processing of the data becomes more stable. In the second step, the accumulated sequence is used to establish the differential equation, and as mentioned in Equation (4), the parameters "a" and "b" are calculated by the least square method, as shown in Table 3.

Forecasting Process of MGM Model
Using the raw data, first step adds up to a cumulative time series. As shown in Figure 3, the cumulative processing of the data becomes more stable.

Forecasting Process of MGM Model
Using the raw data, first step adds up to a cumulative time series. As shown in Figure 3, the In the second step, the accumulated sequence is used to establish the differential equation, and as mentioned in Equation (4), the parameters "a" and "b" are calculated by the least square method, as shown in Table 3.  In the second step, the accumulated sequence is used to establish the differential equation, and as mentioned in Equation (4), the parameters "a" and "b" are calculated by the least square method, as shown in Table 3. Next, this study used the values of parameters "a" and "b" obtained and EXCEL to obtain the fitting value and predicted value.

Forecasting Process of NMGM Mode
As described in the method, the actual operation process of NMGM's prediction is generally divided into two steps. In the first step, the five data of the original time series are operated to get the fitting value from 2000 to 2017 through the cycle. The second step is to use the data from 2013 to 2017 to get the predicted value for 2018, and then put the predicted value of 2018 into the original data, namely metabolism. In other words, the predicted value needs to be used as the known data and used for prediction to get the predicted value of 2018 to 2030.
As mentioned above, a series of power coefficient "β" values can be obtained by using Matlab R2018b, the same goes for a and b. as shown in Table 4. "β", "a" and "b" values in the table can be used to obtain the fitting values and predicted values.

Forecasting Process of ARIMA Model
ARIMA model requires smooth raw data. To stabilize the data, the unit root test, autocorrelation function (ACF) and partial autocorrelation function (PACF) can be the tool. In this work, Eviews 7 was used to obtain the order of the difference required, that is, the value of "d". As shown in Table 5, the first-order difference is performed on the original data. If the test value is less than three critical values, data series pass the square root test. Therefore, the value of "d" is determined to be 1. Since the value of "d" is 1, the autocorrelation function diagram and partial autocorrelation function diagram are drawn by using Eviews 7, as shown in Figure 4. The autocorrelation function graph and partial correlation function diagram of the original time series under the difference of order 1 show that neither of the two functions has the characteristic of 0 after a certain order, and neither of them has the property of censoring, but has the property of trailing. According to the model selection rules, ARIMA model should be selected for prediction.  Since the value of "d" is 1, the autocorrelation function diagram and partial autocorrelation function diagram are drawn by using Eviews 7, as shown in Figure 4. The autocorrelation function graph and partial correlation function diagram of the original time series under the difference of order 1 show that neither of the two functions has the characteristic of 0 after a certain order, and neither of them has the property of censoring, but has the property of trailing. According to the model Next step requires to determine the values of "p" and "q" parameters, aiming to minimize the error of the prediction results. In this step, ARIMA modeler of time series model in IBM SPSS statistics is used to model. In order to obtain more accurate fitting value, the optimal model with high fitting accuracy is selected by referring to the following principles: First, the higher the fixed value R2 is, the better the fitting degree is; Second, the larger the decision coefficient R2 is, the better the fitting degree of the model is; Third, the larger the root mean square error (RMSE) is, the greater the degree of data dispersion is, the worse the fitting degree of the model is, the lower the reliability is. Fourth, the smaller the maximum absolute prediction error MAPE is, the better the fitting degree of the model is. After repeated experiments, the final selected ARIMA (11,1,2). The data required for judgment is shown in Table 6. Table 6. Parameters of the goodness of fit for the ARIMA (11,1,2) Model.  Next step requires to determine the values of "p" and "q" parameters, aiming to minimize the error of the prediction results. In this step, ARIMA modeler of time series model in IBM SPSS statistics is used to model. In order to obtain more accurate fitting value, the optimal model with high fitting accuracy is selected by referring to the following principles: First, the higher the fixed value R2 is, the better the fitting degree is; Second, the larger the decision coefficient R2 is, the better the fitting degree of the model is; Third, the larger the root mean square error (RMSE) is, the greater the degree of data dispersion is, the worse the fitting degree of the model is, the lower the reliability is. Fourth, the smaller the maximum absolute prediction error MAPE is, the better the fitting degree of the model is. After repeated experiments, the final selected ARIMA (11,1,2). The data required for judgment is shown in Table 6.

Forecasting Process of MGM-ARIMA Model
The first step of MGM-ARIMA is to obtain the residual by subtracting the original data from the fitted values obtained from MGM model. After calculation, the fitting values, original data and absolute errors of MGM are shown in Table 7. In the second step, the ARIMA model is used to correct the residual. Firstly, the difference is used to stabilize the relative error. The square root test results are shown in Table 8. We found that the zero-order difference of the relative error has already passed the square root test, so the original error is stable without difference, that is, "d" is 0. Based on the above analysis, the autocorrelation function diagram and part of autocorrelation function diagram are drawn by using "d" value through Eviews 7, as shown in Figure 5. It can be seen that under the first-order difference of the original time series, the autocorrelation function graph and the partial correlation function graph neither has the characteristics of zero after a certain order, nor has the truncation property, but has the trailing property. According to the model selection rules, ARIMA model is selected. To get more accurate results, the ARIMA model of time series model in data mining and analysis tool IBM SPSS statistics is used to model, and after continuous testing, MGM-ARIMA (3, 0, 9) model is selected, and the required data is shown in Table 9. For comparison, we put the relative error of MGM and corrected error into Figure 6. Figure 6 shows that the relative error of MGM becomes smoother after correction by the ARIMA model, indicating that the MGM-ARIMA model is more accurate than the MGM model. Table 9. Parameters of the goodness of fit for the MGM-ARIMA (3,0,9).

Forecasting Process of NMGM-ARIMA Model
As shown in the method, the NMGM-ARIMA model is like the prediction process of the MGM-ARIMA model. Therefore, the prediction process is as follows: first step is to obtain the NMGM-ARIMA residual time series. The fitting value, raw data, and residuals of NMGM are calculated as shown in Table 10.  To get more accurate results, the ARIMA model of time series model in data mining and analysis tool IBM SPSS statistics is used to model, and after continuous testing, MGM-ARIMA (3,0,9) model is selected, and the required data is shown in Table 9. For comparison, we put the relative error of MGM and corrected error into Figure 6. Figure 6 shows that the relative error of MGM becomes smoother after correction by the ARIMA model, indicating that the MGM-ARIMA model is more accurate than the MGM model. Table 9. Parameters of the goodness of fit for the MGM-ARIMA (3,0,9).  To get more accurate results, the ARIMA model of time series model in data mining and analysis tool IBM SPSS statistics is used to model, and after continuous testing, MGM-ARIMA (3, 0, 9) model is selected, and the required data is shown in Table 9. For comparison, we put the relative error of MGM and corrected error into Figure 6. Figure 6 shows that the relative error of MGM becomes smoother after correction by the ARIMA model, indicating that the MGM-ARIMA model is more accurate than the MGM model. Table 9. Parameters of the goodness of fit for the MGM-ARIMA (3,0,9).

Forecasting Process of NMGM-ARIMA Model
As shown in the method, the NMGM-ARIMA model is like the prediction process of the MGM-ARIMA model. Therefore, the prediction process is as follows: first step is to obtain the NMGM-ARIMA residual time series. The fitting value, raw data, and residuals of NMGM are calculated as shown in Table 10.

Forecasting Process of NMGM-ARIMA Model
As shown in the method, the NMGM-ARIMA model is like the prediction process of the MGM-ARIMA model. Therefore, the prediction process is as follows: first step is to obtain the NMGM-ARIMA residual time series. The fitting value, raw data, and residuals of NMGM are calculated as shown in Table 10. In the second step, ARIMA is used to correct the residuals. First, the difference makes the residual stable. The residual of first-order differential has passed the square root test, that is, "d" for 1. Square root test results as shown in Table 11. Based on the above analysis, "d" value is used to draw autocorrelation function and partial autocorrelation function. As shown in Figure 7, the autocorrelation function and partial correlation function graphs of the original time series under first order difference show that the two functions are not truncated after a certain period but have tailing property.  In the second step, ARIMA is used to correct the residuals. First, the difference makes the residual stable. The residual of first-order differential has passed the square root test, that is, "d" for 1. Square root test results as shown in Table 11. Based on the above analysis, "d" value is used to draw autocorrelation function and partial autocorrelation function. As shown in Figure 7, the autocorrelation function and partial correlation function graphs of the original time series under first order difference show that the two functions  Analogous to MGM-ARIMA, in order to obtain more accurate results, the ARIMA modeler of the time series model in IBM SPSS statistics was used for modeling. After continuous testing, the NMGM-ARIMA (4,1,1) model was finally selected, and the required data was determined in Table 12.
To facilitate comparison, we put the residual of NMGM and the corrected error into Figure 8. Figure 8 shows that the residuals of NMGM becomes more stable after the correction of ARIMA model. Table 12. Parameters of the goodness of fit for the NMGM-ARIMA (4,1,1). Analogous to MGM-ARIMA, in order to obtain more accurate results, the ARIMA modeler of the time series model in IBM SPSS statistics was used for modeling. After continuous testing, the NMGM-ARIMA (4,1,1) model was finally selected, and the required data was determined in Table  12. To facilitate comparison, we put the residual of NMGM and the corrected error into Figure 8. Figure 8 shows that the residuals of NMGM becomes more stable after the correction of ARIMA model. Table 12. Parameters of the goodness of fit for the NMGM-ARIMA (4,1,1).

Comparison of Fitting Results by Multiple Model
This section compares the accuracy of the five models and analyzes the performance of the five models, as well as the advantages of the combined model over the single model. Table 13 shows the fitting results of five models. Figures 9 and 10 shows our comparative results.

Comparison of Fitting Results by Multiple Model
This section compares the accuracy of the five models and analyzes the performance of the five models, as well as the advantages of the combined model over the single model. Table 13 shows the fitting results of five models. Figures 9 and 10 shows our comparative results.    It can be seen roughly from Figures. 7 and 8 that the deviation of MGM and NMGM is reduced after being corrected by ARIMA model at some points, which shows that it is reasonable and effective to use ARIMA to correct MGM and NMGM. In other words, the combined model is more accurate than the single model. As can be seen from Figure 9, there are not many differences between the absolute fit of the five models and the raw data. In order to see the accuracy of the five models more accurately, we explain them using formulas. First of all, as mentioned in the Method part, the MAPE of five models is calculated by using Excel. As show in Table 14, firstly, the accuracy of NMGM-ARIMA is the highest, followed by MGM-ARIMA and ARIMA, and finally MGM and NMGM; secondly, the combined model does improve the accuracy of a single grey model. Thirdly, criteria of MAPE is shown as Table 15, which is also the standard of the acceptability of the forecasting error. And the MAPE of the five models is lower than 5%, which shows that the five models are quite reliable. Finally, the prediction errors of each model are calculated by formula (22). The accuracy of the five models is shown in Figure 11. As can be seen from the chart, although the accuracy of all models varies every year, it still exceeds 90%. This shows that these five models are very accurate and can be used for prediction. It can be seen roughly from Figures 7 and 8 that the deviation of MGM and NMGM is reduced after being corrected by ARIMA model at some points, which shows that it is reasonable and effective to use ARIMA to correct MGM and NMGM. In other words, the combined model is more accurate than the single model. As can be seen from Figure 9, there are not many differences between the absolute fit of the five models and the raw data. In order to see the accuracy of the five models more accurately, we explain them using formulas. First of all, as mentioned in the Method part, the MAPE of five models is calculated by using Excel. As show in Table 14, firstly, the accuracy of NMGM-ARIMA is the highest, followed by MGM-ARIMA and ARIMA, and finally MGM and NMGM; secondly, the combined model does improve the accuracy of a single grey model. Thirdly, criteria of MAPE is shown as Table 15, which is also the standard of the acceptability of the forecasting error. And the MAPE of the five models is lower than 5%, which shows that the five models are quite reliable. Finally, the prediction errors of each model are calculated by formula (22). The accuracy of the five models is shown in Figure 11. As can be seen from the chart, although the accuracy of all models varies every year, it still exceeds 90%. This shows that these five models are very accurate and can be used for prediction.

Prediction Results
From the above analysis, the prediction results obtained by these five models have high accuracy. In this paper, the primary energy consumption in East Africa from 2018 to 2030 can be predicted Table 16 shows the forecast results of the five models. Figure 12 shows the predicted results of the five models.

Prediction Results
From the above analysis, the prediction results obtained by these five models have high accuracy. In this paper, the primary energy consumption in East Africa from 2018 to 2030 can be predicted Table 16 shows the forecast results of the five models. Figure 12 shows the predicted results of the five models.

Conclusions
In this paper, the primary energy demand of East Africa in the next 13 years is predicted by virtue of BP Statistical Review of World Energy 2018. The main conclusions (findings) are as follows: (1) In this study, five methods (MGM, NMGM, ARIMA, MGM-ARIMA, and NMGM-ARIMA) are used to fit the primary energy consumption of East Africa from 2000 to 2017. On the one hand, the average relative errors of the five models are 2.8216%, 2.9697%, 1.5013%, 2.0969%, and 1.4654%, respectively. The average relative errors of the five models are all less than 3%. This shows that the five models are suitable for prediction and can produce reliable prediction information. On the other hand, compared with MGM and NMGM models, the average relative errors of models after ARIMA correction decreased from 2.8216%, 2.9697% to 2.0969%, 1.4624%, which showed the advantages of the combined model respectively.
(2) This work studies the future trend of primary energy consumption in East Africa. According to the fitting results of five models, future average growth rate of primary energy demand in East Africa is about 4% in the future. In short, this means that the demand for primary energy in East Africa will continue to increase from 2018 to 2030, and East Africa has great potential in energy market.
In addition, the results showed that MGM is more accurate than NMGM that may be explained by the linearity of raw data, whilst there are some cusps that means nonlinearity. But after ARIMA correction, the NMGM-ARIMA is more accurate than MGM-ARIMA. The results show that NMGM-ARIMA is an improvement of MGM-ARIMA and MGM when data is nonlinear. And further research is needed on the application and improvement of MGM and NMGM.
Author Contributions: X.H. performed the experiments, analyzed the data, contributed reagents/materials/analysis tools, and wrote the paper; R.L. conceived and designed the experiments and wrote the paper. All authors read and approved the final manuscript.

Conclusions
In this paper, the primary energy demand of East Africa in the next 13 years is predicted by virtue of BP Statistical Review of World Energy 2018. The main conclusions (findings) are as follows: (1) In this study, five methods (MGM, NMGM, ARIMA, MGM-ARIMA, and NMGM-ARIMA) are used to fit the primary energy consumption of East Africa from 2000 to 2017. On the one hand, the average relative errors of the five models are 2.8216%, 2.9697%, 1.5013%, 2.0969%, and 1.4654%, respectively. The average relative errors of the five models are all less than 3%. This shows that the five models are suitable for prediction and can produce reliable prediction information. On the other hand, compared with MGM and NMGM models, the average relative errors of models after ARIMA correction decreased from 2.8216%, 2.9697% to 2.0969%, 1.4624%, which showed the advantages of the combined model respectively.
(2) This work studies the future trend of primary energy consumption in East Africa. According to the fitting results of five models, future average growth rate of primary energy demand in East Africa is about 4% in the future. In short, this means that the demand for primary energy in East Africa will continue to increase from 2018 to 2030, and East Africa has great potential in energy market.
In addition, the results showed that MGM is more accurate than NMGM that may be explained by the linearity of raw data, whilst there are some cusps that means nonlinearity. But after ARIMA correction, the NMGM-ARIMA is more accurate than MGM-ARIMA. The results show that NMGM-ARIMA is an improvement of MGM-ARIMA and MGM when data is nonlinear. And further research is needed on the application and improvement of MGM and NMGM.
Author Contributions: X.H. performed the experiments, analyzed the data, contributed reagents/materials/analysis tools, and wrote the paper; R.L. conceived and designed the experiments and wrote the paper. All authors read and approved the final manuscript.

Funding:
The current work is supported by "the Fundamental Research Funds for the Central Universities (18CX04009B)".

Conflicts of Interest:
The authors declare no conflict of interest.