# Tuning ANN Hyperparameters for Forecasting Drinking Water Demand
## 3 Results and Discussion
### Results Analysis and Comparison
#### 3.2.1 The Influence of Water Demand Data on Tuning  
ANNs belongs to data-driven models meaning that the modelling is fully compelled by data. Therefore, the data have a significant impact on tuning due to the data-driven nature of ANN models. However, the analysis of 2 different time series is presented afterwards looking  
Figure 6: Heatmap of the medians rank for each configuration in the case of 24 h horizon. Panel (a) shows the FFNN models and Panel (b) the LSTM models.  
to analogies related to the same principles governing drinking water demand. The comparisons between the synthetic _ts1_ and real _ts2_ are highlighted through Figures 7 and 8. The former shows the performance in \(R^{2}\) of the FFNN, LSTM, SRNN and GRU architectures of the 2 datasets on the 4 horizons. In particular, Figure 7a depicts the best models, while Figure 7b shows the mean of the 24 models for each ANN architectures. Figure 8 illustrates the models variance for each architectures and the number of nodes of the ANN structure, in Figure 8a,b, respectively.  
Several points emerge from Figure 7. First, the main difference of the two datasets is reflected in the different levels of the models' performance: best models of _ts1_ ranging between 0.83 and 0.77 in terms of \(R^{2}\) and between 0.95 and 0.86 models related to _ts2_. Second, the rank of the ANNs best models performance for each problem is largely stable. Indeed, LSTM and GRU are the most performing models followed by FFNN and SRNN for both the time series along the prediction horizons. Third, the performances of best models slightly decrease with increasing of prediction horizons according to the growing complexity of the problem. The only anomaly of the aforementioned considerations realises on the \(R^{2}\) trend of SRNN for _ts1_ that increases from 1 h to 24 h and only for 168 h the performance drops. It is likely due to the character of SRNN along with the synthetic nature of the dataset. On the other side, although Figure 8b shows a similar general behaviour for the mean models, it adds that the FFNN quickly decays with horizons extension. This highlights how important the layers and nodes tuning in the selection of the best ANN models is, especially when sharp performance changes are presented, such as for SRNN.  
Figure 8a depicts the models variability within the 4 ANN architectures finding high variability over large horizons. In addition, the great variability of SRNN models is confirmed especially for one day and one week horizons. The number of nodes of the different best models are analysed in Figure 8b. A larger forecasting horizon causes a slight increase of the number of nodes of the best models independently on ANN architectures and time series. After this analysis, we can say that the influence of the water demand time series on ANN tuning regards mainly the performance levels rather than general trends on problem complexity and architectures. Thus, the results of this study can be deemed as general findings into the specific challenge of the drinking water forecasting because of the specificity of the problem driven usually by the same dynamics on different case studies.  
Figure 7: Results of ANN tuning (\(R^{2}\) in y-axis) of _ts1_ synthetic time series (solid lines and circle markers) and _ts2_ real time series (solid lines and square markers) for the 4 forecasting horizons (x-axis) with the set of inputs 2. (**a**) depicts the best model for each architecture per horizon, while (**b**) shows the mean \(R^{2}\) of the models for each architecture per horizon.