## 4 Methods  
Most of the research studies forecasting energy demand aim for that enough electricity is produced to meet future needs. A reliable forecasting model is necessary for accurate investment planning of electricity generation and distribution. [PERSON] [19] proposed a hybrid model based on least-square support vector machine and an autoregressive integrated moving average for forecasting electricity demand. The study results indicate that the proposed model can generate more realistic and reliable forecasts. It can also be stated that it responds better to some unexpected reactions in the time series, for example, political decisions that are not a continuation of the adopted strategies. [PERSON] and [PERSON] [20] proposed the linear programming approach, which reflected the key relationships between the hard and brown coal mining sector and the power sector in the context of the environmental regulations. On the other hand, in the works [21; 22; 23; 24], artificial neural networks LSTM were used as tools that allow forecasting time series with a small number of statistical data, which is the case in this analysis.  
The LSTM network architecture is recursive and is used in deep learning methods. Unlike standard recursive networks, the LSTM network has a feedback loop, which allows it to process not only individual data points, but also entire sequences. Hence, these networks are used for classification, processing, and forecasting based on time series data. In LSTM networks, the network output layer has an influence on the input layer [25; 26]. These networks have the ability to learn long-term relationships. They were introduced in the article [27], and then refined and popularized in the works [28; 29].  
Figure 4: Changes in the installed capacity in 2019 compared to 2018, source: own study based on data [17].  
The LSTM network computes the mapping from the input sequence x = (x1,..., xT) to the output sequence y = (y1,..., yT) by calculating iteratively from t = 1 to T the network unit activation using the Equations (1)-(6) [26]:  
\[f_{t}=\sigma_{g}\left(W_{f}x_{t}+U_{f}h_{t-1}+b_{f}\right) \tag{1}\]  
\[i_{t}=\sigma_{g}\left(W_{i}x_{t}+U_{i}\;h_{t-1}+b_{i}\right) \tag{2}\]  
\[o_{t}=\sigma_{g}\left(W_{o}x_{t}+U_{o}h_{t-1}+b_{o}\right) \tag{3}\]  
\[\overline{c_{t}}\;=\;\sigma_{h}\left(W_{c}x_{t}\;+\;U_{c}h_{t-1}\;+\;b_{c}\;\right) \tag{4}\]  
\[c_{t}\;=\;f_{t}\;\times\;c_{t-1}\;+\;i_{t}\;\times\;\overline{c_{t}} \tag{5}\]  
\[h_{t}=o_{t}\times\sigma_{h}\left(c_{t}\right) \tag{6}\]  
where conditions \(W\), \(U\) are weight matrices, conditions b denote the polarization vectors (\(b_{i}\) is the input gate polarization vector), \(\sigma\) is the activation function, \(i,f,o\), and \(c\) are, respectively, input gates, forget gates, output gates, and activation vectors of cells, of which all are the same size as the output cell activation vector, that is the result of the vectors, \(g\) and \(h\) are functions of input cell and output cell activation.  
In this paper, three widely used performance metrics are adopted: mean absolute error (MAE), root mean square error (RMSE), and mean absolute percentage error (MAPE), in order to assess the prediction accuracy of the proposed methods [30]:  
\[MAE=\frac{1}{n}\cdot\sum_{i=1}^{n}\left(\left|y_{i}-\hat{y}_{i}\right|\right) \tag{7}\]  
\[RMSE=\sqrt{\frac{1}{n}\cdot\sum_{i=1}^{n}\left(y_{i}-\hat{y}_{i}\right)^{2}} \tag{8}\]  
\[MAPE=\frac{1}{n}\;\sum_{i=1}^{n}\left|\frac{y_{i}-\hat{y}_{i}}{y_{i}}\right| 100\% \tag{9}\]  
where: \(y_{i}\). identifies the actual value for sample \(l\), \(\hat{y}_{i}\). identifies the predicted value for sample \(i\); n is the testing data.