# Differential Learning for Outliers: A Case Study of Water Demand Prediction
## 6 Conclusions  
This paper proposes a differential learning model that can estimate lower and upper bounds for water demands. The model consists of a baseline network in parallel with a positive outlier network for over-consumption and a negative outlier network for under-consumption. The results show that one outlier network is not sufficient to estimate both over and under consumption. Furthermore, the results show that a delayed training of the outlier network with respect to the baseline network can help overcome overfitting since the number of outliers is usually limited. The results also show  
Figure 10: Predicted versus actual water demand using differential learning (Method C) with an outlier threshold of 5%. The output of the baseline network is indicated with a dashed line. The output of the positive and negative outliers are indicated using the maximum and minimum error bar for each data point.  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Outlier Network** & **DoYr** & **MxTp** & **Precp** & **Bias** & **PHL** \\ \hline Positive & 4.79 & 20.03 & 3.18 & 19.68 & 52.31 \\ Negative & 2.61 & 36.69 & 2.03 & 37.39 & 21.28 \\ \hline \hline \end{tabular}
\end{table}
Table 5: Importance of weights (_IW_) of each input feature in the positive and negative outlier networks for the period of 2011–2015.  
Figure 9: Predicted versus actual water demand using differential learning (Method C) with an outlier threshold of 10%. The output of the baseline network is indicated with a dashed line. The output of the positive and negative outliers are indicated using the maximum and minimum error bar for each data point.  
that better average prediction errors are obtained when the baseline network is trained with all data points including the outliers.  
The baseline network consists of 12 recurrent networks one for each month of the year. Hidden layer recurrence is used for each network. The threshold for the outliers was initially set to 10%. This value was later reduced to 5%. Reducing the threshold improves the accuracy of the network. However, reducing the threshold any further renders the outlier networks unnecessary since they start producing the same water demand prediction as the baseline. The choice of the appropriate threshold level is application dependent.  
The proposed model was trained and tested on an actual data set from a water utility company in central Indiana. The network was trained by using daily water demands from 1997 to 2010. Online training of the model was then continued by using daily water demands from 2011 to 2017. The baseline model was tested over this latter period and had an average error of 2.84%. The differential learning network model had an average error of 2.31% and 1.90% with threshold values of 10% and 5%, respectively.  
Future work will investigate the use of the proposed model for other applications. Furthermore, we would like to develop a systematic approach that can help determine a suitable value for the outlier threshold.  
The application source code and associated data is available in C++ at [[https://github.com/setu4993/Simple_RNN](https://github.com/setu4993/Simple_RNN)]([https://github.com/setu4993/Simple_RNN](https://github.com/setu4993/Simple_RNN)) and in Python at [[https://github.com/setu4993/Simple_RNN_Python](https://github.com/setu4993/Simple_RNN_Python)]([https://github.com/setu4993/Simple_RNN_Python](https://github.com/setu4993/Simple_RNN_Python)).  
Conceptualization, S.S., Z.B.M., R.S. and S.B.; methodology, S.S., Z.B.M., R.S. and S.B.; software, S.S.; validation, S.S., Z.B.M., R.S. and S.B.; writing--original draft preparation, S.S., Z.B.M., R.S. and S.B.  
This research received no external funding.  
The authors declare no conflict of interest.