# Differential Learning for Outliers: A Case Study of Water Demand Prediction
## 5 Differential Learning Prediction Models
### Analysis  
The previous section investigated various configurations of the proposed differential learning network. The results show that two outlier networks [one positive and one negative] produce better results than a single outlier network. The results also indicate that the best performance is obtained when the baseline network is trained using all the data points and the training of the outlier networks is delayed with respect to the baseline network (Training Method C).  
The purpose of the outlier networks in the proposed differential learning model is to generate low and high estimates of the daily water demand. Because the outlier networks are trained with outlier data points defined with respect to a threshold (i.e., 10%), the resulting model and estimates are sensitive to this threshold. Figure 9 shows the output of the baseline network and that of the outlier networks for the month of September 2017 by using training Method C and an outlier threshold of 10%. The threshold was then reduced to 5% (Figure 10) and the corresponding differential learning network model produced and average error of 1.90%. This approach of refining the threshold was also succesfully used for one class of outliers in [23].  
With a larger threshold, the outlier estimates tend to exceed the observed demand by a large margin. Reducing the threshold from 10% (e.g., Figure 9) to 5% (e.g., Figure 10) shows better estimates. The choice of the threshold is application-dependent and would have to be calibrated for each service area. Moreover, choosing a very low threshold may eliminate the benefits of the outlier networks as they will be trained using most of the data points used to train the baseline network and therefore, would generate predictions similar to those of the baseline network.  
To evaluate whether the features that are important for the baseline network are also important for the outlier networks, the importance (\(IW\)) of the input features in the outlier networks were calculated as shown in Table 5. Compared to Table 2, the \(IW\) of the day of the year is significantly lower for both the positive and negative outlier networks. In the case of the positive outlier network, this \(IW\) is close to that of the summer months of August and September in the baseline network. This result can be explained by the fact that the majority of the positive outliers occur in the months of July-September (Table 4). These months also have the highest water consumption levels.  
The dependence on the maximum temperature is high for both outlier networks. The positive outlier network has an \(IW\) for maximum temperature equivalent to that of the summer months May-September in the baseline model. This was anticipated. However, the \(IW\) (\(\approx\)37%) of the negative outlier network for this input feature was not expected and aligns with the fact that some of the days with high temperatures result in under-consumption compared to the baseline. A similar observation was made in [9] where fluctuations during spring and summer were found to be more pronounced than during the autumn and winter.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline  & **Positive Outliers** & **Negative Outliers** & **Total** \\ \hline January & 23 & 63 & 86 \\ February & 19 & 68 & 87 \\ March & 10 & 46 & 56 \\ April & 4 & 50 & 54 \\ May & 7 & 85 & 92 \\ June & 26 & 73 & 99 \\ July & 40 & 64 & 104 \\ August & 30 & 45 & 75 \\ September & 15 & 50 & 65 \\ October & 5 & 82 & 87 \\ November & 5 & 63 & 68 \\ December & 15 & 68 & 83 \\
**Total** & **199** & **757** & **956** \\ \hline \hline \end{tabular}
\end{table}
Table 4: Total number of positive and negative outliers occurring each month over the period 2011–2017.  
The _IW_ of precipitation is low for both outlier networks and has a similar value to that of the baseline network. However, eliminating this input feature from either the baseline or outlier networks yields a lower accuracy.