## 5 Methods
### Experimental Setup  
The sequence of electricity demand observations, denoted as \(x(t)=x1,x2,\dots\), captures the demand values at different time steps \(t\). The objective is to predict the time series \(y(t)\) which represents the predicted electricity demand for a specific time step. In our supervised learning approach, Deep Learning (DL) models were trained and tested to predict future time steps. A predictor function, h was utilized to estimate the energy consumption value for the next step \(y(t+1)\). The model parameters, such as epochs, number of layers, nodes per layer, dropout rate, and recurrent dropout, were optimized using a validation set. When this had been optimized, the model was retrained on the entire training set and tested on the test data. Assuming a lookback duration of \(\tau\), each \(x(t)\) consists of a vector of variables including demand, temperature, and other factors. The sample \((t,\tau)\) is defined as \([x(t),x(t-\tau+1),x(t-\tau+2),\dots,x(t)]\). In our approach, each \(x(t,\tau)\) is treated as a single batch with a _batch_size_. The target variable represents the demand at a future day, denoted as \(target(t)=x^{D}(t+d)\), where \(x^{D}(t)\) represents the scalar demand at time \(t\). The target demand \(target(t)\) is influenced by previous variables in \(sample(t,\tau)\). The lookback duration \(\tau\) is a parameter that requires optimization. It is important to note that the target demand can be a vector, such as \(target(t)=[x^{D}(t+d1),x^{D}(t+d1+1),\dots,x^{D}(t+d2)]\), where \([t+d1,t+d2]\) indicates the time interval for prediction based on \(sample(t)\). Thus, we are predicting \(d2-d1+1\) values of the target variable \(D\) into the future based on \(\tau\) samples from the lookback period. Determining the suitable value for \(\tau\) is crucial. Assuming a batch prediction size of \(T=d2-d1+1\), where the first prediction starts \(d1\) samples ahead, the last prediction corresponds to \(d2=d1+T-1\), indicating a \(T-1\) sample offset. The goal is to estimate the function \(f\) that maps \(sample(t)\) to \(target(t)\) given \([x(t-\tau+1),x(t-\tau+2),\dots,x(t)]\) and \([x^{D}(t+d1),x^{D}(t+d1+1),\dots,x^{D}(t+d2)]\). It is \begin{table}
\begin{tabular}{l l l} \hline \hline
**Types** & **Variables** & **Description** \\ \hline \multirow{4}{*}{Deterministic} & WD & Week dummy [Mon \(<\)Tue... \(<\)Sat\(<\)Sun] \\  & MD & Month dummy [Feb \(<\)Mar \(<\)... \(<\)Nov \(<\)Dec] \\  & DayAfterHoliday & Binary 0 or 1 \\  & DayAfterLongHoliday & Binary 0 or 1 \\  & DayAfterSongkran & Binary 0 or 1 \\  & DayAfterNewyear & Binary 0 or 1 \\ \hline \multirow{4}{*}{Temperature} & Temp & Forecasted temperature \\  & MaxTemp & Maximum forecasted temperature \\  & Square temperature & Square of the forecasted temperature \\  & MA2 pmTemp & Moving average of temperature at 2 pm \\ \hline \multirow{4}{*}{Lagged} & load1d\_cut2 pm & 1 day ahead until 2 pm and 2 day ahead after 2 pm load \\  & load2d\_cut2 pm & 2 days ahead until 2 pm and 3 day ahead after 2 pm load \\  & load3d\_cut2 pm & 3 days ahead until 2 pm and 4 days ahead after 2 pm load \\  & load4d\_cut2 pm & 4 days ahead until 2 pm and 5 days ahead after 2 pm load \\ \hline \multirow{4}{*}{Interaction} & WD:Temp & Interaction: week day dummy to temperature \\  & MD:Temp & Interaction: month dummy to temperature \\  & WD:load1d\_cut2 pm & Interaction: week day dummy to load1d\_cut2 pm \\  & WD:load2d\_cut2 pm & Interaction: week day dummy to load2d\_cut2 pm \\ \hline \hline \end{tabular}
\end{table} 
Table 3: List of selected input variables. assumed that this mapping \(f\) is independent of time \(t\), although a more general setting allows for a function \(f(t)\) that depends on time. For day-ahead prediction, a batch prediction with \(T=48\) is typically implemented. Following the methodology used by EGAT for day-ahead forecasting, we predicted demands for half-hour intervals from \(HH=0\) to 47 for the next day, considering the latest demand at 2 pm of the current day.