Next Article in Journal
Effect of Cell Electrical Mismatch on Output of Crystalline Photovoltaic Modules
Next Article in Special Issue
Automated Classification of Pipeline Defects from Ultrasonic Phased Array Total Focusing Method Imaging
Previous Article in Journal
Review of Renewable Energy Subsidy System in China
Previous Article in Special Issue
Numerical Simulation of Erosion Characteristics and Residual Life Prediction of Defective Pipelines Based on Extreme Learning Machine
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Multi-Step Ahead Natural Gas Consumption Forecasting Based on a Hybrid Model: Case Studies in The Netherlands and the United Kingdom

1
School of Science, Southwest University of Science and Technology, Mianyang 621010, China
2
Center for Information Management and Service Studies of Sichuan, Mianyang 621010, China
*
Author to whom correspondence should be addressed.
Energies 2022, 15(19), 7437; https://doi.org/10.3390/en15197437
Submission received: 2 September 2022 / Revised: 25 September 2022 / Accepted: 27 September 2022 / Published: 10 October 2022

Abstract

:
With worldwide activities of carbon neutrality, clean energy is playing an important role these days. Natural gas (NG) is one of the most efficient clean energies with less harmful emissions and abundant reservoirs. This work aims at developing a swarm intelligence-based tool for NG forecasting to make more convincing projections of future energy consumption, combining Extreme Gradient Boosting (XGBoost) and the Salp Swarm Algorithm (SSA). The XGBoost is used as the core model in a nonlinear auto-regression procedure to make multi-step ahead forecasting. A cross-validation scheme is adopted to build a nonlinear programming problem for optimizing the most sensitive hyperparameters of the XGBoost, and then the nonlinear optimization is solved by the SSA. Case studies of forecasting the Natural gas consumption (NGC) in the United Kingdom (UK) and Netherlands are presented to illustrate the performance of the proposed hybrid model in comparison with five other intelligence optimization algorithms and two other decision tree-based models (15 hybrid schemes in total) in 6 subcases with different forecasting steps and time lags. The results show that the SSA outperforms the other 5 algorithms in searching the optimal parameters of XGBoost and the hybrid model outperforms all the other 15 hybrid models in all the subcases with average MAPE 4.9828% in NGC forecasting of UK and 9.0547% in NGC forecasting of Netherlands, respectively. Detailed analysis of the performance and properties of the proposed model is also summarized in this work, which indicates it has high potential in NGC forecasting and can be expected to be used in a wider range of applications in the future.

1. Introduction

1.1. Background

Since the Industrial Revolution, the continuous progress of human civilization and science and technology, the intensification of industrialization, and the acceleration of urbanization, the global demand for energy consumption has continued to increase, bringing a large number of ecological problems such as atmospheric pollution, global warming, and water pollution [1], which have had a significant impact on economic development and society. In order to better cope with the severe energy crisis and environmental problems, developing green energy with less pollution will become a trend in the energy field. The pressures of increasing pollution and reducing energy supplies are also driving society to develop in the direction of renewable energy [2].
NG is a clean and environmentally friendly high-quality energy that contains almost no harmful substances such as sulfur and dust. Compared with other fossil fuels, its combustion produces less carbon dioxide, effectively reducing the greenhouse effect and fundamentally improving environmental quality. Especially in recent years, NG as a vehicle fuel has received widespread attention [3]. The U.S. Energy Information Administration (EIA) predicts in its latest report International Energy Outlook 2019 that global NGC will grow by more than 40% from 2018 to 2050. By 2050, the total global NGC will reach nearly 200 Giga British Thermal Units. Therefore, NG is highly critical to the country’s development, so the accurate forecasting of NGC is of vital strategic significance.
The UK is one of the the earliest capitalist industrialized countries and was once the most powerful countries in the world. After World War II, air pollution in the UK continued due to the large-scale mining and use of coal in industrial production. The ‘Great Smog’ incident in December 1952 [4] directly caused about 150,000 people to be taken to hospital with respiratory problems, and eventually, 4000 people died. This pollution incident made the British government start the energy transition and gradually give up the use of coal to generate power. In 2017, the UK’s energy consumption structure is still dominated by fossil energy, with NGC accounting for 39.02% of the total and coal consumption accounting for only 5.26%. The Netherlands is the EU’s largest NG exporter [5]. Since the discovery of the Groningen gas field in 1959, the Netherlands has become an important European gas transportation and trade hub with its strategic geographical location and well-developed pipeline network facilities. According to official data from the Netherlands, from 1963 to 2018, NG contributed approximately forty-one point seven billion euros in revenue to the Netherlands. The proportion of NG in the energy structure of the Netherlands is also much higher than that of other European countries, which is approximately 40% [6].
The UK and the Netherlands are two important western European countries. In 2020, the gross domestic product (GDP) of the UK and the Netherlands ranked second and sixth among all European countries, respectively. According to the UK Public Sector Information website and CBS statistics (Figure 1), NG is the most used fossil energy source in the UK, with a total NGC of 495,400 (GWH) in 2017, accounting for 39.02% of all energy consumption. The Netherlands is an essential European exporter of NG, producing 86 billion cubic meters per year, accounting for 2.5% of total world gas production. Both countries experienced a downward trend in NG production, notably since 2013, when Netherlands NG production steadily declined. NGC in both countries has been more stable with fewer fluctuations. NG imports have increased in both countries, but the UK began a slow decline in importance in 2010, with The Netherlands’ imports increasing. In addition, gas exports from the UK have been low and steady, but exports from the Netherlands have been significantly declining in recent years. In addition, with the outbreak of war between Russia and Ukraine, a prolonged and complete shutdown of Russian gas to the whole of Europe could interact with infrastructure bottlenecks. In some countries, gas has become very expensive and in severely short supply [7].

1.2. Related Work

NGC data are characterized by volatility and nonlinear time series, and datasets from different sources may vary significantly. Therefore, the primary issue considered by researchers is how to effectively improve the forecasting accuracy and generalization performance of the models. To date, researchers have performed a lot of research in NGC forecasting and achieved many satisfactory results, whose models mainly include machine learning models, economic models, grey system models, deep learning models, time series models, and other models. The detailed results of the literature study are presented in Table 1.
The grey system model is one of the most popular models in energy forecasting, and many scholars have worked to develop a forecasting model with strong predictive ability and good generalization performance [8,9,10,11]. More notably, many scholars have combined intelligent optimization algorithms with grey models to select the grey model parameters by optimization algorithms and achieved satisfactory results [12,13,14,15,16,17]. Machine learning models are widely used in various fields due to their powerful predictive capabilities. Neural networks [18,19,20] and support vector machines [21,22] are two of the most used models in NGC forecasting. Notably, Yong-Hong and WuHuiShen proposed the least squares support vector machine model (GRA-LSSVM) based on grey correlation analysis in 2018 and designed a weighted adaptive second-order particle swarm optimization algorithm (WASecPSO) to optimize the model parameters. The results show that the GRA-LSSVM has a better generalization ability and training effect, and the model optimized by the WASecPSO algorithm has higher forecasting accuracy [22]. This work illustrates that an approach based on intelligent optimization algorithms for tuning the hyperparameters of machine learning models is fully feasible. Deep learning is the most popular method today, and it has also been widely used in energy forecasting with very satisfactory results [23,24,25,26]. It is evident from recent studies that multi-model fusion has become the preferred choice of forecasting method by a wide range of scholars. In addition, econometric and other models are occasionally applied to NG forecasting [27,28,29].
The literature review shows that the grey system, machine learning, and deep learning models are the three most widely used models for current NGC forecasting. Many scholars have contributed to developing models with solid forecasting capability, but the forecasting of single model suffers from the problem of poor stability. In terms of machine learning, the forecasting ability and generalization performance of a model often depends on the choice of hyperparameters, and many scholars adjust the model’s hyperparameters based on their own experience, and such approaches have sinificant subjectivity and often fail to achieve satisfactory results. In this work we choose to use the XGBoost, one of the state-of-the-art tree-based models, to build nonlinear auto-regressive models for time series forecasting. And then the Salp Swarm Algorithm (SSA) is adopted to optimizing the hyperparameters of these models by solving a nonlinear programming problem with respect to the hyperparameters to achieve better global convergence and take most advantages of the XGBoost model. The real-world case studies along with comprehensive discussions are also presented.

2. XGBoost and Its Nonlinear Auto-Regressive Formulation

2.1. Extreme Gradient Boosting

