A Comparative Study of Forecasting Electricity Consumption Using Machine Learning Models

: Production of electricity from the burning of fossil fuels has caused an increase in the emission of greenhouse gases. In the long run, greenhouse gases cause harm to the environment. To reduce these gases, it is important to accurately forecast electricity production, supply and consumption. Forecasting of electricity consumption is, in particular, useful for minimizing problems of overproduction and oversupply of electricity. This research study focuses on forecasting electricity consumption based on time series data using different artiﬁcial intelligence and metaheuristic methods. The aim of the study is to determine which model among the artiﬁcial neural network (ANN), adaptive neuro-fuzzy inference system (ANFIS), least squares support vector machines (LSSVMs) and fuzzy time series (FTS) produces the highest level of accuracy in forecasting electricity consumption. The variables considered in this research include the monthly electricity consumption over the years for different countries. The monthly electricity consumption data for seven countries, namely, Norway, Switzerland, Malaysia, Egypt, Algeria, Bulgaria and Kenya, for 10 years were used in this research. The performance of all of the models was evaluated and compared using error metrics such as the root mean squared error (RMSE), average forecasting error (AFE) and performance parameter (PP). The differences in the results obtained via the different methods are analyzed and discussed, and it is shown that the different models performed better for different countries in different forecasting periods. Overall, it was found that the FTS model performed the best for most of the countries studied compared to the other three models. The research results can allow electricity management companies to have better strategic planning when deciding on the optimal levels of electricity production and supply, with the overall aim of preventing surpluses or shortages in the electricity supply.


Introduction
Electricity consumption, production and supply are increasingly important areas that are being looked into seriously by governments, researchers and corporate companies due to the fact of their inevitable importance on livelihoods and economic development all around the world. Electricity is conventionally generated using sources of primary energy including fossil fuels, nuclear energy and renewable energy. However, a high percentage et al. [17] studied the application of the ANN model for forecasting stock prices, and these studies found that the ANN model produced the most accurate results.
Kaytez et al. [18] applied the LSSVM model for forecasting electricity consumption in Turkey and found that this model performed better than the other models. Pham et al. [19], Ahmadi et al. [20], Kisi and Parmar [21], Deo et al. [22], and Arabloo et al. [23] studied the LSSVM model in environmental forecasting, whereby all but [19,22] found that the LSSVM model performed the best. Efendi et al. [24,25] used the FTS model to forecast the electric load in Taiwan, using Taiwan's regional electric load from 1981 to 2000, and in the forecasting of the electricity load demand in Malaysia using the daily electricity load data from the National Electricity Board of Malaysia (TNB) from January to August 2006 in [24,25], respectively. Chen [26], Lee et al. [27], and Sun et al. [28] also used the FTS model in forecasting and all of the studies in [24][25][26][27][28] found that the FTS model produced the best results.
There has been also massive research on the use of machine learning models in the area of forecasting, and this has led to an increase in the introduction of hybrid models that combine traditional statistical models with the latest machine learning models [29]. Semero et al. [30] used an integrated GA-PSO-ANFIS method to forecast electricity production, and Göçken et al. [31] introduced a hybrid ANN model that used metaheuristic methods and applied this model to stock price prediction, whereas Shukur and Lee [32] studied daily wind speed forecasting using a hybrid KF-ANN model that was based on the ARIMA model. Chaabane [33] introduced a hybrid ARFIMA and neural network model to forecast electricity prices, while Cerjan et al. [34] and Ardakani and Ardehali [35] studied short-term and long-term electricity forecasting, respectively, using different types of dynamic hybrid models. Khandelwal et al. [36] and Babu and Reddy [37] studied time series forecasting using different types of hybrid ARIMA and ANN models. Kabran and Ünlü [38], on the other hand, used a two-step machine learning approach on the support vector machine (SVM). Yuan et al. [39], Zhu and Chevallier [40], Jung et al. [41] and Li et al. [42] all used various types of hybrid LSSVM models and applied these to problems related to forecasting and prediction. Chen and Chen [43], Dincer and Akkuş [44] and Wang et al. [45] used hybrid FTS models in forecasting stock prices and air pollution, respectively.
Even though studies exist regarding the application of machine learning models to the forecasting of electricity consumption, none have been published to validate and compare several typical forecasting methods within a concrete case study with real data. This paper is structured as follows. In Section 2, we recapitulate the concepts related to the ANN, ANFIS, LSSVM and FTS models. In Section 3, we introduce our proposed methodology on forecasting electricity consumption with the proposed models. In Section 4, the implementation of the methodology is described, and the results are analyzed. Electricity consumption data for the seven studied countries were obtained from ceicdata.com. In Section 5, a summary of our findings is presented. In Section 6, the limitations of this research are presented. Finally, Abbreviations section provides a table of the acronyms that are used throughout the present work and their descriptions.

Preliminaries
In this section, we briefly present an introduction to the concepts that are pertinent to the study presented in this paper.

