Skip to main content

Advertisement

Log in

Predicting the Ecological Quality of Rivers: A Machine Learning Approach and a What-if Scenarios Tool

  • Research
  • Published:
Environmental Modeling & Assessment Aims and scope Submit manuscript

Abstract

Monitoring the ecological status of rivers is essential for protecting freshwater biodiversity and ecosystem health. The main objective of this work was to predict the ecological quality of Greek rivers using a machine learning approach based on the Extreme Gradient Boosting (XGBoost) classifier. We used a dataset that comprises ecological, physicochemical, geomorphological, and sample-related parameters collected from the national monitoring network of Greek rivers as well as climate parameters from the ERA5-Land dataset. More specifically, we developed multiple models that predicted the ecological quality class derived by four quality elements (QEs) that are benthic macroinvertebrates, benthic diatoms, fish, and physicochemical quality. The Shapley Additive exPlanations (SHAP) approach was implemented for quantifying the contributions of the predictors on the quality class. We finally developed a web interface tool that can simulate what-if scenarios to predict the quality class under altered environmental conditions. Our findings showed that total phosphorus, nitrate, and ammonium were important predictors for benthic macroinvertebrates, benthic diatoms, and physicochemical quality, whereas for fish, predictors related with the geomorphology (e.g., altitude and slope) had a higher influence. The SHAP plots revealed the synergistic effect of predictors on the quality classes, highlighting a negative effect of increased nutrients on achieving the good quality class based on macroinvertebrates and diatoms and a positive relationship between altitude and slope with the good ecological quality class based on fish. Furthermore, the web interface could provide a useful tool for water managers to predict quality classes for water bodies under what-if scenarios.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9

Similar content being viewed by others

Data Availability

Data cannot be shared openly but is available upon request from the authors.

Notes

  1. https://dimpolitik-water-quality-myapp-yws3vl.streamlit.app/

  2. Overfitting occurs when the model fits overly closely to its training data (including noise or random fluctuations) and then performs well when applied to other unseen data, thus yielding poor model accuracy.

  3. https://scikit-optimize.github.io/stable/modules/generated/skopt.BayesSearchCV.html

  4. https://imbalanced-learn.org/stable/over_sampling.html

  5. https://xgboost.readthedocs.io/en/stable/

  6. https://shap.readthedocs.io/en/latest/example_notebooks/tabular_examples/tree_based_models/Census%20income%20classification%20with%20XGBoost.html

  7. https://shap.readthedocs.io/en/latest/