The XGBoost is essentially one kind of gradient boosting descision trees [30], which can be used for classification and regression problems proposed by Chen et al. [31]. Regularization and parallel computing are used in XGBoost, which make it generally more stable and faster than most conventional tree-based models. A brief overview of the main steps of the XGBoost will be summarized in this subsection.
Define D = { ( x i , y i ) } , ( | D | = n ) as a sample set of n × m , where n is the number of samples and m is the number of features. The output function of the XGBoost model is shown in Equation (1):
y ^ i = φ x i = t = 1 T f t x i
where T = f t ( x i ) = ω q ( x ) represents the space of a regression tree, and q represents the structure of each tree when the samples are mapped to the leaves. T represents the number of leaves in the tree. Furthermore, each f k contains a separate q and ω .
The optimization problem for constructing the XGBoost model is formulated as:
o b j = i l y ^ i , y i + k Ω f k where Ω ( f ) = γ T + 1 2 λ | | w | | 2
The objective function of XGBoost is mainly divided into two parts: the loss function and the regularization term. Here, l y ^ i , y i is a differentiable convex loss function, which is the first part of the objective function, and is used to calculate the error between the forecasted value y ^ i and the target value y i . The ω represents the second part of the objective function: the regularization term. The regularization term encourages the use of simpler models, which makes the forecast of the final model more stable and easy not to over-fitting.
According to the main idea of XGBoost, the iterative process of residual fitting is as follows:
y ^ i ( 0 ) = 0 y ^ i ( 1 ) = f 1 x i = y ^ i ( 0 ) + f 1 x i y ^ i ( 2 ) = f 1 x i + f 2 x i = y ^ i ( 1 ) + f 2 x i y ^ i ( t ) = k = 1 t f k x i = y ^ i ( t 1 ) + f t x i
In the above formula, y ^ i ( t ) represents the forecasting result of the t-th round model, and y ^ i ( t 1 ) is the forecasting result of the t 1 round model. Additionally, f t ( x i ) is the newly added function.
According to the above iterative process, the objective function can be rewritten as:
o b j ( t ) = i = 1 n l y i , y ^ i ( t ) + i = 1 t Ω f i = i = 1 n l y i , y ^ i ( t 1 ) + f x i + Ω f t + constant
Obviously, our goal is to select an optimal f t ( x i ) in each iteration to minimize the objective function.
For Equation (4), approximate the objective function using the second-order expansion of the Taylor formula, and remove the constant term:
o b j ( t ) = i = 1 n g i f t x i + h i f t 2 x i + Ω f ( t ) w h e r e g i = y ^ ( t 1 ) l y i , y ^ i ( t 1 ) , h i = 2 y ^ ( t 1 ) l y i y ^ i ( t 1 )
Define I j = { i | q ( x i ) = j } as the set of subscripts of the samples on each leaf node j, so that each sample value can be mapped to the tree through the function q ( x i ) on a leaf node. Combining the above conclusions, we expand ω and rewrite Equation (5):
o b j ( t ) = i = 1 n g i f t x i + h i f t 2 x i + Ω f ( t ) = i = 1 n g i ω q ( x ) + h i ω q ( x ) 2 + γ T + λ 2 j = 1 T ω j 2 = j = 1 T i I j g i ω j + 1 2 i I j h i + λ ω j 2 + γ T
Define G j = i I j g i , H j = i I j h i :
o b j ( t ) = j = 1 T G j ω j + 1 2 H j + λ ω j 2 + γ T
Since the structure q ( x ) of each tree has been determined, the optimal ω j * of the leaf can be obtained by the following formula:
ω j * = G j H j + λ
and the corresponding optimal objective function value is calculated by the following formula:
o b j ( t ) = 1 2 j = 1 T G j H j + λ + γ T
The result of Equation (9) is used to evaluate the quality of the tree structure. The smaller the result, the better the tree structure.

2.2. Data Division Method and Forecasting Method

In order to obtain better generalization of the forecasting model and avoid overfitting, in this study, the "hold-out" method is adopted to divide the dataset used to adjust the parameters [32]. The idea of this method is to successively divide the raw data into two parts for fitting and forecasting, and then the data for fitting is devided into two parts in the same way, of which the first part is used to train the model, and the other part is used as a validation set for the search to obtain the optimal hyperparameters of the model. Performance of the models will be evaluated on the data used for forecasting. The process is shown in Figure 2.
As NGC is generally highly cyclical, it is often difficult for traditional forecasting methods to obtain satisfactory results. Therefore, a novel multi-step ahead forecasting scheme is adopted in this study. The main idea of the multi-step ahead forecasting scheme is to gradually predict the future values of the time series based on the historical values of the time series [33].
Suppose an original sequence of length τ : X = { x t 1 + τ , , x t 1 , x t } , and a general model x = f ( x ) . We first use the previous τ values to forecast x ^ t + 1 :
x ^ t + 1 = f ( x t 1 + τ , , x t 1 , x t )
Then, we forecast x ^ t + 2 based on its previous τ values, which include the forecasted value for x ^ t + 1 :
x ^ t 2 = f ( x t + τ , , x t , x ^ t + 1 )
Finally, we repeat the process until the last value is predicted. The entire process is shown in Figure 3.

3. The Overall Computational Steps

3.1. Structure of the Optimization Problem

Hyperparameters optimization is one of the most vital problems in machine learning. The performance of the model heavily depends on the choice of hyperparameters. Choosing appropriate method to search for the model’s hyperparameters is also challenging. Traditional optimization methods often take too much time when the amount of data and features are large. In recent years, with the popularity of meta-heuristic algorithms, more and more scholars have begun to use meta-heuristic algorithms in the hyperparameter adjustment of machine learning models and have achieved satisfactory results. For instance, Qiu et al. (2021) adopted WOA, GWO, and BO algorithms to optimize the XGBoost model [34], Abbasi et al. adopted the HHO and PSO algorithms to optimize hybrid support vector regression to predict meteorological drought [35].
In this work, we transform the hyperparameter tuning into an optimization problem and solve the optimization problem through a meta-heuristic algorithm. The main computational steps can be summarized as follows:
Step 1 Initialize the parameters of the algorithm and determine the hyperparameters that the model needs to tune.
Step 2 Construct the optimization problem:
min Obj = 1 d i = n + 1 n + d y ^ i y i y i × 100 % s . t . Training XGBoost by the data for fitting ( from first sample to the n th sample ) , Computing y ^ i by i from n + 1 to n + d using XGBoost using the process in Figure 3
where d represents the number of samples for validation.
Step 3 Start iteration by some updating rule(s).
Step 4 If the maximum iteration is reached, continue the iteration. Otherwise, return Step 3.
Step 5 Output the parameters of the optimal model and use the optimal model to make forecasting.

3.2. Salp Swarm Algorithm

The SSA is a novel heuristic algorithm proposed by Seyedali Mirjalili et al. in 2017 [36]. This algorithm simulates salp’s swarming behaviors [37] of hunting in the deep ocean. The key steps and settings are presented in the following content.

3.2.1. Leaders’ Position Update

The search space is defined as a K × I Euclidean space, where K represents spatial dimension, and I represents the population of individuals. The positions of all salps in the space are all stored in a two-dimensional matrix X, where food is the target of the entire population, and F represents its position.
The position update of the leader is performed by the following equation:
x k 1 = F k + r 1 u b k l b k r 2 + l b k , r 3 0 F k r 1 u b k l b k r 2 + l b k , r 3 < 0 .
x k 1 and F k are the position of the first salp (leader) and food in the k th dimension, respectively; l b k and u b k are the corresponding upper and smaller bounds, respectively. r 1 , r 2 , and r 3 are control parameters, which are three randomly generated numbers. Equation (13) shows that the leader’s position update is only related to the position of the food.
r 1 is the convergence factor in the optimization algorithm, which balances global exploration and local development and is the most crucial of all control parameters of SSA. The expression for r 1 is:
r 1 = 2 e 4 l L 2
In the above formula, l and L represent the current and total number of iterations, respectively. r 1 is a function whose values decreases from 2 to 0. The control parameters r 2 and r 3 are randomly generated numbers in [ 0 , 1 ] . r 2 and r 3 are used to enhance the randomness of x k 1 , thereby improving the global search ability of the chain groups and increasing the diversity of individuals. Additionally, these two parameters also determine whether the next position in the dimension should be in the positive or negative direction as well as determine the forecasting step.

3.2.2. Folsmallers’ Position Update

During the movement and foraging of the salp chains, the folsmallers move forward in a chain-like manner through the mutual influence between the front and rear individuals. Update the position of the folsmaller according to Newton’s law of motion formula:
x k i = 1 2 a t 2 + v 0 t
where i 2 , x k i represents the position of the k dimension, t, v 0 , and a are the time, initial velocity, and acceleration, respectively, and a = v f i n a l v 0 where v = x x 0 t . Because the optimization time varies with the number of iterations and takes into account v 0 = 0 , therefore, the position of the folsmaller can be described by the following equation:
x k i = 1 2 x k i + x k i 1
where i 2 , and x k i and x k i 1 are the positions of two salps that are next to each other in the k th dimension.

3.3. Hyperparameter Optimization of XGBoost by SSA

There are many hyperparameters (described in Section 3) in XGBoost need to be optimized. These hyperparameters will greatly affect the model results because SSA has strong global exploration and local development capabilities, making it better global convergence in practice. Within such merits, we use SSA to search the optimal hyperparameters of XGBoost. Combining the above descriptions, the overall procedure of optimizing the hyperparameters of XGBoost by SSA can be summarized in Figure 4. The forecsating model obtained by this procedure can be finally used for multi-step ahead forecasting. As it combines the XGBoost and SSA, the proposed model is abbreviated as SSA-XGBoost in the rest of this paper.

4. Application

In this section the SSA-XGBoost is used to forecast the NGC of the UK and the Netherlands. Moreover, to evaluate the performance of this hybrid model, fifteen hybrid models will be used for comparison. The complete modelling and comparison procedures are summarized in Figure 5.

4.1. Experimental Settings