Artificial Neural Network (ANN)
McCulloch and Pitts [1] introduced this model whereby the neural network structure is based on the neurons in the human nervous system. The dendrites receive information from other neurons, which is processed through synapses and is sent to the axon for output. Figure 1 shows an example of the multilayer perceptron (MLP), which is the network structure of the ANN that consists of three layers: the input layer, the hidden layer, and the output layer, all of which are connected through weights. Every neuron in the hidden layer is connected to every neuron in the input layer and the output layer [46]. External information is received from the input layer, and the result is sent out in the output layer. The parameters of the neural network structure are adjusted to identify which structure gives a more accurate result, thus increasing the performance of predicting the testing data [47].
McCulloch and Pitts [1] introduced this model whereby the neural network structure is based on the neurons in the human nervous system. The dendrites receive information from other neurons, which is processed through synapses and is sent to the axon for output. Figure 1 shows an example of the multilayer perceptron (MLP), which is the network structure of the ANN that consists of three layers: the input layer, the hidden layer, and the output layer, all of which are connected through weights. Every neuron in the hidden layer is connected to every neuron in the input layer and the output layer [46]. External information is received from the input layer, and the result is sent out in the output layer. The parameters of the neural network structure are adjusted to identify which structure gives a more accurate result, thus increasing the performance of predicting the testing data [47]. Generally, there is a transfer function that connects the hidden layer to the output, which is given by ( ) = 1/(1 + ), where is the input.
The MLP with only the input layer and the hidden layer can be computed using the equation below: where is the output, and denotes the connection weights. The function of the hidden layer is given by: Referring to Equation (2), the connection weights are denoted as and , , while is the number of input nodes, is the number of output nodes and is the error term. Thus, Equation (2) maps a nonlinear equation based on the historical observations given by = , , … , , + , whereby is the function formed by the connection weights, and is a vector for all parameters [48]. Generally, there is a transfer function that connects the hidden layer to the output, which is given by g( The MLP with only the input layer and the hidden layer can be computed using the equation below: where Y t is the output, and W i Y i denotes the connection weights. The function of the hidden layer is given by: Referring to Equation (2), the connection weights are denoted as W k and W j,k , while p is the number of input nodes, q is the number of output nodes and ε t is the error term. Thus, Equation (2) maps a nonlinear equation based on the historical observations given by whereby g is the function formed by the connection weights, and ω is a vector for all parameters [48].

Adaptive Neuro-Fuzzy Inference System (ANFIS)
This model was introduced by Jang [2], and it was based on the Takagi-Sugeno inference system. This model was proposed to overcome some of the weaknesses of the ANN model as well as some of the weaknesses of the fuzzy logic system. The ANFIS uses the hybrid learning method to decide the optimal distribution of membership functions in order to obtain the mapping relationship of the input and output data [49]. Figure 2 shows the basic ANFIS model consisting of two input data and one output. The rule base of the ANFIS contains the IF-THEN rules of the Sugeno type. The rules are as shown below: Rule 1. If x is A 1 and y is B 1 , then f 1 = p 1 x + q 1 y + r 1 .
Rule 2. If x is A 2 and y is B 2 , then f 2 = p 2 x + q 2 y + r 2 . where A i and B i are known as linguistic variables of the fuzzy sets; x and y are the input data; p i , q i and r i are the output parameters. The ANFIS model consists of five layers, and they are explained below. Layer 1 can be known as the fuzzification layer. The nodes are fuzzified in the first layer to provide the output stated as Every node in this layer will have a bell function for fuzzification, which is: where x is known as the input; a i , b i and c i are the premise parameters of control; µ Ai (x) is known as the output.

Adaptive Neuro-Fuzzy Inference System (ANFIS)
This model was introduced by Jang [2], and it was based on the Takagi-Sugeno inference system. This model was proposed to overcome some of the weaknesses of the ANN model as well as some of the weaknesses of the fuzzy logic system. The ANFIS uses the hybrid learning method to decide the optimal distribution of membership functions in order to obtain the mapping relationship of the input and output data [49]. Figure 2 shows the basic ANFIS model consisting of two input data and one output. The rule base of the ANFIS contains the IF-THEN rules of the Sugeno type. The rules are as shown below: where and are known as linguistic variables of the fuzzy sets; and are the input data; , and are the output parameters. The ANFIS model consists of five layers, and they are explained below. Layer 1 can be known as the fuzzification layer. The nodes are fuzzified in the first layer to provide the output stated as = ( ), = 1, 2 and = ( ), = 3, 4. Every node in this layer will have a bell function for fuzzification, which is: where is known as the input; , are the premise parameters of control; ( ) is known as the output.
In Layer 2, every node will be multiplied by input signals to serve as output given as = = ( ) ( ), = 1, 2. The output, , is also known as the firing strength of rules.
Layer 3 is the normalization layer, also known as the normalization of the firing strength. The output of the third layer is denoted as = = .
Layer 4 is known as the defuzzification stage, where the firing strengths from the third layer are multiplied by the first-order polynomial of the Sugeno model and then normalized. The output is denoted as  In Layer 2, every node will be multiplied by input signals to serve as output given as O 2 i = w i = µ Ai (x)µ Bi (y), i = 1, 2. The output, w i , is also known as the firing strength of rules.
Layer 3 is the normalization layer, also known as the normalization of the firing strength. The output of the third layer is denoted as O 3 i = w i = w i w 1 +w 2 . Layer 4 is known as the defuzzification stage, where the firing strengths from the third layer are multiplied by the first-order polynomial of the Sugeno model and then normalized. The output is denoted as O 4 i = w i f i = w i (p i x + q i y + r i ), i = 1, 2, where p i , q i and r i are the consequent parameters.
Layer 5 is where all input signals are summed to calculate the overall output of the ANFIS model. The output is denoted as where f i is the first-order polynomial based on the first-order Sugeno model.

Least Squares Support Vector Machines (LSSVMs)
This model was proposed by Suykens and Vandewalles [3] in order to solve quadratic programming (QP) problems faced by the support vector machines (SVMs). Instead of solving QP problems, LSSVMs solve a set of linear equations under the least squares cost function with equality constraints, thus reducing the complexity of computation [51]. Wang and Yu [52] used the LSSVM model to forecast electricity consumption. The modified LSSVM model introduced by Wang and Yu [52] is presented below.

•
The modified LSSVM model by Wang and Yu [52] supposing the extracted samples are D = {(x 1 , y 1 ), (x 2 , y 2 ), . . . , (x N , y N )}, where N is the number of samples and x i is the extracted factor vector, x i ∈ R n , y i ∈ R; • The electricity consumption model, y = w T ϕ(x) + b, is derived from the data by minimizing the least squares cost function, min The regularization and error term are defined as E w = 1 2 w T w and E D = 1 2 ∑ N i=1 ei 2 . Thus, the minimized cost function is min is constructed by introducing the Lagrange multipliers for equality constraints and taking the conditions for optimality to find the solution for the minimized cost function; • A linear Karush-Kuhn-Tucker (KKT) system, used to find the load model, is ob- The possible kernel functions are linear kernel, K(x 1 , x 2 ) = x T 1 x 2 and radial basis function (RBF) kernel, K(x 1 , where Mercer's condition holds for all possible kernel parameters; • Then, the electricity consumption regressor is constructed as The mapping relationship of electricity consumption and its extracted influence factors are obtained in this way.

Fuzzy Time Series (FTS)
In 1965, Zadeh [4] developed the fuzzy set theory in order to solve the vagueness of the data by combining linguistic variables with the analysis process of applying fuzzy logic into time series. Song and Chissom [53] further expanded the study of Zadeh's fuzzy set theory in forecasting. In 1996, Chen [54] improved the steps involved in the fuzzy time series (FTS) model using simple operations. The main characteristic of Chen's model is that it uses simple calculations and can provide better forecasting results [55]. The model begins with the process of fuzzification, developing fuzzy logical relationships (FLRs), forming the fuzzy logical group (FLG) and the defuzzification process [25]. The definitions and concepts of FTS forecasting were developed by Song and Chissom [56] as well as by Singh [57].
Singh [57] developed a method for time series to solve real-life problems. The steps for FTS forecasting based on historical time series data that were introduced by Singh [57] is presented below ( Figure 3): Step 1: Define the universe of discourse (U).
Step 2: Divide the universe of discourse into equal-length intervals, u 1 , u 2 , . . . , u m , according to the number of linguistic variables, A 1 , A 2 , . . . , A m . The number of intervals is the same as the number of linguistics variable, which is m.
Step 3: Define a fuzzy set for observation according to the intervals in Step 2. The triangular membership rule is applied to each interval in each fuzzy set that is constructed.
Step 5: Establish FLRs by the following rule: Rule: A i (current state) is a fuzzy production of year n, A j (next state) is a fuzzy production of year n + 1; then, the FLRs is denoted as A i → A j .
Step 6: Determine the forecasting rule.  Step 1: Define the universe of discourse ( ).
Step 2: Divide the universe of discourse into equal-length intervals, , , … , , according to the number of linguistic variables, , , … , . The number of intervals is the same as the number of linguistics variable, which is .
Step 3: Define a fuzzy set for observation according to the intervals in Step 2. The triangular membership rule is applied to each interval in each fuzzy set that is constructed.
Step 5: Establish FLRs by the following rule: Rule: (current state) is a fuzzy production of year , (next state) is a fuzzy production of year + 1; then, the FLRs is denoted as → .
Step 6: Determine the forecasting rule.

Methodology
In this section, we present the research methods used in this paper. The section also presents a description of the countries studied as well as the utilized data sources, error metrics and forecasting procedures.

Countries Chosen for the Study
The seven countries studied in this paper were Norway, Switzerland, Malaysia, Egypt, Algeria, Bulgaria and Kenya. The selection of these specific countries was mainly based on their level of development, whereby Norway and Switzerland are developed countries; Malaysia, Egypt, Algeria and Bulgaria are developing countries; Kenya is an underdeveloped country. In this research, the electricity consumption data for the seven

Methodology
In this section, we present the research methods used in this paper. The section also presents a description of the countries studied as well as the utilized data sources, error metrics and forecasting procedures.

Countries Chosen for the Study
The seven countries studied in this paper were Norway, Switzerland, Malaysia, Egypt, Algeria, Bulgaria and Kenya. The selection of these specific countries was mainly based on their level of development, whereby Norway and Switzerland are developed countries; Malaysia, Egypt, Algeria and Bulgaria are developing countries; Kenya is an underdeveloped country. In this research, the electricity consumption data for the seven countries studied were required in order to train and test the forecasting models. The electricity consumption data were obtained from ceicdata.com; the monthly electricity consumption data for the years 2007 to 2016 were utilized in this study. A data set from the years 2007 to 2015 was used as the training set, while a data set for the year 2016 was used as the testing set.

Error Metrics
There are many error metrics that can be used to compare the accuracy of the forecasting models such as mean absolute error (MAE), mean absolute deviation (MAD), root mean square error (RMSE), average forecasting error (AFE) and performance parameter (PP). In this paper, the accuracy of the forecasting results was compared using the RMSE, AFE and PP metrics. The reason for using these specific error metrics was because RMSE is the most popular error metric used in regression problems. AFE was used to calculate the mean absolute forecasting error based on the relativeness of the error to the actual value, whereas PP was used to indicate the efficiency of the model. The formulae to calculate these three metrics are as below:

Forecasting Procedures
The procedures that were implemented for the forecasting of electricity consumption are briefly expounded upon in this section.

Overview of Forecasting Procedures
The overview of the forecasting process is shown in Figure 4 below. mean square error (RMSE), average forecasting error (AFE) and performance parameter (PP). In this paper, the accuracy of the forecasting results was compared using the RMSE, AFE and PP metrics. The reason for using these specific error metrics was because RMSE is the most popular error metric used in regression problems. AFE was used to calculate the mean absolute forecasting error based on the relativeness of the error to the actual value, whereas PP was used to indicate the efficiency of the model. The formulae to calculate these three metrics are as below:

Forecasting Procedures
The procedures that were implemented for the forecasting of electricity consumption are briefly expounded upon in this section.

Overview of Forecasting Procedures
The overview of the forecasting process is shown in Figure 4 below.

ANN
The "keras" library in the Spyder IDE (https://keras.io/, accessed on 5 November 2021) was used to model the artificial neural network. The electricity consumption data were normalized using the formula as given below: The normalized data were then imported into the data frame, and the model was trained using 2 hidden layers (6,3). The model was then used to forecast the electricity consumption for 2016.

ANFIS
The computation for the ANFIS was conducted using the Fuzzy Logic toolbox in MAT-LAB. The training and testing data were imported into workspace. Then, the Neuro-fuzzy Designer window was initiated using anfisedit(). The model was trained and exported to the workspace to generate output values. The computation for the LSSVMs was performed using the LSSVMlab toolbox in MATLAB. The training and testing data were imported into the workspace. Then, the model was tuned using the LSSVMlab's built-in procedure. The model was trained and used to forecast electricity consumption for the year 2016.

FTS
The computation for the FTS was conducted in RStudio using the AnalyseTS package. Figure 3 displays the general procedures for forecasting using the fuzzy time series model. The data set was first imported into RStudio and was fit into a time series. Then, the time series data were fit into Singh's fuzzy time series model.

Performance Evaluation
In this section, a brief overview of the countries studied is discussed. The evaluation of the error metrics computed from the forecasted results and actual results are presented as well.

Brief Overview of the Countries Studied
In this section, a brief overview of the seven countries that were studied in this paper, namely, Norway, Switzerland, Malaysia, Egypt, Algeria, Bulgaria and Kenya, are presented.

Norway
A plot of Norway's electricity consumption from 2007 to 2016 is shown in Figure 5. Norway is a highly developed country due to the fact of its high standard of living as well as high human development. Although Norway has a rather low population count, this country has a large energy-intensive manufacturing sector, hence, explaining the high consumption of electricity. Norway experiences winter from December to February every year and also faces polar nights in midwinter, where daylight only lasts for approximately five to six hours. Citizens in Norway may use more electricity during the winter for heating purposes, which explains the higher electricity consumption from December to February. Electricity is widely used to heat up buildings and water in Norway compared to other countries in the world. As Norway experiences summer from June to August, there is a lesser need for citizens to use electricity for heating purposes. Furthermore, hydropower is Norway's main source of energy, and Norway is able to generate enough energy for their own usage.

Switzerland
A plot of Switzerland's electricity consumption from 2007 to 2016 is shown in Figure  6. Switzerland is also a highly developed country with low unemployment and a highly skilled labor force. Since Switzerland is already a developed country, the electricity consumption pattern for every year was almost the same. The climate in Switzerland is often moderate, where it does not get too warm during summer or too cold during winter. However, citizens in Switzerland may use more electricity during the winter from Decem-

Switzerland
A plot of Switzerland's electricity consumption from 2007 to 2016 is shown in Figure 6. Switzerland is also a highly developed country with low unemployment and a highly skilled labor force. Since Switzerland is already a developed country, the electricity consumption pattern for every year was almost the same. The climate in Switzerland is often moderate, where it does not get too warm during summer or too cold during winter. However, citizens in Switzerland may use more electricity during the winter from December to February for heating purposes. Switzerland's main source of energy is hydropower, since approximately two-thirds of the country's land is covered by the Alps, and Switzerland is able to produce enough energy for their own usage.

Switzerland
A plot of Switzerland's electricity consumption from 2007 to 2016 is shown in Figure  6. Switzerland is also a highly developed country with low unemployment and a highly skilled labor force. Since Switzerland is already a developed country, the electricity consumption pattern for every year was almost the same. The climate in Switzerland is often moderate, where it does not get too warm during summer or too cold during winter. However, citizens in Switzerland may use more electricity during the winter from December to February for heating purposes. Switzerland's main source of energy is hydropower, since approximately two-thirds of the country's land is covered by the Alps, and Switzerland is able to produce enough energy for their own usage.  Figure 7. Malaysia is a developing country. Even though Malaysia has been undergoing rapid economic growth over the past few years, its standard of living is still not on par with that of developed countries. The major consumers of energy in Malaysia include the manufacturing sector, transportation sector and the domestic sector. As Malaysia has been undergoing periods of economic growth, its electricity consumption has increased for developmental purposes over the years. Malaysia's climate is hot and humid throughout the whole year; hence, there is no rapid change in electricity consumption throughout the months of every year due to the weather. It also experiences monsoon seasons, which are the northeast monsoon from mid-October to January and the southeast monsoon from  Figure 7. Malaysia is a developing country. Even though Malaysia has been undergoing rapid economic growth over the past few years, its standard of living is still not on par with that of developed countries. The major consumers of energy in Malaysia include the manufacturing sector, transportation sector and the domestic sector. As Malaysia has been undergoing periods of economic growth, its electricity consumption has increased for developmental purposes over the years. Malaysia's climate is hot and humid throughout the whole year; hence, there is no rapid change in electricity consumption throughout the months of every year due to the weather. It also experiences monsoon seasons, which are the northeast monsoon from mid-October to January and the southeast monsoon from June to September. Malaysia's main source of energy is from the burning of fossil fuels, and Malaysia is able to generate enough energy for their own usage.

Egypt
A plot of Egypt's electricity consumption from 2007 to 2016 is shown in Figure 8. Egypt is a developing country, where lately there have been some economic reforms and the building of infrastructure, thereby making Egypt a fast-growing economy. Egypt is one of the countries whereby a large proportion of citizens have access to electricity. The increase in electricity consumption over the years is driven by factors such as population growth, industrial output and economic growth [58]. The climate in Egypt is rather moderate, even though temperatures are lower from December to February. Egypt's main source of energy is oil, natural gas and hydroelectric power. Egypt is also able to generate enough energy for their own usage with rapid increases each year, especially in September 2012, whereby a number of protests were organized along with political reforms. June to September. Malaysia's main source of energy is from the burning of fossil fuels, and Malaysia is able to generate enough energy for their own usage.

Egypt
A plot of Egypt's electricity consumption from 2007 to 2016 is shown in Figure 8. Egypt is a developing country, where lately there have been some economic reforms and the building of infrastructure, thereby making Egypt a fast-growing economy. Egypt is one of the countries whereby a large proportion of citizens have access to electricity. The increase in electricity consumption over the years is driven by factors such as population growth, industrial output and economic growth [58]. The climate in Egypt is rather moderate, even though temperatures are lower from December to February. Egypt's main source of energy is oil, natural gas and hydroelectric power. Egypt is also able to generate enough energy for their own usage with rapid increases each year, especially in September 2012, whereby a number of protests were organized along with political reforms. June to September. Malaysia's main source of energy is from the burning of fossil fuels, and Malaysia is able to generate enough energy for their own usage.

Egypt
A plot of Egypt's electricity consumption from 2007 to 2016 is shown in Figure 8. Egypt is a developing country, where lately there have been some economic reforms and the building of infrastructure, thereby making Egypt a fast-growing economy. Egypt is one of the countries whereby a large proportion of citizens have access to electricity. The increase in electricity consumption over the years is driven by factors such as population growth, industrial output and economic growth [58]. The climate in Egypt is rather moderate, even though temperatures are lower from December to February. Egypt's main source of energy is oil, natural gas and hydroelectric power. Egypt is also able to generate enough energy for their own usage with rapid increases each year, especially in September 2012, whereby a number of protests were organized along with political reforms.

Algeria
A plot of Algeria's electricity consumption from 2007 to 2016 is shown in Figure 9. Algeria is a slow-developing country with a slightly high unemployment rate. Although Algeria and Malaysia are both developing countries, and the population of Algeria is approximately 10 million more than the population of Malaysia, Algeria has a relatively lower electricity consumption compared to Malaysia. The economy in Algeria is growing too slowly to provide jobs for the increasing population. The temperature in Algeria is moderate with a higher temperature during the month of August, which may explain the increase in electricity consumption for cooling purposes in that month. Algeria's main source of energy is natural gas. The total energy consumption in Algeria increased by 32% from 2010 to 2014, whereby the increase was mainly in electricity consumption by the residential sector [59].  Algeria is a slow-developing country with a slightly high unemployment rate. Although Algeria and Malaysia are both developing countries, and the population of Algeria is approximately 10 million more than the population of Malaysia, Algeria has a relatively lower electricity consumption compared to Malaysia. The economy in Algeria is growing too slowly to provide jobs for the increasing population. The temperature in Algeria is moderate with a higher temperature during the month of August, which may explain the increase in electricity consumption for cooling purposes in that month. Algeria's main source of energy is natural gas. The total energy consumption in Algeria increased by 32% from 2010 to 2014, whereby the increase was mainly in electricity consumption by the residential sector [59].

Bulgaria
A plot of Bulgaria's electricity consumption from 2007 to 2016 is shown in Figure 10.   Algeria is a slow-developing country with a slightly high unemployment rate. Although Algeria and Malaysia are both developing countries, and the population of Algeria is approximately 10 million more than the population of Malaysia, Algeria has a relatively lower electricity consumption compared to Malaysia. The economy in Algeria is growing too slowly to provide jobs for the increasing population. The temperature in Algeria is moderate with a higher temperature during the month of August, which may explain the increase in electricity consumption for cooling purposes in that month. Algeria's main source of energy is natural gas. The total energy consumption in Algeria increased by 32% from 2010 to 2014, whereby the increase was mainly in electricity consumption by the residential sector [59].

Bulgaria
A plot of Bulgaria's electricity consumption from 2007 to 2016 is shown in Figure 10.  Bulgaria is a developing country with a rather high literacy rate and low unemployment rate. Bulgaria has a temperate-continental climate with moderate features with January being the coldest month of the year with an average low temperature of −3.9 • C. This may explain the increase in electricity consumption for heating purposes in the month of January. Approximately 65% of houses in Bulgaria were built in poor condition and with inefficient or non-existent thermal insulation [60]. A study in 2016 stated that 41% of Bulgarians are unable to maintain thermal comfort in their homes due to the fact of rising electricity prices [61]. This has led Bulgarians to use other heat sources, such as coal and wood, which in turn worsens the quality of the air. Bulgaria's main energy source is coal and nuclear, and they are also able to generate enough energy for their own usage.

Kenya
A plot of Kenya's electricity consumption from 2007 to 2016 is shown in Figure 11. Kenya is an underdeveloped country where there is limited access to electricity, especially in rural areas. As some of the citizens in Kenya live in poverty, they are also unable to afford electricity. The temperature in Kenya is moderate throughout the whole year. Its electricity consumption is rather stable with slight increases over the years. Approximately 75% of the population in Kenya uses biomass for activities such as cooking and for heating purposes. Electricity only accounts for approximately 9% of the energy source in Kenya [62]. Kenya is able to generate enough energy for its own usage.
of rising electricity prices [61]. This has led Bulgarians to use other heat sources, such as coal and wood, which in turn worsens the quality of the air. Bulgaria's main energy source is coal and nuclear, and they are also able to generate enough energy for their own usage.

Kenya
A plot of Kenya's electricity consumption from 2007 to 2016 is shown in Figure 11. Kenya is an underdeveloped country where there is limited access to electricity, especially in rural areas. As some of the citizens in Kenya live in poverty, they are also unable to afford electricity. The temperature in Kenya is moderate throughout the whole year. Its electricity consumption is rather stable with slight increases over the years. Approximately 75% of the population in Kenya uses biomass for activities such as cooking and for heating purposes. Electricity only accounts for approximately 9% of the energy source in Kenya [62]. Kenya is able to generate enough energy for its own usage.

Forecasting the Results for Each of the Forecasting Models
The results of the forecasting of electricity consumption for the year 2016 using the ANN, ANFIS, LSSVM and FTS models for the seven countries that were considered in this study are presented in Tables 1-4.

Forecasting the Results for Each of the Forecasting Models
The results of the forecasting of electricity consumption for the year 2016 using the ANN, ANFIS, LSSVM and FTS models for the seven countries that were considered in this study are presented in Tables 1-4.

Forecasting Results by Country
The forecasting of electricity consumption for different forecasting periods (i.e., shortterm and long-term forecasting) for the seven countries were studied for the ANN, ANFIS, LSSVM and FTS models. The short-term and long-term forecasting results for each country are presented in Tables 5-11.

Analysis and Discussion
The results of the forecasting of electricity consumption for the year 2016 for the seven countries that were studied are tabulated according to the forecasting model and presented in Tables 1-4, while the results for the short-term and long-term forecasting are tabulated for each country and presented in Tables 5-11. Table 1 presents the computation results for the ANN model, whereby this model produced the lowest AFE for Kenya, which was 2.931%. The ANN model produced a positive PP for all seven countries, whereby a higher PP value shows greater efficiency of the model. Table 2, on the other hand, presents the computation results for the ANFIS model, whereby this model produced the lowest AFE value of 2.042% and a PP of 0.7481 for Switzerland. The ANFIS model, however, produced a negative PP for Malaysia, Egypt and Kenya, showing that this model was not very efficient in the forecasting of electricity consumption for these countries. Table 3 presents the computation results for the LSSVM model, whereby this model produced the lowest AFE of 5.654% but a negative PP of −0.4024 for Kenya. It also produced a negative PP for Switzerland, Malaysia, Egypt and Algeria, showing that the LSSVM model was not very effective in forecasting electricity consumption for these countries. Table 4 presents the computation results for the FTS model, whereby this model produced the lowest AFE of 1.008% for Bulgaria. The FTS model produced a positive PP for all seven countries studied, which shows that this model was efficient in forecasting electricity consumption. Table 5 presents the short-term and long-term forecasting results for Norway, whereby the FTS model produced the lowest RMSE for all forecasting periods. Its RMSE was relatively lower than the other models. The FTS model also produced the lowest AFEs for all of the forecasting periods with values of 3.133%, 3.400%, 3.142%, 2.782%, 2.649% and 2.479% for 1, 2, 3, 6, 9 and 12 months, respectively. The FTS model consistently performed the best in forecasting electricity consumption for all forecasting periods in Norway. Table 6 presents the short-term and long-term forecasting results for Switzerland, whereby the ANFIS model produced the lowest RMSEs for short-term forecasting, while the FTS model produced the lowest RMSEs for long-term forecasting. The ANFIS model also produced the lowest AFEs for short-term forecasting at 0.204%, 0.884% and 1.001% for 1, 2 and 3 months, respectively. The FTS model, on the other hand, produced the lowest AFEs for long-term forecasting at 1.526%, 1.410% and 1.419% for 6, 9 and 12 months, respectively. Hence, the ANFIS model was the most accurate for short-term electricity consumption forecasting, while the FTS model was the most accurate for long-term electricity consumption forecasting. Table 7 presents the short-term and long-term forecasting results for Malaysia, where the ANN model showed the lowest RMSEs for 1 and 2 months of forecasting, while the FTS model showed the lowest RMSEs for 3, 6, 9 and 12 months of forecasting. The ANN model also showed the lowest AFEs for 1, 2 and 3 months at 1.552%, 1.896% and 1.795% respectively, while the FTS model showed the lowest AFEs for 6, 9 and 12 months of forecasting at 2.305%, 1.290% and 1.357%, respectively. Thus, the ANN model was more accurate in short-term forecasting, while the FTS model was more accurate in the longterm forecasting of electricity consumption. Table 8 presents the short-term and long-term forecasting results for Egypt, whereby the ANN model produced the lowest RMSEs for 1 and 2 months of forecasting, while the LSSVM model produced the lowest RMSE for 3 months of forecasting. The FTS model produced the lowest RMSEs for 6, 9 and 12 months. The ANN model produced the lowest AFEs of 1.683% and 4.122% for 1 and 2 months of forecasting, respectively, while the LSSVM produced the lowest AFE of 2.412% for 3 months forecasting. The FTS model on the other hand produced the lowest AFEs for 6, 9 and 12 months of forecasting at 4.910%, 4.292% and 4.245%, respectively. Hence, the ANN model was the most accurate for 1 and 2 months of forecasting, while the LSSVM model was the most accurate for 3 months of forecasting, and the FTS model provided the most accurate results for long-term forecasting. Table 9 presents the short-term and long-term forecasting results for Algeria, whereby the FTS model produced the lowest RMSE for both short-term and long-term forecasting with RMSEs of 18.768, 21.796, 128.216, 181.178, 171.200 and 179.943 for 1, 2, 3, 6, 9 and 12 months, respectively. The FTS model also produced the lowest AFE compared to the other models. Thus, the FTS model was the most accurate in both short-term and long-term forecasting of electricity consumption in Algeria. Table 10 presents the short-term and long-term forecasting results for Bulgaria, whereby the FTS model produced the lowest RMSEs for 1, 2, 3, 6, 9 and 12 months of forecasting at 13.219, 13.079, 19.092, 28.449, 24.638 and 33.769, respectively. There was also quite a large difference in the RMSEs of the FTS model compared to the other three models. The FTS model also produced the lowest AFEs for both short-term and long-term forecasting. Hence, this shows that the FTS model was the most accurate in both short-term and long-term forecasting of electricity consumption in Bulgaria. Table 11 presents the short-term and long-term forecasting results for Kenya, whereby the FTS model produced the lowest RMSEs for 1, 2, 3, 6, 9 and 12 months of forecasting at 0.611, 17.670, 17.482, 16.571, 15.483 and 14.005, respectively. The FTS model also produced the lowest AFEs for 1, 2, 3, 6, 9 and 12 months of forecasting at 0.092%, 2.028%, 2.207%, 2.065%, 1.983% and 1.725%, respectively. Thus, the FTS model was the most accurate in both long-term and short-term forecasting of electricity consumption in Kenya.
Summary of the main findings: Overall, the different models performed better than others in different forecasting periods and different countries. The ANN model was the most accurate in forecasting short-term electricity consumption in Malaysia as well as 1 and 2 months of forecasting of electricity consumption in Egypt. The ANFIS model was the most accurate in short-term electricity consumption forecasting in Switzerland. The LSSVM model, on the other hand, was the most accurate in 3 months of forecasting of electricity consumption in Egypt. The FTS model was the most accurate in short-term forecasting of electricity consumption in Norway, Algeria, Bulgaria and Kenya. The FTS model was also the most accurate in the long-term forecasting of electricity consumption, which was considered to be 6, 9 and 12 months of forecasting, in all of the seven countries studied in this research. The FTS model was able to perform well and produced low AFEs of less than 6% for all seven countries. This may be due to the ability of the FTS model to perform well with small numbers of data, and the fuzzy component that was present in the FTS model enabled it to capture the uncertainty of the data. The ANN model may not have performed as well as the FTS model because the ANN model requires large numbers of time series data to train the model before it is able to produce accurate results. It can also be seen that the ANFIS model did not perform as well as the FTS model due to the fact that the ANFIS model usually performs better on volatile data. The LSSVM model, on the other hand, was shown to produce the highest AFEs for quite many forecasting periods and different countries. Its lack of accuracy may be due to the fact of its nature as a model that lacks in sparsity. The LSSVM model was also sensitive to the parameters of the kernel function; thus, it was rather difficult to train the model well.

Conclusions
The main contributions of this study are summarized below:

1.
Seven countries were studied in this research, namely, Norway, Switzerland, Malaysia, Egypt, Algeria, Bulgaria and Kenya, and the monthly electricity consumption data for these seven countries from 2007 to 2016 were used as the data sets for this study.
The main objective of this study was to determine the best model to forecast electricity consumption with the highest level of accuracy for countries with different characteristics; 2.
The ANN, ANFIS, LSSVM and FTS models were used to forecast the electricity consumption for the year 2016 for the seven selected countries. These four models showed differing performances in different forecasting periods and in the forecasting of electricity consumption for the different countries. The ANN model was found to be the most accurate model in forecasting short-term electricity consumption for Malaysia as well as for 1 and 2 months of forecasting electricity consumption in Egypt. The ANFIS model was found to be the most accurate model in short-term electricity consumption forecasting in Switzerland. The LSSVM model, on the other hand, was found to be the most accurate model for 3 months of forecasting electricity consumption in Egypt. The FTS model was found to be the most accurate model for short-term forecasting of electricity consumption in Norway, Algeria, Bulgaria and Kenya. The FTS model was also found to be the most accurate model for the long-term forecasting of electricity consumption for the periods of 6, 9 and 12 months for all of the seven countries that were studied in this research; 3.
In terms of long-term forecasting, the FTS model was found to be the most accurate model and produced the lowest AFEs for all seven countries that were studied. This may be due to the ability of the FTS model to perform well with small numbers of data, and the fuzzy component that is present in the FTS model enabled it to capture the uncertainty of the data; 4.
From the graphs of the electricity consumption patterns for the seven countries that were studied in this paper, it can be seen that Norway, Switzerland and Bulgaria had a rather similar electricity consumption pattern, while Algeria's electricity consumption pattern had a higher peak during August, instead of a peak between the months of December and February. Malaysia, Egypt and Kenya, on the other hand, had a more stable electricity consumption pattern, although Egypt's electricity consumption had an obvious outlier. Although the seven countries that were studied had different electricity consumption patterns, the FTS model was found to perform the best and consistently produced the lowest AFE values compared to the other models; 5.
The application of predictive models in the forecasting of electricity consumption and production is continuously gaining ground in the area of power generation due to the fact of their improved accuracy and increased ability to handle complex relationships and to uncover hidden patterns in big data. Among the most commonly applied supervised learning approaches for electricity consumption and production forecasting are ML models, such as ANNs and SVMs, and metaheuristic methods, such as fuzzy logic-based approaches that include the ANFIS and FTS models. This can be seen from the various studies that were expounded upon in Section 1 of this paper. The absence of a clearly defined answer to every problem and the fact that different results may be produced, even for the same problem, but under different circumstances, makes comparative studies involving different ML models highly relevant and an important component of the body of knowledge in that area of research. Furthermore, due to the complex nature of electricity consumption, which involves many different factors, it is a challenging task to compare the performance of different models/methods that are used in forecasting electricity consumption. Hence, our study, which compared the performances of the ANN, ANFIS, FTS and LSSVM models, is in fact adequate, as it studied the performance of several of the most commonly applied supervised learning approaches in the context of electricity consumption. Our study contributes to the continuous efforts of the research community to assess the performances of various ML models to develop accurate data-driven forecasting models for the forecasting of electricity consumption.

Limitations and Future Research
The limitations of this study are as given below: (i) Monthly electricity consumption data for 10 years for seven countries was used in this research. It would have been better if daily or hourly electricity consumption data were used, as many machine learning methods work best with large amounts of data, and the use of larger amounts of data for training of the models would also produce better forecasts. However, it is rather difficult to obtain daily or even hourly electricity consumption data of countries. Better forecasts would be more useful, as it would enable electricity management companies, city councils and governments to better estimate the amount of electricity needed to be supplied to each region in a country.
Some suggestions for future research are as given below: (ii) It is recommended for future studies in this area to use a larger size of sample data, as increasing the numbers of data would help improve the accuracy of the forecasts that are produced; (iii) It is recommended to consider a larger number of countries in future studies in this area. The difficulty in obtaining electricity consumption data for many countries led to only seven countries being considered in this study. Using longer periods of data for a larger number of countries would enable future research in this area to study the electricity consumption patterns of different countries to be able to draw more conclusive and convincing conclusions.