# A Deep Learning Approach for Short-Term Electricity Demand Forecasting: Analysis of Thailand Data
## 1 Introduction
### Load Forecasting Models  
Conventional statistical models include regression models, such as linear regression models, multiple regression models, stepwise regression models, logistic regression models, and polynomial regression models [11], where moving average (MA), autoregressive moving average (ARMA), autoregressive integrated moving average (ARIMA), autoregressive integrative moving average exogenous (ARIMAX), and seasonal autoregressive integrated moving average (SARIMA) are popular in statistical forecasting models [12]. For non-real-time forecasting, these models are useful, but they have no accuracy with respect to actual time load and no ability to regulate the consumption of non-linear loads [13]. Short-term electrical demand forecasting powered by AI is crucial for optimizing energy generation and distribution, allocating resources effectively and maintaining power network stability [14]. AI-based models, including traditional machine learning (ML) and deep learning (DL) models, were introduced to handle non-linear relationships in load consumption. Traditional machine learning methods, such as support vector machines (SVM), random forests (RF), and decision trees (DT), can capture complex correlations between several factors affecting energy consumption. ML models consist of artificial neural networks (ANN), particle swarm optimization algorithms (PSO), genetic algorithms (GA), fuzzy logic, and expert systems [15]. Feed-forward neural networks (FNNs) simulate complex relationships between inputs and outputs by adjusting parameters. However, they can suffer from overfitting and may not always find the best solution, becoming stuck in a local optimal state. To overcome this, backward propagation learning is often used in FNN training [8]. To overcome the complex ML problems, DL models were introduced, such as the deep neural network (DNN), the recurrent neural network (RNN), long short-term memory (LSTM), the convolutional neural network (CNN), gated recurrent units (GRU), and the deep belief network (DBN), which have been used for STLF [16]. A modification of RNNs, the LSTM network was created by [PERSON] and [PERSON] in 1997 to address the vanishing and exploding difficulties in RNNs [17]; it solves time series data problems by memorizing all input information. GRU were introduced to address vanishing and exploding gradients using the concepts of gated cells, like in LSTM, which exists in RNN due to long-term dependencies. So, this is the model for improvement based on RNNs. This research is related to short-term electrical demand forecasting by using a half-hourly recorded demand dataset from Thailand. There is a lot of previous work related to demand data from EGAT, applying different models by using either all or part of a 5-year period (from 1 March 2009 to 31 December 2013), which is mentioned in table in Section 2. We used a dataset from EGAT, covering about 7 years (from 1 January 2012 to 31 December 2018), with the same half-hourly pattern of demand. Identifying the optimal DNN model based on forecasting accuracy is the primary goal of this work. This paper makes the following significant contributions:  
* Based on testing and validation accuracy, a comparative analysis of deep neural networks for simple RNN, LSTM, and GRU is discussed. * Splitting the complete 7-year demand dataset into three distinct scenarios, encompassing working days, non-working days, and the entirety of the dataset, based on shared demand characteristics, enhances prediction accuracy compared to prior studies using Thai datasets. * Combining hyperparameter tuning (dropout, epoch, lookback period, number of neurons per layer, number of layers, etc.) to determine which model performs best. * This paper addresses a gap in the literature by utilizing deep learning techniques to model the EGAT dataset spanning from 2012 to 2018. Previous studies have tested the EGAT dataset from 2009 to 2013 using various models, as outlined in table in Section 2.