Information of the other 15 hybrid models in comparison with the proposed SSA-XGBoost is listed in Table 2.
The above hybrid models shwon in Table 2 often have good predictive performance in existing studies. Zhang et al. (2020) [40] adopted the PSO-XGBoost to predict explosion-induced peak particle velocity. Yosra Grichi (2018) [41] used RF and PSO to perform obsolescence forecasting. To more accurately perform intrusion detection, Liu et al. (2021) [42] proposed a new hybrid model based on particle swarm optimization. Wang et al. (2021) [45] applied the GWO-RF hybrid model to the power field to achieve an efficient malfunction diagnosis of transformers. Lu et al. (2020) [44] and Yan et al. (2020) [34], respectively, used GWO-XGBoost and WOA-XGB hybrid models to predict reference evaporation. Yu et al. (2020) [47] used a RF and HHO algorithm to forecast, analyze, and control ground vibrations caused by explosions. Liu et al. (2019) [51] proposed an evaluation model based on the WOA algorithm and an improved RF to resolve ambiguity in resilience evaluation.
MAPE is one of the most commonly used evaluation metrics in regression tasks, and it is mainly used to measure the forecasting accuracy of statistical forecasting methods. In this study, we primarily adopted MAPE to evaluate the forecasting performance of the SSA-XGBoost and other models. Root mean square error (RMSE) is also commonly used to measure the forecasting results of machine learning models. It measures the mean errors between the observed value and the actual value. These two evaluation metrics are calculated by the formulae shown in Table 3. Furthermore, in this study, all models and algorithms are implemented in Python3.8.5, hardware mainly includes Intel(R) Xeon(R) W-2123 CPU @ 3.60 GHzand and 62.5 GiB RAM, and the operation system is Linux Ubuntu 20.04.1. The Python packages include scikit-learn0.23.2, xgboost1.3.3, numpy1.19.2, and pandas1.1.3.

4.2. Information of the Medels and Algorithms for Comparison

  • Random Forest (RF). Two American statisticians, Leo Breiman and Adele Culter, first proposed RF in 2001. It is an ensemble learning algorithm that combines classification and regression trees [52]. The RF algorithm mainly consists of the following three steps: (a) First, through the method of simple random sampling with replacement, n samples are randomly selected from the sample set; (b) Arbitrarily choose k features from all features, and use these features and the samples from s t e p 1 to build a decision tree; (c) Repeat the above steps continuously until multiple decision trees are generated to form a RF.
  • Light Gradient Boosting Machine (LightGBM). LightGBM is a distributed gradient boosting framework based on the decision tree algorithm [53]. Its essence is an integrated learning algorithm that promotes weak learners to strong learners. Specifically, it combines many tree models with smaller accuracy. In each iteration, the loss function is made smaller and smaller by moving to the negative gradient direction of the loss function, and finally, a better tree is obtained. Compared with the traditional GBDT model, LightGBM has several very prominent advantages: smaller memory consumption, faster training speed, higher accuracy, and fast processing of massive data.
  • Particle swarm optimization (PSO). Particle swarm optimization is a swarm intelligence algorithm designed to simulate the predation behavior of birds. It was first proposed by American scientists Eberhart and Kennedy [39] in 1995. Particle swarm optimization mimics the behavior of groups of insects, birds, fish, etc., which cooperatively search for food. Each group member continually changes its search patterns by learning from their own and other members’ experiences.
  • Grey wolf optimization (GWO). The GWO is an algorithm with a simple structure small number of parameters and is easy to implement. Since it was first proposed by Mirjalili et al. in 2014 [43], it has been rapidly and widely used in parameter optimization and image classification. Since the algorithm is inspired by the predation behavior of the grey wolf, it is named the grey wolf optimization algorithm.
  • Harris hawk optimization (HHO). HHO is an intelligent optimization algorithm simulating the predation behavior of the Harris Eagle, which was proposed by Heidari et al. in 2019 [46]. The HHO algorithm comprises three stages: search, search and development conversion, and development. The algorithm has excellent global search ability and requires the adjustment of few parameters.
  • Multi-Verse Optimizer (MVO), The MVO algorithm is inspired by the motion behavior of multiverse populations under the combined action of white holes, black holes, and wormholes. Seyedali Mirjalili first proposed the algorithm in 2016 [48]. In the MVO algorithm, the main performance parameters are the wormhole existence probability and the wormhole travel distance rate. The parameters are relatively few, and the low-dimensional numerical experiments show fairly excellent performance.
  • Whale optimization algorithm (WOA). Mirjalili, a researcher at Griffith University in Australia, proposed a novel swarm intelligence optimization algorithm called Whale optimization algorithm in 2016 [50]. The algorithm is a novel swarm optimization algorithm imitating the hunting behavior of humpback whales. Its advantages are simple operation, few parameters, and the fact it does not easy fall into local optimum.

4.3. Data Description