References

  1. Garcia-Moreno, J., Harrison, I. J., Dudgeon, D., Clausnitzer, V., Darwall, W., Farrell, T., Savy, C., Tockner, K., & Tubbs, N. (2014). Sustaining freshwater biodiversity in the Anthropocene. In The Global Water System in the Anthropocene: Challenges for Science and Governance (pp. 247–270). Springer International Publishing. https://doi.org/10.1007/978-3-319-07548-8_17

  2. Grizzetti, B., Pistocchi, A., Liquete, Μ., Udias, A., Bouraoui, F., & Bund, W. Van, De. (2017). Human pressures and ecological status of European rivers. Scientific Reports, 1–11. https://doi.org/10.1038/s41598-017-00324-3

  3. Carvalho, L., Mackay, E. B., Cardoso, A. C., Baattrup-Pedersen, A., Birk, S., Blackstock, K. L., Borics, G., Borja, A., Feld, C. K., Ferreira, M. T., Globevnik, L., Grizzetti, B., Hendry, S., Hering, D., Kelly, M., Langaas, S., Meissner, K., Panagopoulos, Y., Penning, E., … & Solheim, A. L. (2019). Protecting and restoring Europe’s waters: An analysis of the future development needs of the Water Framework Directive. Science of Total Environment, 658, 1228–1238. https://doi.org/10.1016/j.scitotenv.2018.12.255

    Article  CAS  Google Scholar 

  4. Giakoumis, T., & Voulvoulis, N. (2018). The transition of EU water policy towards the water framework directive’s integrated river basin management paradigm. Environmental Management, 62(5), 819–831. https://doi.org/10.1007/s00267-018-1080-z

    Article  Google Scholar 

  5. Uddin, G., Nash, S., & Olbert, A.I., (2021). A review of water quality index models and their use for assessing surface water quality. Ecological Indicators, 122, 107218. https://doi.org/10.1016/j.ecolind.2020.107218

  6. European Environment Agency, 2018. European waters – Assessment of status and pressures. https://www.eea.europa.eu/publications/state-of-water

  7. Hering, D., Carvalho, L., Argillier, C., Beklioglu, M., Borja, A., Cardoso, A. C., et al. (2015). Managing aquatic ecosystems and water resources under multiple stress - An introduction to the MARS project. Science of Total Environment, 503–504, 10–21. https://doi.org/10.1016/j.scitotenv.2014.06.106

    Article  CAS  Google Scholar 

  8. Spears, B. M., Chapman, D., Carvalho, L., Rankinen, K., Stefanidis, K., Ives, S., Vuorio, K., & Birk, S. (2021). Assessing multiple stressor effects to inform climate change management responses in three European catchments. Inland Waters, 12(1), 94–106. https://doi.org/10.1080/20442041.2020.1827891

    Article  Google Scholar 

  9. Birk, S., Chapman, D., Carvalho, L., Spears, B. M., et al. (2020). Impacts of multiple stressors on freshwater biota across spatial scales and ecosystems. Nature Ecology & Evolution, 4(8), 1060–1068. https://doi.org/10.1038/s41559-020-1216-4

    Article  Google Scholar 

  10. Feld, C. K., Fernandes, M. R., Ferreira, M. T., Hering, D., Ormerod, S. J., Venohr, M., & Gutiérrez-Cánovas, C. (2018). Evaluating riparian solutions to multiple stressor problems in river ecosystems — A conceptual study. Water Research, 139, 381–394. https://doi.org/10.1016/j.watres.2018.04.014

    Article  CAS  Google Scholar 

  11. Visser, H., Evers, N., Bontsema, A., Rost, J., Niet, A., Vethman, P., Mylius, S., et al. (2022). What drives the ecological quality of surface waters? A review of 11 predictive modeling tools. Water Research, 208, 117851. https://doi.org/10.1016/j.watres.2021.117851

    Article  CAS  Google Scholar 

  12. Dezfooli, D., Hosseini-Moghari, S. M., Ebrahimi, K., & Araghinejad, S. (2018). Classification of water quality status based on minimum quality parameters: Application of machine learning techniques. Modeling Earth Systems and Environment, 4(1), 311–324. https://doi.org/10.1007/s40808-017-0406-9

    Article  Google Scholar 

  13. Shamsuddin, I. I. S., Othman, Z., & Sani, N. S. (2022). Water quality index classification based on machine learning: A case from the Langat river basin model. Water, 14, 2939. https://doi.org/10.3390/w14192939

    Article  CAS  Google Scholar 

  14. Rounsevell, M. D. A., Arneth, A., Brown, C., Cheung, W. W. L., Gimenez, O., Holman, I., Leadley, P., Luján, C., Mahevas, S., Maréchaux, I., Pélissier, R., Verburg, P. H., Vieilledent, G., Wintle, B. A., & Shin, Y. J. (2021). Identifying uncertainties in scenarios and models of socio-ecological systems in support of decision-making. One Earth, 4(7), 967–985. https://doi.org/10.1016/j.oneear.2021.06.003

    Article  Google Scholar 

  15. Arrighi, C., & Castelli, F. (2023). Prediction of ecological status of surface water bodies with supervised machine learning classifiers. Science of Total Environment, 857, 159655. https://doi.org/10.1016/j.scitotenv.2022.159655

    Article  CAS  Google Scholar 

  16. Herrero, A., Gutiérrez-Cánovas, C., Vigiak, O., Lutz, S., Kumar, R., Gampe, D., Huber-García, V., Ludwig, R., Batalla, R., & Sabater, S. (2018). Multiple stressor effects on biological quality elements in the Ebro river: Present diagnosis and predicted responses. Science of Total Environment, 630, 1608–1618. https://doi.org/10.1016/j.scitotenv.2018.02.032

    Article  CAS  Google Scholar 

  17. Gebler, D., Wiegleb, G., & Szoszkiewicz, K. (2018). Integrating river hydromorphology and water quality into ecological status modelling by artificial neural networks. Water Research, 139, 395–405. https://doi.org/10.1016/j.watres.2018.04.016

    Article  CAS  Google Scholar 

  18. Valerio, C., De Stefano, L., Martínez-Muñoz, G., & Garrido, A. (2021). A machine learning model to assess the ecosystem response to water policy measures in the Tagus river basin (Spain). Science of Total Environment, 750, 141252. https://doi.org/10.1016/j.scitotenv.2020.141252

    Article  CAS  Google Scholar 

  19. Mohammadpour, R., Shaharuddin, S., Zakaria, N. A., et al. (2016). Prediction of water quality index in free surface constructed wetlands. Environmental Earth Sciences, 75, 139. https://doi.org/10.1007/s12665-015-4905-6

    Article  CAS  Google Scholar 

  20. Lundberg, S. M., et al. (2018). Explainable machine-learning predictions for the prevention of hypoxaemia during surgery. Nature Biomedical Engineering, 2(10), 749–760. https://doi.org/10.1038/s41551-018-0304-0

    Article  Google Scholar 

  21. Ahmed, U., Mumtaz, R., Anwar, H., Shah, A. A., Irfan, R., & García-Nieto, J. (2019). Efficient water quality prediction using supervised machine learning. Water, 11(11), 1–14. https://doi.org/10.3390/w11112210

    Article  CAS  Google Scholar 

  22. Aldhyani, T. H. H., Al-Yaari, M., Alkahtani, H., & Maashi, M. (2020). Water quality prediction using artificial intelligence algorithms. Applied Bionics and Biomechanics. https://doi.org/10.1155/2020/6659314

    Article  Google Scholar 

  23. Bui, D. T., Khosravi, K., Tiefenbacher, J., Nguyen, H., & Kazakis, N. (2020). Improving prediction of water quality indices using novel hybrid machine-learning algorithms. Science of Total Environment, 721, 137612. https://doi.org/10.1016/j.scitotenv.2020.137612

    Article  CAS  Google Scholar 

  24. Gazzaz, N. M., Yusoff, M. K., Aris, A. Z., Juahir, H., & Ramli, M. F. (2012). Artificial neural network modeling of the water quality index for Kinta river (Malaysia) using water quality variables as predictors. Marine Pollution Bulletin, 64(11), 2409–2420. https://doi.org/10.1016/j.marpolbul.2012.08.005

    Article  CAS  Google Scholar 

  25. Khan, M. S. I., Khan, N., Uddin, J., Islam, S., & Nasir, M. K. (2022). Water quality prediction and classification based on principal component regression and gradient boosting classifier approach. Journal of King Saud University - Computer and Information Sciences, 34(8), 4773–4781. https://doi.org/10.1016/j.jksuci.2021.06.003

    Article  Google Scholar 

  26. Nasir, N., Kansal, A., Alshaltone, O., Barneih, F., Sameer, M., Shanableh, A., & Al-Shamma’a, A. (2022). Water quality classification using machine learning algorithms. Journal of Water Process Engineering, 48, 102920. https://doi.org/10.1016/j.jwpe.2022.102920

    Article  Google Scholar 

  27. Sakizadeh, M. (2016). Artificial intelligence for the prediction of water quality index in groundwater systems. Modeling Earth Systems and Environment, 2(1), 1–9. https://doi.org/10.1007/s40808-015-0063-9

    Article  Google Scholar 

  28. Shafi, U., Mumtaz, R., Anwar, H., Qamar, A. M., & Khurshid, H. (2018). Surface water pollution detection using internet of things. In: 2018 15th International Conference on Smart Cities: Improving Quality of Life Using ICT IoT (HONET-ICT),92–96. https://doi.org/10.1109/HONET.2018.8551341

  29. Sillberg, C. V., Kullavanijaya, P., & Chavalparit, O. (2021). Water quality classification by integration of attribute-realization and support vector machine for the Chao Phraya river. Journal of Ecological Engineering, 22(9), 70–86. https://doi.org/10.12911/22998993/141364

    Article  Google Scholar 

  30. Uddin, M. G., Stephen, N., Azizur, R., & Agnieszka, I. O. (2022). A comprehensive method for improvement of water quality index (WQI) models for coastal water quality assessment. Water Research, 219, 118532. https://doi.org/10.1016/j.watres.2022.118532

    Article  CAS  Google Scholar 

  31. Lazaridou, M., Ntislidou, C., Karaouzas, I., & Skoulikidis, N. (2018). Harmonization of a new assessment method for estimating the ecological quality status of Greek running waters. Ecological Indicators, 84, 683–694. https://doi.org/10.1016/j.ecolind.2017.09.032

    Article  CAS  Google Scholar 

  32. Karaouzas, I., Smeti, E., Kalogianni, E., & Skoulikidis, N. T. (2019). Ecological status monitoring and assessment in Greek rivers: Do macroinvertebrate and diatom indices indicate same responses to anthropogenic pressures? Ecological Indicators, 101, 126–132. https://doi.org/10.1016/j.ecolind.2019.01.011

    Article  CAS  Google Scholar 

  33. Zogaris, S., Tachos, V., Economou, A. N., Chatzinikolaou, Y., Koutsikos, N., & Schmutz, S. (2018). A model-based fish bioassessment index for Eastern Mediterranean rivers: Application in a biogeographically diverse area. Science of Total Environment, 622–623, 676–689. https://doi.org/10.1016/j.scitotenv.2017.11.293

    Article  CAS  Google Scholar 

  34. Skoulikidis, N. T., Amaxidis, Y., Bertahas, I., Laschou, S., & Gritzalis, K. (2006). Analysis of factors driving stream water composition and synthesis of management tools-A case study on small/medium Greek catchments. Science of Total Environment, 362(1–3), 205–241. https://doi.org/10.1016/j.scitotenv.2005.05.018

    Article  CAS  Google Scholar 

  35. Hersbach, H., Bell, B., Berrisford, P., Hirahara, S., Horányi, A., et al. (2021). ERA5-Land: A state-of-the-art global reanalysis dataset for land applications. Earth System Science Data, 1–50. https://doi.org/10.5194/ESSD-2021-82

  36. Muñoz-Sabater, J., Dutra, E., Agustí-Panareda, A., Albergel, C., Arduini, G., et al. (2021). ERA5-Land: A state-of-the-art global reanalysis dataset for land applications. Earth System Science Data, 1–50. https://doi.org/10.5194/ESSD-2021-82

  37. Chen, T., & Guestrin, C. (2016). XGBoost: A scalable tree boosting system. In: Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining - KDD ’16 163, 785–79. https://doi.org/10.1145/2939672.2939785

  38. Catajan, A. L. Jr., Fajardo, A. C., Limbago, J. S. (2023). Classification of water quality index in Laguna de Bay using XGBoost. 20th International Joint Conference on Computer Science and Software Engineering (JCSSE), Phitsanulok, Thailand, pp. 403–408. https://doi.org/10.1109/JCSSE58229.2023.10202029

  39. Li, Y., Mingyang, L., Chao, L., & Zhenzhen, L. (2020). Forest aboveground biomass estimation using Landsat 8 and Sentinel-1A data with machine learning algorithms. Scientific Reports, 10(1), 1–12. https://doi.org/10.1038/s41598-020-67024-3

    Article  CAS  Google Scholar 

  40. Politikos, D., Petasis, G., & Katselis, G. (2021). Interpretable machine learning to forecast hypoxia in a lagoon. Ecological Informatics, 66, 101480. https://doi.org/10.1016/j.ecoinf.2021.101480

    Article  Google Scholar 

  41. Shin, Y., Taekgeun K., Seoksu H., Seulbi L., Eunji L., Seung W.H., Chang S. L., et al. (2020). Prediction of chlorophyll-a concentrations in the Nakdong River using machine learning methods. Water, 12(6). https://doi.org/10.3390/w12061822

  42. Chawla, N. V., Bowyer, K. W., Hall, L. O., & Kegelmeyer, W. P. (2002). SMOTE: Synthetic minority over-sampling technique. Journal of Artificial Intelligence Research, 16, 321–357. https://doi.org/10.1613/jair.953

    Article  Google Scholar 

  43. Pedregosa, F., Varoquaux, G., Gramfort, A., Michel, V., Thirion, B., Grisel, O., Blondel, M., Prettenhofer, P., Weiss, R., & Dubourg, V. (2011). scikit-learn: Machine learning in Python. Journal of Machine Learning Research, 12, 2825–2830. http://scikit-learn.sourceforge.net

  44. Li, L., Qiao, J., Yu, G., Wang, L., Li, H., Liao, C., & Zhu, Z. (2022). Interpretable tree-based ensemble model for predicting beach water quality. Water Research, 211, 118078. https://doi.org/10.1016/j.watres.2022.118078

    Article  CAS  Google Scholar 

  45. Wieland, R., Lakes, T., & Nendel, C. (2020). Using SHAP to interpret XGBoost predictions of grassland degradation in Xilingol, China. Geoscientific Model Development, 1–28. https://doi.org/10.5194/gmd-2020-59.

  46. Stefanidis, K., Papaioannou, G., Markogianni, V., & Dimitriou, E. (2019). Water quality and hydromorphological variability in Greek rivers: A nationwide assessment with implications for management. Water, 11(8), 1680. https://doi.org/10.3390/w11081680

    Article  CAS  Google Scholar 

  47. Stefanidis, K., Christopoulou, A., Poulos, S., Dassenakis, E., & Dimitriou, E. (2020). Nitrogen and phosphorus loads in Greek rivers: Implications for management in compliance with the Water Framework Directive. Water, 12(6), 1531. https://doi.org/10.3390/w12061531

    Article  CAS  Google Scholar 

  48. Rudin, C. (2019). Stop explaining black box machine learning models for high stakes decisions and use interpretable models instead. Nature Machine Intelligence, 1, 206–215. https://doi.org/10.1038/s42256-019-0048-x

    Article  Google Scholar 

  49. Lemm, J. U., Venohr, M., Globevnik, L., Stefanidis, K., Panagopoulos, Y., Gils, J., Posthuma, L., Kristensen, P., Feld, C. K., Mahnkopf, J., Hering, D., & Birk, S. (2021). Multiple stressors determine river ecological status at the European scale: Towards an integrated understanding of river status deterioration. Global Change Biology, 27(9), 1962–1975. https://doi.org/10.1111/gcb.15504

    Article  CAS  Google Scholar 

  50. Masouras, A., Karaouzas, I., Dimitriou, E., Tsirtsis, G., & Smeti, E., 2021. Benthic diatoms in river biomonitoring-present and future perspectives within the water framework directive. Water (Switzerland), 13(4). https://doi.org/10.3390/w13040478

  51. Katja, S., Agnes, F., Wolfgang, M., Melanie, T., Josef, W., Simone, P., Giacomo, B., & Erich, T. (2023). The hydromorphology index IHM based on fish requirements. River Research and Applications, 39, 1037–1053. https://doi.org/10.1002/RRA.4135

    Article  Google Scholar 

  52. Sun, J., Tummers, J. S., Galib, S. M., & Lucas, M. C. (2022). Fish community and abundance response to improved connectivity and more natural hydromorphology in a post-industrial subcatchment. Science of Total Environment, 802, 149720. https://doi.org/10.1016/j.scitotenv.2021.149720

    Article  CAS  Google Scholar 

  53. Vaughan, I. P., Diamond, M., Gurnell, A. M., Hall, K. A., Jenkins, A., Milner, N. J., Naylor, L. A., Sear, D. A., Woodward, G., & Ormerod, S. J. (2009). Integrating ecology with hydromorphology: A priority for river science and management. Aquatic Conservation: Marine and Freshwater Ecosystems, 19(1), 113–125. https://doi.org/10.1002/aqc.895

    Article  Google Scholar 

  54. Buffagni, A. (2021). The lentic and lotic characteristics of habitats determine the distribution of benthic macroinvertebrates in Mediterranean rivers. Freshwater Biology, 66(1), 13–34. https://doi.org/10.1111/FWB.13596

    Article  Google Scholar 

  55. Theodoropoulos, C., Karaouzas, I., Vourka, A., & Skoulikidis, N. (2020). ELF – A benthic macroinvertebrate multi-metric index for the assessment and classification of hydrological alteration in rivers. Ecological Indicators, 108, 105713. https://doi.org/10.1016/j.ecolind.2019.105713

    Article  Google Scholar 

  56. Hayes, D. S., Schaufler, G., Schmutz, S., Unfer, G., Führer, S., Auer, S., & Seliger, C. (2022). Hydro-morphological stressors reduce distribution range and affect population status of cyprinid fishes in Austria. Frontiers in Environmental Science, 10. https://doi.org/10.3389/fenvs.2022.991722

Download references

Acknowledgements

The ERA5-Land climate reanalysis dataset was generated using Copernicus Climate Change Service Information [2022]. We thank the reviewers for their useful comments.

Author information

Authors and Affiliations

Authors

Contributions

Conceptualization: D.P., K.S., and G.V.; data curation: K.S.; methodology: D.P.; data analysis and programming: D.P.; visualization: D.P., K.S., and G.V.; writing—original draft: D.P., K.S., and G.V.; writing—review and editing: A.P. and E.D.

Corresponding author

Correspondence to Dimitris Politikos.

Ethics declarations

Ethical Approval

Not applicable.

Competing Interests

The authors declare no competing interests.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Appendix

Appendix

Table 4 Tested hyperparameters along with their optimal values

Rights and permissions

Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Politikos, D., Stefanidis, K., Varlas, G. et al. Predicting the Ecological Quality of Rivers: A Machine Learning Approach and a What-if Scenarios Tool. Environ Model Assess (2024). https://doi.org/10.1007/s10666-024-09980-y

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s10666-024-09980-y

Keywords

Navigation