Water quality prediction using non-linear machine learning algorithms and interpretation on feature importance in Swansea Bay
Authors: Amini Hossein , Ahmadian Reza 
Published: February 2023

Fecally contaminated water may possess considerable pathogens with low infectious quantities with the potential to induce diseases in recreational water users. It is important to assess the bathing water intermittently not only because of the evaluation of the Fecal Indicator organism concentration but also because good quality bathing waters are very important for coastal communities, visitors, and the economy in Wales. In other words, coastal water quality management is a significant public health concern as the poor quality water may increase the effect on public health. Polluted runoff and untreated sewage released into the water can reveal bathers to dangerous fecal organisms known as &#8220;pathogens.&#8221; These pathogens can be present at or near the site where polluted discharges enter the water. Also, these pathogens can be due to the high concentration of animal farming that might contaminate local reaches, which can be carried to the beaches. This rise in danger can affect the local community&#8217;s socio-economically.&#160;Bacterial groups such as FC, Escherichia coli, and Enterococci are used as pathogen indicators organisms for evaluating risk to bathers. Usually, the bathing water season in the UK operates from 15 May to the end of September. This is the time when most individuals are anticipated to use open waters and during the summer the water quality of over 400 designated bathing waters will be observed thus people can check the quality before swimming. Data-driven methodologies were suggested as an early-warning forecasting model that will evaluate the immediate and short-term risk of exceeding pathogen indicator concentration criteria in recreational areas based on hydrologic and climatic data. Nowadays, the existing progress in Machine Learning methodologies and the broad span of applications of Machine Learning algorithms as decision support systems have made it possible to be essential in water quality assessment. This study comprehensively evaluates the performance of some sophisticated ML algorithms e.g., Multi-layer-perceptron, Support-Vector-Machine, K nearest neighbor, and XGBoost. The performance of algorithms is checked with &#8220;Root-Mean-Squared-Error&#8221;, and then the thematic analysis or feature importance is done by using an interpretability algorithm, known as &#8220;SHAP&#8221;. Interpretability means whatever the prediction is, there must be some kind of reasoning behind it. There should be a logic behind the features so that humans can recognize why the model is predicting that. The higher the interpretability of a machine learning model, the more straightforward it is for an individual to comprehend why certain decisions or predictions have been made. The model must also explain how it came to the prediction (the why) because a correct prediction only partially solves your original problem, in the sense that if wrong input data derives the model to a good prediction, the model is doing wrong although the prediction was done well. In the best terminology, interpretability tries to turn the machine learning approach from black-box modeling into clear modeling so that everyone can understand the reasoning behind the prediction.