The quarterly NGC of the UK from first quarter of 1998 to the first quarter of 2021 were collected from the UK office for national statistics (https://www.ons.gov.uk/ (accessed on 10 July 2021)), and the monthly NGC of the Netherlands from January 1998 to April 2021 was collected from the CBS-Statistics Netherlands (https://www.cbs.nl/ (accessed on 10 July 2021)). Table 4 shows some statistical characteristics of the two datasets.
In Figure 6, the geographical location information of the UK and Netherlands and the autocorrelation plots of the two datasets are shown. It can be seen that both countries have significant strategic locations, and they promote the development of trade and transportation in the whole of western Europe. Both datasets are highly cyclical, which is very consistent with the correlation characteristics of NGC data.
In this study, we divide the two datasets according to 8:1:1(sample sizes for fitting, validation and forecasting) using the data division method proposed in Section 3. In the case for UK the training set contains 75 samples, the validation set contains 9 samples, and the test set contains 9 samples. In the case for Netherlands, the training set contains 378 samples, the validation set contains 47 samples, and the test set contains 47 samples.

4.4. Forecasting Results

In this subsection the proposed SSA-XGBoost hybrid model is use to forecasting the NGC of the UK and the Netherlands. In the forecasting process for both examples, we set up three different scenarios with τ = 6 , τ = 9 and τ = 12 , respectively. We perform a 5-step ahead forecasting in each scenario. In addition, to demonstrate the intense competitiveness of the proposed model, we also introduced the fifteen hybrid models used in Section 4.1 to compare with SSA-XGBoost in the actual case.
Table 5 and Table 6 show the MAPE of the predicted results for the UK and the Netherlands, respectively. From the first table, we can observe that the values of SSA-XGBoost MAPE are less than 6% for all lag and step scenarios. However, in the second table, the value of SSA-XGBoost MAPE increases, but it is still less than 11%. Moreover, it should be mentioned that SSA-XGBoost consistently has the smallest MAPE values compared to the other comparable models, which indicates excellent predictive performance and high competitivity of this hybrid model.
Table 7 and Table 8 show the RMSE of the forecasting results for the gas consumption dataset in the UK and the Netherlands, respectively. XGBoost remains the best performer among all the models involved in the forecasting task. However, in the second dataset τ = 9 , both MVO-XGBoost and SSA-XGBoost have outstanding performance, but compared to MVO-XGBoost, SSA-XGBoost has more dominant forecasting results in the first three steps.
The above results illustrate that SSA-XGBoost has the most powerful forecasting performance among all the compared models. In addition, it is worth noting that the statistical properties of the two datasets are very different, but this does not affect the final forecasting results, which is sufficient to show that SSA-XGBoost has good generalization performance. Another point is that SSA does not perform the best among all intelligent optimization algorithms when optimizing the parameters of RF and LightGBM. Moreover, the predictive performance and generality of the hybrid models combined with other optimization algorithms with XGBoost are not all better than the models constructed by different optimization algorithms with RF and LightGBM.
The convergnce curves are plotted in Figure 7, Figure 8 and Figure 9, which illustrated the searching process of the optimization algorithms for the XGBoost in different cases. The results listed in the Table 5 and Table 6 are produced by the optimal models obtained in these processes.
We first observe the results related for the UK. It can be seen from the Figure 7, Figure 8 and Figure 9 that SSA-XGBoost reaches the minimum error after approximately four hundred iterations in all three different τ scenarios. In addition, GWO, MVO, and WOA cannot find the optimal combination of the hyperparameters of XGBoost using only five hundred iterations. In contrast, the GWO and PSO algorithms have excellent results in parameter selection for RF. SSA-LGB fails to obtain the optimal parameter combination when τ = 3 and the maximum number of iterations is reached. SSA-RF does not obtain the optimal parameter combination in all cases. We then observe the convergence curves of all the hybrid models in the case of the Netherlands. In each subcase, SSA-XGBoost has reached the minimal error in the validation set when the number of iterations is only three hundred. However, SSA-LGB and SSA-RF did not find the optimal combination of parameters for the model in all cases. These two figures fully illustrate that the SSA performs much better in hyperparameter optimization for XGBoost than other algorithms. And on the other hand, it is much easier for the optimization algorithms to optimizing the XGBoost than the other models.
In Figure 10 and Figure 11, the values of MAPE and RMSE of the best five hybrid model are shown. It can be seen that SSA-XGBoost has MAPE values as 4.9828% and 9.0547% for all τ and forecasting steps, respectively, and the values of RMSE are 7716.411 and 375.576, respectively, which are the best among all the hybrid models. More intuitively, the convergence curves of the most important parameters ( n _ e s t i m a t o r s , m a x _ d e p t h , l e a r n i n g _ r a t e ) of the SSA-XGBoost model during the iterations are plotted in Figure 12. It can be observed that when τ = 6 and the number of iterations reaches four hundred, the three parameters do not change significantly, and when τ = 9 , the values of the three parameters stabilize when the number of iterations reaches three hundred, while when τ = 12 , only about two hundred iterations are needed to find the optimal combination of parameters. In all cases, the depths of the trees is less than twenty, which is a relatively simple tree structure, so the SSA-XGBoost model has good stability and is not overfitted in these cases.
Moreover, from Figure 7, Figure 8 and Figure 9 we observe that the MAPE of the other algorithms in the validation decreases in the first few iterations. In contrast, only the MAPE of the SSA algorithm has significant volatility. This is because the decision tree-based model is very sensitive to the and the hyperparameters. From Figure 12, we can see that when the number of iterations is less than two hundred, the parameter values fluctuate strongly, bringing large variance of the model’s error on the validation set.
In summary, the forecasting results of the SSA-XGBoost model are the best in both cases. The comparison with the results of fifteen different forecasting models shows that SSA-XGBoost has the best forecasting performance among all forecasting models. Although there are considerable differences in the original data of the two applications, the forecasting results are the same. The MAPE and RMSE of SSA-XGBoost are the smallest among all models in terms of average values and detailed results for different scenarios.

4.5. Discussions

4.5.1. Boosting Effect of the Same Algorithm for Different Models

Figure 13 and Figure 14 show the MAPE values of NGC forecasting results of the UK and the Netherlands, and Figure 15 and Figure 16 show the RMSE values of NGC forecasting results of the UK and the Netherlands. The discussions will be presented in two points of view.
In the first point of view, we compare the results with the same forecasting steps. It is noticed that SSA-XGBoost has the smallest MPAE and RMSE values in most cases comparing with other models with the same step. Therefore, it can be concluded that XGBoost outperforms RF and LightGBM in the forecasting results with all steps, regardless of the algorithm used for hyperparameter selection.
In the second point of view, we compare the results with the same time lag τ and the summarized results are plotted in Figure 17. Combining the results shwon in Figure 16 and Figure 17, it can be seen that the MAPE values of XGBoost are always the smallest among the three models in both datasets, regardless of the variation of τ values. Moreover, XGBoost always has a smaller RMSE when τ is different.
It is worth mentioning that when values of τ change, the structure of the entire training data changes significantly. In addition, the principles of different optimization algorithms are very different, and each algorithm’s optimal combination of model parameters may be different. In this case, XGBoost still outperforms random forest and LightGBM; in some cases, the MAPE and RMSE values are much smaller than the other models. This implies that the proposed optimization scheme can build a stronger learner based on a learner with a weak generalization performance. XGBoost expands the loss function, taking into account the second-order derivatives, so XGBoost has a higher forecasting accuracy. Our results also show that the XGBoost model has satisfactory forecasting accuracy and generalization performance. In summary, the XGBoost model consistently has the best forecasting performance among the three based on the decision tree model when using the same algorithm.

4.5.2. Optimization Effect of Different Algorithms on XGBoost

In this study, six different metaheuristic algorithms were used. Since each metaheuristic algorithm principle has its own characteristics and advantages, effect of different algorithms on the models may not be the same. In the discussion in the previous subsection, it was seen that XGBoost was the best performer among the three basic models. In this subsection, we discuss the effect of different optimization algorithms on the enhancement of forecasting results based on the XGBoost model.
Figure 18 and Figure 19 show the MAPE values and RMSE values of the forecasting results by XGBoost optimized by the six algorithms. It can be seen from the figures that SSA has the best performance of optimizing the XGBoost among all metaheuristics. From 2-step to 5-step forecasting, SSA has the smallest MAPE value regardless of τ . Moreover, SSA also outperforms the other algorithms in terms of RMSE values of the forecasting results with both datasets. Furthermore, it is worth noting that the performance of other optimization algorithms is unstable, and the optimization effect of the algorithm changes significantly when τ changes.

4.5.3. Sensitive Analysis of Time Lags and Forecasting Steps of the Proposed Method

This subsection will analyze the sensitivity of time lag τ and the forecasting steps on the proposed model. The results of MAPEs with different time lag and forecating stpes in different views are shown in Figure 20 and Figure 21.
From the Figure 20 we can see that the MAPE increases with the increase of forecasting step when τ = 6 and τ = 9 . When τ = 12 , the MAPEs of PSO-XGBoost, GWO-XGBoost, HHO-XGBoost, and WOA-XGBoost also increase with the increase in the forecasting step. Only one exception is when τ = 12 the MAPEs of the 1-step forecasting errors of PSO-XGBoost and SSA-XGBoost are not all smaller than the 2-step forecasting results. The Figure 21 presents another view of the results. We can observe that the RMSE values of all hybrid models increase as the forecasting step increases. The results of the above two figures show that the forecasting accuracy decreases as the forecasting step increases, and the values of MAPE and RMSE become larger as the forecasting step increases. This is coincidence with the common sense that the forecasting errors will accumulated with larger forecasting steps.
In addition, another insteresting phenomenon is that the MAPE and RMSE values of the forecasting results tend to increase when τ increases. This is because the number of features of the data increases as τ increases, leading to more sufficient information for training the models. This implies that machine learning algorithms are more suitable for forecasting tasks with large-scale datasets and may perform better in large-sample forecasting tasks.

4.5.4. The Effect of Different Time Scales on the Forecasting Results

In this study, we selected two quarterly (UK) and monthly (Netherlands) datasets with different time scales. By analyzing Table 5, Table 6, Table 7 and Table 8 as well as Figure 10 and Figure 11, we can find that the errors differ significantly between the datasets with different time scales. The MAPE values are two times higher for the monthly data than the quarterly data in average.
The main reason is that monthly gas consumption data are more volatile and often have more noises, while quarterly data often have smoother trend. The smaller the dimension, the greater the uncertainty, which is reflected in Figure 22, where the black boxes show all the places with substantial volatility. It also indicates that our model is more suitable for time series forecasting with less volatility, while poorer results may be obtained for more volatile time series data.

5. Conclusions

In this work, we proposed a novel SSA-XGBoost model by adopting the SSA to optimize the hyperparameters of the XGBoost. To demonstrate the predictive ability and generalization of the hybrid model, we compared the forecasting results of SSA-XGBoost with another fifteen similar hybrid models in two different cases. The results show that the SSA-XGBoost model is very competitive in various datasets. The main findings can be summarized as: (a) The SSA-XGBoost has the best performance in various datasets with different time scales, which shows that the SSA-XGBoost model has great potential and hope in NG forecasting; (b) The XGBoost model, and SSA algorithm performed the best among all the compared models and algorithms; (c) As the forecasting step increases, the forecasting error will generally increase. This is because the error of the previous time step will be propagated to future forecasting, leading to enlarge the errors with long forecasting.
Limitations and perspectives can be summarized as: (a) Both datasets used in this study are small, which may lead to more uncertainty of the results. Future works may be conducted with larger data sets, such as the daily NGC; (b) Although the optimization algorithm tuning model hyperparameters can significantly improve the model’s forecasting performance, it is still time-consumption. When the time scale becomes large, tuning parameters will become more complex. Some specific techniques may be considered to improve the time efficiency of the proposed model in the future work.

Author Contributions

L.Z.: Conceptualization, Methodology, Data curation, Writing—Original draft preparation. X.M.: Investigation, Methodology, Writing—Reviewing and Editing, Funding acquisition. H.Z.: Writing—Reviewing and Editing, Funding acquisition. G.Z.: Data analysis, Writing—Reviewing and Editing. P.Z.: Methodology. All authors have read and agreed to the published version of the manuscript.

Funding

This research was financially supported by Scientific and Technological Achievements Tansformation Project of Sichuan Scientific Research Institute (No. 2022JDZH0035) and the National College Students Innovation and Entrepreneurship Training Program, China (S202210619106 and S202210619108).

Data Availability Statement

Not applicable.

Conflicts of Interest

The authors declare no conflict of interest.

Abbreviations

The following abbreviations are used in this manuscript:
ANNArtificial neural networkMLPMultilayer perceptron
ARMAAutoregressive moving average modelMLRMultiple linear regression
CFNHGBM(1,1,k)The consistent fractional nonhomogeneous grey Bernoulli modelMVOMulti-verse optimizer
CGConjugate gradient algorithmMVO-LGBLGB optimized by MVO
CMARSConic multivariate adaptive regression splineMVO-RFRF optimized by MVO
DFGM(1,1, t α )Discrete fractional grey models with time power terms MVO-XGBoostXGBoost optimized by MVO
DGMNF(1,1)A novel discrete grey model considering nonlinearity and fluctuationNNNeural network
EIAEnergy Information AdministrationNGNatural gas
FM-MLPForecasting monitoring multi-layered perceptronNGCNatural gas consumption
FPDGM(1,1)Fractional accumulation polynomial discrete grey prediction modelPCAPrincipal component analysis
GBDTGradient Boosting Decision TreePFSM(1,1)Fractional cumulative inhomogeneous discrete grey seasonal model for PSO optimization
GBgradient boostingPSOParticle swarm optimization
GB-PCAA block-wise gradient boosting model using features from PCAPSO-LGBLightGBM optimized by PSO
GDPGross domestic productPSO-RFRF optimized by PSO
GPRMA grey prediction with rolling mechanismPSO-XGBoostXGBoost optimized by PSO
GRAgrey-related analysisRFRandom Forest
GRA-LSSVMLeast squares support vector machine model based on grey relational analysisSecPSOThe second-order particle swarm
GWOgrey wolf optimizationSSASalp swarm algorithm
GWO-LGBLightGBM optimized by GWOSSA-LGBLightGBM optimized by SSA
GWO-RFRF optimized by GWOSSA-RFRF optimized by SSA
GWO-XGBoostXGBoost optimized by GWOSSA-XGBoostXGBoost optimized by SSA
HHOHarris hawks optimizationSVMSupport vector machine model
HHO-LGBLightGBM optimized by HHOSupport vector regression model
HHO-RFRF optimized by HHOTDPGM(1,1)A novel time-delayed polynomial grey prediction model
HHO-XGBoostXGBoost optimized by HHOUKUnited Kingdom
ISSAImproved singular spectrum analysisU.S.United States
ISSA-LSTMCombining ISSA with LSTM, a novel hybrid model.WASecPSOWeighted adaptive second-order PSO algorithm
LightGBMLight gradient boosting machineWOAThe whale optimization algorithm
LMDA combinatorial model with local mean decompositionWOA-LGBLGB optimized by WOA
LRLinear regressionWOA-RFRF optimized by WOA
LSSVMLeast squares support vector machineWOA-XGBoostXGBoost optimized by WOA
LSTMLong short-term memoryWTDWavelet threshold denoising
MAPEMean absolute percentage errorXGBoostExtreme gradient boosting

References

  1. Fuller, R.; Landrigan, P.J.; Balakrishnan, K.; Bathan, G.; Bose-O’Reilly, S.; Brauer, M.; Caravanos, J.; Chiles, T.; Cohen, A.; Corra, L.; et al. Pollution and health: A progress update. Lancet Planet. Health 2022, 6, e535–e547. [Google Scholar] [CrossRef]
  2. Liu, L.Q.; Liu, C.X.; Wang, J.S. Deliberating on renewable and sustainable energy policies in china. Renew. Sustain. Energy Rev. 2013, 17, 191–198. [Google Scholar] [CrossRef]
  3. Wang, J.; Jiang, H.; Zhou, Q.; Wu, J.; Qin, S. Chinas natural gas production and consumption analysis based on the multicycle hubbert model and rolling grey model. Renew. Sustain. Energy Rev. 2016, 53, 1149–1167. [Google Scholar] [CrossRef]
  4. Karanam, V. The Need to Enact Federal, Environmental-Friendly Incentives to Facilitate Infrastructure Growth of Electric Automobiles. Bachelor’s Thesis, College of Community Innovation and Education, Orlando, FL, USA, 2022. [Google Scholar]
  5. Vivoda, V. LNG export diversification and demand security: A comparative study of major exporters. Energy Policy 2022, 170, 113218. [Google Scholar] [CrossRef]
  6. Beauchampet, I.; Walsh, B. Energy citizenship in the netherlands: The complexities of public engagement in a large-scale energy transition. Energy Res. Soc. Sci. 2021, 76, 102056. [Google Scholar] [CrossRef]
  7. Di Bella, G.; Flanagan, M.J.; Foda, K.; Maslova, S.; Pienkowski, A.; Stuermer, M.; Toscani, F.G. Natural Gas in Europe: The Potential Impact of Disruptions to Supply. IMF Work. Pap. 2022, 2022, 145. [Google Scholar] [CrossRef]
  8. Liu, C.; Wu, W.; Xie, W.; Zhang, T.; Zhang, J. Forecasting natural gas consumption of china by using a novel fractional grey model with time power term. Energy Rep. 2021, 7, 788–797. [Google Scholar] [CrossRef]
  9. Boran, F.E. Forecasting natural gas consumption in turkey using grey prediction. Energy Sources Part B Econ. Plan. Policy 2015, 10, 208–213. [Google Scholar] [CrossRef]
  10. Ma, X.; Liu, Z. Application of a novel time-delayed polynomial grey model to predict the natural gas consumption in China. J. Comput. Appl. Math. 2017, 324, 17–24. [Google Scholar] [CrossRef]
  11. Xiong, P.; Li, K.; Shu, H.; Wang, J. Forecast of natural gas consumption in the asia-pacific region using a fractional-order incomplete gamma grey model. Energy 2021, 237, 121533. [Google Scholar] [CrossRef]
  12. Ma, X.; Mei, X.; Wu, W.; Wu, X.; Zeng, B. A novel fractional time delayed grey model with grey wolf optimizer and its applications in forecasting the natural gas and coal consumption in chongqing china. Energy 2019, 178, 487–507. [Google Scholar] [CrossRef]
  13. Li, N.; Wang, J.; Wu, L.; Bentley, Y. Predicting monthly natural gas production in china using a novel grey seasonal model with particle swarm optimization. Energy 2021, 215, 119118. [Google Scholar] [CrossRef]
  14. Zhang, J.; Qin, Y.; Duo, H. The development trend of chinas natural gas consumption: A forecasting viewpoint based on grey forecasting model. Energy Rep. 2021, 7, 4308–4324. [Google Scholar] [CrossRef]
  15. Zhou, W.; Wu, X.; Ding, S.; Pan, J. Application of a novel discrete grey model for forecasting natural gas consumption: A case study of jiangsu province in china. Energy 2020, 200, 117443. [Google Scholar] [CrossRef]
  16. Zheng, C.; Wu, W.; Xie, W.; Li, Q. A mfo-based conformable fractional nonhomogeneous grey bernoulli model for natural gas production and consumption forecasting. Appl. Soft Comput. 2021, 99, 106891. [Google Scholar] [CrossRef]
  17. Ding, S. A novel self-adapting intelligent grey model for forecasting china’s natural-gas demand. Energy 2018, 162, 393–407. [Google Scholar] [CrossRef]
  18. Sharma, V.; Cali, Ü.; Sardana, B.; Kuzlu, M.; Banga, D.; Pipattanasomporn, M. Data-driven short term natural gas demand forecasting with machine learning techniques. J. Pet. Sci. Eng. 2021, 206, 108979. [Google Scholar] [CrossRef]
  19. Rodger, J.A. A fuzzy nearest neighbor neural network statistical model for predicting demand for natural gas and energy cost savings in public buildings. Expert Syst. Appl. 2014, 41, 1813–1829. [Google Scholar] [CrossRef]
  20. Wang, D.; Liu, Y.; Wu, Z.; Fu, H.; Shi, Y.; Guo, H. Scenario analysis of natural gas consumption in china based on wavelet neural network optimized by particle swarm optimization algorithm. Energies 2018, 11, 825. [Google Scholar] [CrossRef] [Green Version]
  21. Beyca, O.F.; Ervural, B.C.; Tatoglu, E.; Ozuyar, P.G.; Zaim, S. Using machine learning tools for forecasting natural gas consumption in the province of istanbul. Energy Econ. 2019, 80, 937–949. [Google Scholar] [CrossRef]
  22. Wu, Y.-H.; Shen, H. Grey-related least squares support vector machine optimization model and its application in predicting natural gas consumption demand. J. Comput. Appl. Math. 2018, 338, 212–220. [Google Scholar] [CrossRef]
  23. Qiao, W.; Liu, W.; Liu, E. A combination model based on wavelet transform for predicting the difference between monthly natural gas production and consumption of us. Energy 2021, 235, 121216. [Google Scholar] [CrossRef]
  24. Laib, O.; Khadir, M.T.; Mihaylova, L. Toward efficient energy systems based on natural gas consumption prediction with lstm recurrent neural networks. Energy 2019, 177, 530–542. [Google Scholar] [CrossRef]
  25. Peng, S.; Chen, R.; Yu, B.; Xiang, M.; Lin, X.; Liu, E. Daily natural gas load forecasting based on the combination of long short term memory, local mean decomposition, and wavelet threshold denoising algorithm. J. Nat. Gas Sci. Eng. 2021, 95, 104175. [Google Scholar] [CrossRef]
  26. Wei, N.; Li, C.; Peng, X.; Li, Y.; Zeng, F. Daily natural gas consumption forecasting via the application of a novel hybrid model. Appl. Energy 2019, 250, 358–368. [Google Scholar] [CrossRef]
  27. Ervural, B.C.; Beyca, O.F.; Zaim, S. Model estimation of arma using genetic algorithms: A case study of forecasting natural gas consumption. Procedia-Soc. Behav. Sci. 2016, 235, 537–545. [Google Scholar] [CrossRef]
  28. Duan, H.; Tang, X.; Ren, K.; Ding, Y. Medium-and long-term development path of natural gas consumption in china: Based on a multi-model comparison framework. Nat. Gas Ind. B 2021, 8, 344–352. [Google Scholar] [CrossRef]
  29. Özmen, A.; Yılmaz, Y.; Weber, G. Natural gas consumption forecast with mars and cmars models for residential users. Energy Econ. 2018, 70, 357–381. [Google Scholar] [CrossRef]
  30. Friedman, J.H. Greedy function approximation: A gradient boosting machine. Ann. Stat. 2001, 29, 1189–1232. [Google Scholar] [CrossRef]
  31. Chen, T.; Guestrin, C. Xgboost: A scalable tree boosting system. In Proceedings of the 22nd ACM Sigkdd International Conference on Knowledge Discovery and Data Mining, San Francisco, CA, USA, 13–17 August 2016; pp. 785–794. [Google Scholar]
  32. Xiang, X.; Ma, X.; Ma, M.; Wu, W.; Yu, L. Research and application of novel euler polynomial-driven grey model for short-term pm10 forecasting. Grey Syst. Theory Appl. 2020, 11. [Google Scholar] [CrossRef]
  33. Cheng, H.; Tan, P.; Gao, J.; Scripps, J. Multistep-ahead time series prediction. In Pacific-Asia Conference on Knowledge Discovery and Data Mining; Springer: Berlin/Heidelberg, Germany, 2006; pp. 765–774. [Google Scholar]
  34. Song, Y.; Li, H.; Xu, P.; Liu, D. A method of intrusion detection based on woa-xgboost algorithm. Discret. Dyn. Nat. Soc. 2022, 2022, 5245622. [Google Scholar] [CrossRef]
  35. Abbasi, A.; Firouzi, B.; Sendur, P. On the application of harris hawks optimization (hho) algorithm to the design of microchannel heat sinks. Eng. Comput. 2021, 37, 1409–1428. [Google Scholar] [CrossRef]
  36. Mirjalili, S.; Gandomi, A.H.; Mirjalili, S.Z.; Saremi, S.; Faris, H.; Mirjalili, S.M. Salp swarm algorithm: A bio-inspired optimizer for engineering design problems. Adv. Eng. Softw. 2017, 114, 163–191. [Google Scholar] [CrossRef]
  37. Andersen, V.; Nival, P. A model of the population dynamics of salps in coastal waters of the ligurian sea. J. Plankton Res. 1986, 8, 1091–1110. [Google Scholar] [CrossRef]
  38. Zhou, J.; Dai, Y.; Huang, S.; Armaghani, D.J.; Qiu, Y. Proposing several hybrid SSA—Machine learning techniques for estimating rock cuttability by conical pick with relieved cutting modes. Acta Geotech. 2022, 1–16. [Google Scholar] [CrossRef]
  39. Eberhart, R.; Kennedy, J. Particle swarm optimization. In Proceedings of the IEEE International Conference on Neural Networks, Perth, Australia, 27 November–1 December 1995; Citeseer: University Park, PA, USA, 1995; Volume 4, pp. 1942–1948. [Google Scholar]
  40. Fang, J.; Wang, H.; Yang, F.; Yin, K.; Lin, X.; Zhang, M. A failure prediction method of power distribution network based on PSO and XGBoost. Aust. J. Electr. Electron. Eng. 2022, 1–8. [Google Scholar] [CrossRef]
  41. Grichi, Y.; Dao, T.-M.; Beauregard, Y. A new approach for optimal obsolescence forecasting based on the random forest (rf) technique and meta-heuristic particle swarm optimization (pso). In Proceedings of the International Conference on Industrial Engineering and Operations Management, Paris, France, 26–27 July 2018. [Google Scholar]
  42. Liu, J.; Yang, D.; Lian, M.; Li, M. Research on intrusion detection based on particle swarm optimization in iot. IEEE Access 2021, 9, 38254–38268. [Google Scholar] [CrossRef]
  43. Mirjalili, S.; Mirjalili, S.M.; Lewis, A. Grey wolf optimizer. Adv. Eng. Softw. 2014, 69, 46–61. [Google Scholar] [CrossRef] [Green Version]
  44. Duan, Y.; Mao, Y.; Guo, Y.; Wang, X.; Gao, S. COVID-19 Propagation Prediction Model Using Improved Grey Wolf Optimization Algorithms in Combination with XGBoost and Bagging-Integrated Learning. Math. Probl. Eng. 2022, 2022, 1314459. [Google Scholar] [CrossRef]
  45. Wang, T.; Zhang, L.; Wu, Y. Research on transformer fault diagnosis based on gwo-rf algorithm. In Journal of Physics: Conference Series; IOP Publishing: Bristol, UK, 2021; Volume 1952, p. 032054. [Google Scholar]
  46. Heidari, A.A.; Mirjalili, S.; Faris, H.; Aljarah, I.; Mafarja, M.; Chen, H. Harris hawks optimization: Algorithm and applications. Future Gener. Comput. Syst. 2019, 97, 849–872. [Google Scholar] [CrossRef]
  47. Yang, F.; Guo, X. Research on rehabilitation effect prediction for patients with SCI based on machine learning. World Neurosurg. 2022, 158, e662–e674. [Google Scholar] [CrossRef] [PubMed]
  48. Mirjalili, S.; Mirjalili, S.M.; Hatamlou, A. Multi-verse optimizer: A nature-inspired algorithm for global optimization. Neural Comput. Appl. 2016, 27, 495–513. [Google Scholar] [CrossRef]
  49. Zhou, J.; Huang, S.; Qiu, Y. Optimization of random forest through the use of MVO, GWO and MFO in evaluating the stability of underground entry-type excavations. Tunn. Undergr. Space Technol. 2022, 124, 104494. [Google Scholar] [CrossRef]
  50. Mirjalili, S.; Lewis, A. The whale optimization algorithm. Adv. Eng. Softw. 2016, 95, 51–67. [Google Scholar] [CrossRef]
  51. Liu, D.; Fan, Z.; Fu, Q.; Li, M.; Faiz, M.A.; Ali, S.; Li, T.; Zhang, L.; Khan, M.I. Random forest regression evaluation model of regional flood disaster resilience based on the whale optimization algorithm. J. Clean. Prod. 2020, 250, 119468. [Google Scholar] [CrossRef]
  52. Breiman, L. Random forests. Mach. Learn. 2001, 45, 5–32. [Google Scholar]
  53. Ke, G.; Meng, Q.; Finley, T.; Wang, T.; Chen, W.; Ma, W.; Ye, Q.; Liu, T. Lightgbm: A highly efficient gradient boosting decision tree. In Proceedings of the 31st International Conference on Neural Information Processing Systems, Long Beach, CA, USA, 4–9 December 2017. [Google Scholar]
Figure 1. Overview of natural gas demand and supply of UK and Netherlands.
Figure 1. Overview of natural gas demand and supply of UK and Netherlands.
Energies 15 07437 g001
Figure 2. The “hold-out” method.
Figure 2. The “hold-out” method.
Energies 15 07437 g002
Figure 3. Multi-step forecasting strategy.
Figure 3. Multi-step forecasting strategy.
Energies 15 07437 g003
Figure 4. Flowchart of SSA optimization for hyperparameters of XGBoost.
Figure 4. Flowchart of SSA optimization for hyperparameters of XGBoost.
Energies 15 07437 g004
Figure 5. Complete computational procedures of the forecasting system.
Figure 5. Complete computational procedures of the forecasting system.
Energies 15 07437 g005
Figure 6. Geographical location of the UK and the Netherlands along with the autocorrelation of NGC.
Figure 6. Geographical location of the UK and the Netherlands along with the autocorrelation of NGC.
Energies 15 07437 g006
Figure 7. Convergence curves by GWO, HHO, MVO, PSO, WOA and SSA for XGBoost in different cases.
Figure 7. Convergence curves by GWO, HHO, MVO, PSO, WOA and SSA for XGBoost in different cases.
Energies 15 07437 g007
Figure 8. Convergence curves by GWO, HHO, MVO, PSO, WOA and SSA for LightGBM in different cases.
Figure 8. Convergence curves by GWO, HHO, MVO, PSO, WOA and SSA for LightGBM in different cases.
Energies 15 07437 g008
Figure 9. Convergence curves by GWO, HHO, MVO, PSO, WOA and SSA for RF in different cases.
Figure 9. Convergence curves by GWO, HHO, MVO, PSO, WOA and SSA for RF in different cases.
Energies 15 07437 g009
Figure 10. Average MAPEs of the NGC forecasting results.
Figure 10. Average MAPEs of the NGC forecasting results.
Energies 15 07437 g010
Figure 11. Average RMSEs of the NGC forecasting results.
Figure 11. Average RMSEs of the NGC forecasting results.
Energies 15 07437 g011
Figure 12. Convergence curves of hyperparameters of XGBoost by SSA.
Figure 12. Convergence curves of hyperparameters of XGBoost by SSA.
Energies 15 07437 g012
Figure 13. MAPEs of XGBoost, Random Forest and LightGBM with multi-step ahead forecasting steps for the UK NGC dataset.
Figure 13. MAPEs of XGBoost, Random Forest and LightGBM with multi-step ahead forecasting steps for the UK NGC dataset.
Energies 15 07437 g013
Figure 14. MAPEs of XGBoost, Random Forest and LightGBM with multi-step ahead forecasting steps for the Netherlands dataset.
Figure 14. MAPEs of XGBoost, Random Forest and LightGBM with multi-step ahead forecasting steps for the Netherlands dataset.
Energies 15 07437 g014
Figure 15. RMSEs of XGBoost, Random Forest and LightGBM with multi-step ahead forecasting steps for the UK NGC dataset.
Figure 15. RMSEs of XGBoost, Random Forest and LightGBM with multi-step ahead forecasting steps for the UK NGC dataset.
Energies 15 07437 g015
Figure 16. RMSEs of XGBoost, Random Forest and LightGBM with multi-step ahead forecasting steps for the Netherlands dataset.
Figure 16. RMSEs of XGBoost, Random Forest and LightGBM with multi-step ahead forecasting steps for the Netherlands dataset.
Energies 15 07437 g016
Figure 17. MAPE of models on different datasets.
Figure 17. MAPE of models on different datasets.
Energies 15 07437 g017
Figure 18. MAPE of models on different datasets.
Figure 18. MAPE of models on different datasets.
Energies 15 07437 g018
Figure 19. RMSEs of models on different datasets.
Figure 19. RMSEs of models on different datasets.
Energies 15 07437 g019
Figure 20. MAPEs of multi-step forecasts.
Figure 20. MAPEs of multi-step forecasts.
Energies 15 07437 g020
Figure 21. RMSEs of multi-step forecasts.
Figure 21. RMSEs of multi-step forecasts.
Energies 15 07437 g021
Figure 22. Raw data trend graph.
Figure 22. Raw data trend graph.
Energies 15 07437 g022
Table 1. Brief summary of literature NG forecasting.
Table 1. Brief summary of literature NG forecasting.
Model TypeReferenceModelConclusions
grey model[8]DFGM(1,1, t α )It is expected that China’s NGC will maintain an upward trend, reaching 439.14 billion cubic meters in 2025.
[9]GPRMGPRM method has high forecasting accuracy and applicability in the presence of limited data.
[10]TDPGM(1,1)The annual NGC will exceed 5000 ( 10 9 m 3 ) by 2020.
[11]A fractional-order incomplete gamma grey modelThe model has excellent predictive performance in predicting NGC and can be generalized to more energy forecasting problems.
[12]Fractional time delayed grey model optimized by GWOCompared with some traditional grey models, the new model has better forecasting performance and generalization.
[13]PFSM(1,1)This model is suitable for data with significant seasonal variation.
[14]FPDGM(1,1)The novel model has better predictive performance than the other models in all cases.
[15]DGMNF(1,1)The forecasting results obtained by the new model are more accurate and reliable than other models, and the forecasting error is smaller.
[16]CFNHGBM(1,1,k)The novel model outperforms other competitors.
[17]A novel self-adapting intelligent grey modelBy 2020, China’s NG demand will exceed 340 billion m 3 .
Machine learning model[18]GB, GB-PCA, ANN-CG-PCAThe forecasting accuracy of the combined model is better than that of the individual models, and the MAPE of the combined model is about 15% smaller than that of the individual models.
[19]ANNThe system can be used to monitor the necessary gas flow and predict demand changes due to internal and external temperature, which can effectively reduce costs.
[20]
[21]MLR, SVR, ANNThe forecasting performance of SVR is much better than that of ANN, and it has a smaller forecasting error in NGC forecasting, and can provide more reliable and accurate results.
[22]GRA-LSSVMThe proposed model has a better generalization ability, and compared with the PSO algorithm and the SecPSO algorithm, the GRA-LSSVM model optimized by WASecPSO has higher forecasting accuracy.
Deep learning model[23]A hybrid model based on wavelet transformWavelet transform can effectively improve the forecasting accuracy of the model, and the forecasting accuracy of the hybrid model exceeds that of other AI models.
[24]MLP, LSTMA two-stage FM-MLP method is proposed.
[25]LMD-WTD-LSTMWhen the forecasting time length is 20 days, this method has the best forecasting performance among the five methods, and its MAPE is 11.63%.
[26]ISSA-LSTMISSA-LSTM is the best performing model among all the forecasting models. In its forecasts in the four cities of London, Melbourne, Karditsa, and Hong Kong, the obtained MAPE values are 4.68%, 5.72%, 5.76%, and 14.10%, respectively.
Time series[27]An integrated genetic-ARMA approachThe proposed hybrid model has more stable forecasting performance, outperforming the classic ARMA model in terms of MAPE.
Other model[28]Integrated assessment modelsChina’s total primary energy consumption in 2060 will be smaller than in 2019 and NGC will account for approximately 6% of China’s total primary energy consumption in 2060
[29]MARS, CMARSMARS and CMRS outperform NN and LR in all evaluation metrics.
Table 2. Hybrid model for comparison.
Table 2. Hybrid model for comparison.
AlgorithmModelHybrid Mode
SSA [36]XGBoostSSA-XGBoost
Random ForestSSA-RF [38]
LightGBM (LGB)SSA-LGB
PSO [39]XGBoostPSO-XGBoost [40]
Random ForestPSO-RF [41]
LightGBMPSO-LGB [42]
GWO [43]XGBoostGWO-XGBoost [44]
Random ForestGWO-RF [45]
LightGBMGWO-LGB
HHO [46]XGBoostHHO-XGBoost
Random ForestHHO-RF [47]
LightGBMHHO-LGB
MVO [48]XGBoostMVO-XGBoost
Random ForestMVO-RF [49]
LightGBMMVO-LGB
WOA [50]XGBoostWOA-XGBoost [34]
Random ForestWOA-RF [51]
LightGBMWOA-LGB
Table 3. Metrics for evaluating the accuracy of forecasting models.
Table 3. Metrics for evaluating the accuracy of forecasting models.
MetricsEquationRemark
MAPE MAPE = 100 % n t 1 n A t F t A l The smaller, the better
RMSE RMSE = 1 n t 1 n A t F t A t 2 The smaller, the better
Table 4. Statistical features of the dataset.
Table 4. Statistical features of the dataset.
DatasetIntervalMeanMaximumMinimumStandard DeviationNumbersUnits
NGC (UK)Quarterly146,035.137257,790.41051,914.49063,678.84893Gigawatt–hour
NGC (Netherlands)Monthly3682.2307079.0001696.0001223.898472million m 3
Table 5. MAPEs of multi-step ahead forecasting of the NGC of UK.
Table 5. MAPEs of multi-step ahead forecasting of the NGC of UK.
IndicesXGBoost Random Forest LightGBM
1-Step2-Step3-Step4-Step5-Step 1-Step2-Step3-Step4-Step5-Step 1-Step2-Step3-Step4-Step5-Step
τ = 6 SSA14.1244.4284.4534.3044.298 9.7269.75010.75711.47611.894 6.3896.1846.2805.7235.492
PSO5.3555.4145.0814.8094.592 7.5297.3686.7276.3435.988 7.5517.4537.6877.2637.263
GWO6.1026.3106.6996.8866.728 6.0327.6989.0899.38010.071 7.1967.0507.1176.5106.517
WOA6.7406.4796.1755.5085.349 9.57311.51813.63815.04915.191 6.9806.9257.3517.0387.042
HHO5.9076.1145.8575.4975.290 8.8679.70310.49710.60210.879 6.9026.7346.8646.3246.124
MVO5.6735.6455.5285.4015.362 9.0969.6049.48510.00110.460 7.2017.0537.1206.5116.512
τ = 9 SSA5.8395.8095.7915.5155.300 7.0206.5286.3296.1025.855 9.74910.27310.41510.1199.977
PSO5.7986.1066.8317.3557.619 8.4288.6689.3249.4979.666 9.96010.47210.64310.33510.204
GWO6.3806.5917.2507.4747.787 12.45713.16313.65213.69413.847 9.76710.29210.43710.1419.999
WOA7.3977.6307.7647.6987.618 9.4249.6329.7549.2838.961 7.9958.7518.9608.6128.566
HHO6.0876.1686.2516.2646.215 10.0119.6959.8679.5949.729 9.72910.23610.32710.0099.864
MVO6.9287.1176.9206.6166.442 8.3788.4868.5998.7058.908 9.75510.27910.42210.1269.984
τ = 12 SSA4.4904.7345.1825.2875.188 8.0097.7557.7677.4897.328 15.68415.96616.24816.31516.657
PSO7.1506.9387.3667.6667.835 7.1477.2127.4937.4217.458 15.68415.96616.24816.31516.657
GWO6.7366.7246.8777.1527.375 7.3907.7987.9367.5857.418 15.68115.96416.24616.31116.652
WOA6.7316.4776.5946.5776.786 6.8886.9477.8487.9778.152 15.68415.96616.24816.31516.657
HHO6.0726.5426.7806.8647.070 10.64910.47710.84710.48110.456 15.51815.87216.11815.98716.172
MVO5.4905.6065.8525.9295.981 8.0458.0438.0458.0707.783 15.65016.04316.33716.31416.564
1 All the bold numbers represent the best (smallest) metrics. And it is the same case in Table 6, Table 7 and Table 8.
Table 6. MAPEs of multi-step ahead forecasting of the NGC of Netherlands.
Table 6. MAPEs of multi-step ahead forecasting of the NGC of Netherlands.
IndicesXGBoost Random Forest LightGBM
1-Step2-Step3-Step4-Step5-Step 1-Step2-Step3-Step4-Step5-Step 1-Step2-Step3-Step4-Step5-Step
τ = 6 SSA8.8899.5289.96610.44510.693 11.29012.55713.41413.89414.003 13.60515.78216.69717.52117.880
PSO9.48310.24710.59510.76510.980 10.99012.23913.22913.82114.100 12.73314.15415.29116.13616.519
GWO10.05210.97411.61911.89812.050 11.22712.31913.56814.73715.569 12.82014.29415.51916.39516.848
WOA10.15711.05711.55911.71311.945 11.52612.98414.07614.63914.852 11.64613.20914.43515.53316.265
HHO9.65610.65011.12011.44411.549 10.81612.19513.33913.92714.157 12.56314.02615.12715.81916.318
MVO9.36610.23310.63110.82611.149 11.93912.32913.62914.46814.703 9.36610.23310.63110.82611.149
τ = 9 SSA9.36510.05810.13610.23510.326 11.27211.97512.48712.73412.906 12.08513.29813.67913.89713.866
PSO9.66310.60010.94511.02611.105 11.31912.34713.04813.41513.637 11.94313.18513.78514.14014.135
GWO9.68710.43810.81710.77510.637 12.29213.22213.77313.98514.125 11.46612.51413.00213.18513.067
WOA10.02410.89211.22611.27711.326 11.11112.41513.08813.41013.610 10.83511.97412.57912.92313.106
HHO10.01910.94911.37511.54711.669 11.62112.76613.38413.57113.577 10.85012.11212.86413.25013.410
MVO9.55210.10010.33410.39210.374 11.43012.61213.42913.74513.886 9.55210.10010.33410.39210.374
τ = 12 SSA7.2387.1757.2117.2487.307 8.5078.7558.9169.0479.101 9.3179.95210.15310.15410.188
PSO7.1177.5657.7127.8717.908 8.5998.9669.1829.3049.374 9.4779.96310.11810.15810.148
GWO7.6097.8467.8727.8797.935 9.2719.5979.8119.97410.000 8.7779.0409.1969.2979.278
WOA7.7227.9698.3488.5258.532 8.9709.4859.7419.8839.898 9.4869.95610.05210.16510.110
HHO7.5837.7657.8717.9377.996 8.8579.2479.4969.6569.729 9.66210.11810.12110.11610.003
MVO7.9097.8537.9227.9958.014 9.0359.3519.5519.7599.836 7.9097.8537.9227.9958.014
Table 7. RMSEs of multi-step ahead forecasting of the NGC of UK.
Table 7. RMSEs of multi-step ahead forecasting of the NGC of UK.
IndicesXGBoost Random Forest LightGBM
1-Step2-Step3-Step4-Step5-Step 1-Step2-Step3-Step4-Step5-Step 1-Step2-Step3-Step4-Step5-Step
τ = 6SSA7083.7897284.4557360.3007397.3507625.696 11,224.13010,725.46012,734.97814,494.50915,601.880 9130.4018297.7298132.2637825.3977720.972
PSO7697.1417677.1787379.9427294.6247278.992 12,259.02911,750.40411,103.52810,886.96310,557.026 10,049.9309488.3479467.4169325.1549472.552
GWO8676.6288805.2018986.4799205.3128921.273 10,619.73912,073.00512,891.80613,235.47215,042.777 9849.7269167.9829060.3858792.4759404.556
WOA12,758.53610,620.4009585.0158832.1599084.639 22,079.33325,402.29127,561.55029,142.25928,812.118 8774.8368307.7448472.0848394.0228518.347
HHO8257.15310,896.83511,838.19312,340.04413,144.967 10,944.11711486.99812403.30012,759.11513,076.733 9513.7388768.5118650.1058384.8358318.968
MVO10,667.40510,626.7559712.3749297.3569600.802 11,110.34411,430.62311,080.07711,936.99012,432.405 9870.9439186.5269078.6988808.8959413.312
τ = 9SSA7365.3637028.2226955.8426905.6316727.568 12,405.34115,353.61416,598.81016,810.80616,476.152 13,307.40913,521.69413,707.76013,881.91014,007.213
PSO12,801.21013,169.91213,894.77114,508.96414,837.154 11,696.77111,844.59512,250.96112,589.01612,784.163 13,340.53013,525.82113,718.93813,881.42014,018.135
GWO10,107.08810,325.10910,860.83211,271.83111,819.062 24,427.49325,134.85225,866.76426,620.19627,366.568 13,316.94513,533.25713,720.70713,895.57714,019.931
WOA11,756.11011,999.82012,274.93812,575.96012,688.952 10,208.06610,170.30110,240.14410,148.7479890.040 10,213.10810,747.02610,982.41211,076.59711,284.956
HHO8503.4898498.4068755.7589022.4359012.168 11,593.67611,088.77511,133.85311,124.31711,365.227 13,122.18613,342.09613,490.78013,642.93713,772.342
MVO13,149.16513,448.24113,482.31113,670.17413,938.481 11,991.06411,988.07112,168.60312,449.39412,785.796 13,310.37513,525.28913,711.78413,886.15814,011.166
τ = 12SSA8379.8248621.3198902.9759156.6378951.197 11,384.76410,343.04410,099.48110,007.1999918.844 30,666.75331,186.12831,952.26132,858.98735,050.104
PSO16,009.91215,760.47816,094.09016,413.96516670.100 9697.0539716.7629935.18010,124.93410,312.847 30,666.75731,186.13231,952.26532,858.99135,050.108
GWO13932.08814115.73214451.14814859.80915245.074 8995.5549254.0929414.6839450.7399505.770 30,654.42331,174.29931,940.25132,846.56435,038.724
WOA9890.6869565.6119614.9299758.71110,058.354 15,973.33916,225.19516,731.54217,185.03617,673.006 30,666.73631,186.11231,952.24532,858.97035,050.089
HHO12,460.22512,891.54413,278.33213,685.56614,288.333 11,864.54111,211.50411,193.03411,045.13611,083.211 29,638.49630,214.22430,988.83431,862.58234,091.278
MVO12,045.23312,294.36512,637.37913,012.69213,337.793 17,104.63817,226.86617,563.21418,024.56817,815.142 30,137.67930,755.02231,546.29232,447.90634,541.608
Table 8. RMSEs of multi-step ahead forecasting of the NGC of UK Netherlands.
Table 8. RMSEs of multi-step ahead forecasting of the NGC of UK Netherlands.
IndicesXGBoost Random Forest LightGBM
1-Step2-Step3-Step4-Step5-Step 1-Step2-Step3-Step4-Step5-Step 1-Step2-Step3-Step4-Step5-Step
τ = 6 SSA356.238381.175401.012417.665430.288 472.075532.859576.005599.399597.645 546.790667.395716.870760.507773.509
PSO373.979400.275420.036427.138433.865 471.816524.954567.269594.772598.810 524.414616.136675.307717.661730.802
GWO407.599442.148467.035483.877488.219 493.738537.951594.793645.197668.219 535.987623.412678.135715.468732.752
WOA408.537442.148467.193477.913481.535 493.536560.126604.106628.672633.016 498.255575.298620.185668.858698.847
HHO406.515435.701458.468471.961470.648 461.945524.314575.269602.803608.983 540.492621.025672.508707.921728.220
MVO388.870418.748435.887444.497451.226 509.677536.868581.791614.797628.032 524.460616.209675.389717.747730.876
τ = 9 SSA384.360408.778418.485425.234425.147 479.534508.496532.474546.459554.607 511.036563.624583.815593.139591.898
PSO403.497432.150446.117450.034448.399 482.550533.534561.512577.765586.517 496.293554.076580.429599.770602.119
GWO384.848406.469428.627429.633425.440 535.503571.591589.594593.953597.448 485.978525.657545.414556.849553.014
WOA412.235442.998459.982464.254463.782 450.004511.061546.656560.572566.189 483.814535.551563.002578.734586.113
HHO428.424456.915474.113479.481480.546 476.351527.784559.621569.669569.772 480.889531.030560.691578.016585.106
MVO389.824409.517420.104422.943419.757 471.128527.959566.788581.958588.160 516.489558.465585.009600.780600.495
τ = 12 SSA311.836313.310316.684320.091323.343 359.217367.487378.066384.599388.549 401.884426.376436.110441.555445.513
PSO308.835329.864335.774341.866342.365 376.505389.588400.976408.514411.706 407.908430.400433.532439.031442.448
GWO331.762343.138344.481345.524347.518 398.146415.099423.329430.700431.755 399.393415.227420.986425.814425.697
WOA340.117343.945361.685370.629371.046 388.525412.406423.497430.657431.623 422.878444.544449.673454.801452.427
HHO327.979332.795337.025340.658342.889 385.326395.703407.409414.682418.466 421.483437.880440.650442.834442.810
MVO335.774338.018341.628345.156346.876 378.489394.041405.139415.111418.640 424.321435.284439.702444.536441.716
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Zhang, L.; Ma, X.; Zhang, H.; Zhang, G.; Zhang, P. Multi-Step Ahead Natural Gas Consumption Forecasting Based on a Hybrid Model: Case Studies in The Netherlands and the United Kingdom. Energies 2022, 15, 7437. https://doi.org/10.3390/en15197437

AMA Style

Zhang L, Ma X, Zhang H, Zhang G, Zhang P. Multi-Step Ahead Natural Gas Consumption Forecasting Based on a Hybrid Model: Case Studies in The Netherlands and the United Kingdom. Energies. 2022; 15(19):7437. https://doi.org/10.3390/en15197437

Chicago/Turabian Style

Zhang, Longfeng, Xin Ma, Hui Zhang, Gaoxun Zhang, and Peng Zhang. 2022. "Multi-Step Ahead Natural Gas Consumption Forecasting Based on a Hybrid Model: Case Studies in The Netherlands and the United Kingdom" Energies 15, no. 19: 7437. https://doi.org/10.3390/en15197437

APA Style

Zhang, L., Ma, X., Zhang, H., Zhang, G., & Zhang, P. (2022). Multi-Step Ahead Natural Gas Consumption Forecasting Based on a Hybrid Model: Case Studies in The Netherlands and the United Kingdom. Energies, 15(19), 7437. https://doi.org/10.3390/en15197437

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop