# A One-Class-Based Supervision System to Detect Unexpected Events in Wastewater Treatment Plants
## 5 Conclusions and Future Works  
This paper presents the use of different one-class techniques to determine the appearance of unexpected events in a WWTP facility. Those events are synthetically generated to simulate deviations in COD_S, NH3_S, and NTK_S, representing critical measures to deter  
Figure 8: F1-score for each classifer. \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**Dev** & **Preproc** & \(\lambda\) & \(\pi\) & **TP** & **TN** & **FP** & **FN** & **F1 (\%)** \\ \hline
5 & NoNorm & 0.8 & 500 & 37.1 & 0.5 & 36.5 & 2.9 & 65.3 \\
15 & Norm & 1.4 & 10 & 36.5 & 3.5 & 33.5 & 3.5 & 66.4 \\
25 & Norm & 1.4 & 10 & 37.7 & 2.9 & 34.1 & 2.3 & 67.4 \\
35 & Zscore & 1.4 & 10 & 37.5 & 3.6 & 33.4 & 2.5 & 67.6 \\
45 & Zscore & 1.4 & 100 & 30.5 & 20.3 & 16.7 & 9.5 & 70.0 \\
55 & Zscore & 1.4 & 50 & 32.8 & 18.8 & 18.2 & 7.2 & 72.1 \\
65 & Zscore & 1.2 & 10 & 33.2 & 21.4 & 15.6 & 6.8 & 74.8 \\
75 & Zscore & 1.4 & 50 & 33.3 & 22.8 & 14.2 & 6.7 & 76.1 \\
85 & Zscore & 1.4 & 100 & 31.3 & 27.4 & 9.6 & 8.7 & 77.4 \\
95 & Zscore & 1.4 & 50 & 32.0 & 27.7 & 9.3 & 8.0 & 78.7 \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Results and configuration for best NCBoP classifier depending on anomaly percentage deviation. mine potential risks. With the aim of evaluating how effective each technique is, the tested deviations varied from 5% to 95%. In general terms, an increase in that deviation results in better performance in four techniques. Although NCBoP, K-means, and Autoencoder present a remarkable improvement with each deviation step, Gaussian classifiers achieve the best results. The experiments and results for the technique showed that, after a five K-fold validation, all negative instances (unexpected and hence undesired events) were correctly labeled. The false alarm cases were significantly low, with a mean value below 1.5 samples in all experiments above 15% deviation. The results indicated that the proposed system represents a valuable contribution to the WWTP monitoring process. Taking into consideration the 23 variables along the facility, it is possible to detect when three critical parameters present unexpected values, according to the patterns learned from normal operation sets. In future works, there are three alternative ways to supplement the contribution. The first would consider individual classifiers for each tested parameter: COD_S, NH3_S, and NTK_S. Although the classified proposed detects all unexpected events with the Gaussian model, this approach could improve the rest of the classifiers. Furthermore, instead of semi-supervised algorithms in which only information from normal operation is available, the use of supervised classifiers could be tested. This approach would implement a classifier for normal operation and another one for unexpected deviation. In the case of good results, these classifiers would indicate the specific parameter with unexpected performance. Finally, it could be possible to consider the modification of other variable instead of COD_S, NH3_S, and NTK_S to detect an unexpected situation that correspond to less severe scenarios. Conceptualization, M.T. and A.D.-L.; methodology, M.T. and P.A.-B. ; software, A.D.-L. and A.M.; validation, P.A.-B., A.M. and J.L.C.-R.; formal analysis, J.L.C.-R. and E.J. ; investigation, E.J. ; resources, M.T. ; data curation, A.D.-L.; writing--original draft preparation, P.A.-B. and E.J. ; supervision, E.J. ; project administration, J.L.C.-R. All authors have read and agreed to the published version of the manuscript. [PERSON]'s research was supported by the Xunta de Galicia (Regional Government of Galicia) through grants to industrial Ph.D. ([[http://gain.xunta.gal](http://gain.xunta.gal)]([http://gain.xunta.gal](http://gain.xunta.gal)) (accessed on 12 June 2024 )), under the Doutoramento Industrial 2022 grant with reference 04_IN606D_202_269265.