# Temporal Convolutional Networks Applied to Energy-Related Time Series Forecasting
## 4 Conclusions  
In this paper, we proposed a deep learning model based on temporal convolutional networks (TCN) to perform forecasting over two energy-related time series. The experimental study considered two real-world time series data from Spain: the national electric demand and the power demand at charging stations for electric vehicles. An extensive parameter search was conducted in order to obtain the best architecture configuration, testing more than 1200 different TCN models for both dataset. Furthermore, the performance of these convolutional networks was compared in terms of accuracy and efficiency with long short-term memory (LSTM) recurrent networks--that have so far been considered the state-of-the-art for forecasting tasks. The results of the experimental study carried out showed that TCNs outperformed the forecasting accuracy of LSTM models for both datasets. The dilated causal convolutions used by TCNs were more effective at capturing temporal dependencies than the recurrent LSTM units. Furthermore, TCNs proved to be less sensitive to the parameter selection than LSTM models. Regardless of the chosen values, the convolutional approach provided a more reliable performance. Moreover, we also aimed to illustrate the importance of the size of the past history input window. Thanks to the use of residual connections, TCNs provided better results when using longer input sequences. In contrast, LSTM models were more accurate at encoding patterns when using smaller windows. Regarding the computational efficiency, it was seen that TCN models have deeper architectures with many more trainable parameters. This implied that the training procedure of a TCN was slightly more costly. However, once TCNs were trained, they provided significantly faster predictions than recurrent networks due to the use of parallel convolutions to process the input sequences. In conclusion, our study demonstrated that TCNs are a very powerful alternative to LSTM networks. They can \begin{table}
\begin{tabular}{c c c c c c} \multicolumn{6}{c}{a Computation time for electric demand data.} \\ \hline \hline \multicolumn{2}{c}{**Past History**} & \multicolumn{2}{c}{**Model**} & \multicolumn{1}{c}{**Trainable Parameters**} & \multicolumn{1}{c}{**Prediction Time (ms)**} & \multicolumn{1}{c}{**Training Time (s)**} \\ \multicolumn{6}{c}{**Time-Steps**} & **Hours** & **\#** & **Type** & \\ \hline \multirow{2}{*}{\(144\)} & \multirow{2}{*}{\(24\)} & \(1\) & LSTM & 332,824 & 0.859 & **52.24** \\  & & \(2\) & TCN & 1,694,448 & **0.566** & 87.29 \\ \hline \multirow{2}{*}{\(168\)} & \multirow{2}{*}{\(28\)} & \(3\) & LSTM & 332,824 & 0.968 & **58.56** \\  & & \(4\) & TCN & 1,694,448 & **0.590** & 99.44 \\ \hline \multirow{2}{*}{\(288\)} & \multirow{2}{*}{\(48\)} & \(5\) & LSTM & 201,240 & 0.775 & **62.70** \\  & & \(6\) & TCN & 2,121,200 & **0.672** & 109.2 \\ \hline \multicolumn{6}{c}{**b** Computation time for EV power consumption data.} \\ \hline \hline \multicolumn{2}{c}{**Past History**} & \multicolumn{2}{c}{**Model**} & \multicolumn{1}{c}{**Trainable Parameters**} & \multicolumn{1}{c}{**Prediction Time (ms)**} & \multicolumn{1}{c}{**Training Time (s)**} \\ \multicolumn{6}{c}{**Time-Steps**} & **Days** & **\#** & **Type** & \\ \hline \multirow{2}{*}{\(168\)} & \multirow{2}{*}{\(7\)} & \(7\) & LSTM & 332,824 & 0.532 & **3.01** \\  & & \(8\) & TCN & 1,694,448 & **0.347** & 4.41 \\ \hline \multirow{2}{*}{\(336\)} & \multirow{2}{*}{\(14\)} & \(9\) & LSTM & 332,824 & 1.020 & **6.76** \\  & & \(10\) & TCN & 1,694,448 & **0.836** & 10.49 \\ \hline \multirow{2}{*}{\(672\)} & \multirow{2}{*}{\(28\)} & \(11\) & LSTM & 201,240 & 1.148 & **4.76** \\  & & \(12\) & TCN & 2,121,200 & **0.726** & 10.18 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Computation time of the best TCN and LSTM models for each dataset. Prediction time corresponds to the time that a model takes to compute a prediction for one instance. Training time corresponds to the time that a model takes to run one training epoch.