Skip to main content

A Supervised Machine Learning Approach for Analysis and Prediction of Water Quality

  • Conference paper
  • First Online:
Mobile Computing and Sustainable Informatics

Abstract

The need to constantly monitor water quality is paramount as water pollution increases exponentially. In our study, data published by King County, Washington, USA, has been used to compare the performance of several algorithms which were used in predicting water quality index (WQI) and classifying water quality classification (WQC). Multilayer perceptron (MLP) performs most efficiently in both tasks with an RMSE of 0.76, R2 of 0.99, and classification accuracy of 97.1%. Feature analysis shows that phosphorus and ammonia nitrogen have considerable influence on predicting WQC and WQI, respectively, even though they were not directly used in the calculation of WQI. Sensitivity analysis done on the MLP model further shows that after removing the most important feature of turbidity as an input parameter, the model had an RMSE of 12.86 and an R2 of 0.84, respectively. It can be considered as one of the most significant parameters since it affects the WQI drastically.

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

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 189.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 249.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

References

  1. Rahmanian, N., Ali, S.H.B., Homayoonfard, M., Ali, N.J., Rehan, M., Sadef, Y., Nizami, A.S.: Analysis of physicochemical parameters to evaluate the drinking water quality in the state of Perak, Malaysia. J. Chem. 2015, Article ID 716125, 10 pages, (2015). https://doi.org/10.1155/2015/716125

  2. Fadiran, A.O., Dlamini, S.C., Mavuso, A.: A comparative study of the phosphate levels in some surface and ground water bodies of Swaziland. Bull. Chem. Soc. Ethiop. 22 (2008). https://doi.org/10.4314/bcse.v22i2.61286

  3. Employee Security Department, KingCounty Profile, https://esd.wa.gov/labormarketinfo/county-profiles/king. Last accessed 2021/10/29

  4. Seattletimes, seattle-news, https://www.seattletimes.com/seattle-news/king-county-cites-soaring-costs-climate-change-in-bid-to-redo-water-pollution-agreement-with-state-and-feds/. Last accessed 2021/10/26

  5. Environmentalprotectionagency, newsreleases, https://www.epa.gov/newsreleases/epa-announces-96-million-wifia-loan-king-county-washington-improve-water-quality-puget. Last accessed 2021/10/26

  6. Khan, Y., See, C.S.: Predicting and analyzing water quality using machine learning: a comprehensive model. In: 2016 IEEE Long Island Systems, Applications and Technology Conference (LISAT), pp. 1–6 (2016). https://doi.org/10.1109/LISAT.2016.7494106

  7. Haghiabi, A.H., Nasrolahi, A.H., Parsaie, A.: Water quality prediction using machine learning methods. Water Qual. Res. J. 53(1): 3–13 (2018). https://doi.org/10.2166/wqrj.2018.025

  8. Aldhyani, T.H.H., Al-Yaari, M., Alkahtani, H., Maashi, M.: Water quality prediction using artificial intelligence algorithms. Appl. Bionics Biomech. 2020, Article ID 6659314, 12 pages (2020). https://doi.org/10.1155/2020/6659314

  9. Samsudin, M.S., Azid, A., Khalit, S.I., Sani, M.S.A., Lananan, F.: Comparison of prediction model using spatial discriminant analysis for marine water quality index in mangrove estuarine zones. Marine Pollut. Bull. 141, 472–481 (2019). ISSN 0025-326X, https://doi.org/10.1016/j.marpolbul.2019.02.045

  10. Devi, S.V.S.G.: Random forest advice for water quality prediction in the regions of Kadapa district. Int. J. Innov. Technol. Explor. Eng. 8, 1–3 (2019)

    Article  Google Scholar 

  11. Victoriano, J.M., Lacatan, L.L., Vinluan, A.A.: Predicting river pollution using random forest decision tree with GIS model: a case study of MMORS, Philippines. Int. J. Environ. Sci. Dev. 11(1), 36–42 (2020)

    Article  Google Scholar 

  12. Nouraki, A., Alavi, M., Golabi, M., et al.: Prediction of water quality parameters using machine learning models: a case study of the Karun River. Iran. Environ. Sci. Pollut. Res. 28, 57060–57072 (2021). https://doi.org/10.1007/s11356-021-14560-8

    Article  Google Scholar 

  13. Faridah Othman, M.E., Alaaeldin, M.S., Ahmed, A.N., Teo, F.Y., Fai, C.M., Afan, H.A., Sherif, M., Sefelnasr, A., El-Shafie, A.: Efficient river water quality index prediction considering minimal number of inputs variables. Eng. Appl. Comput. Fluid Mech. 14(1), 751–763 (2020). https://doi.org/10.1080/19942060.2020.1760942

    Article  Google Scholar 

  14. Keiser, D.A., Kling, C.L., Shapiro, J.S.: The low but uncertain measured benefits of US water quality policy. Proc. Natl. Acad. Sci. 116(12) 5262–5269 (2019). https://doi.org/10.1073/pnas.1802870115

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

    Article  Google Scholar 

  16. Shakya, S., Pulchowk, L.N., Smys, S.: Anomalies detection in fog computing architectures using deep learning. J. Trends Comput. Sci. Smart Technol. no. 1, 46–55 (2020)

    Google Scholar 

  17. Thudumu, S., Branch, P., Jin, J., et al.: A comprehensive survey of anomaly detection techniques for high dimensional big data. J. Big Data 7, 42 (2020). https://doi.org/10.1186/s40537-020-00320-x

    Article  Google Scholar 

  18. Ji, Z., Gong, J., Feng, J.: A novel deep learning approach for anomaly detection of time series data. Sci. Programm. 2021, Article ID 6636270, 11 pages (2021). https://doi.org/10.1155/2021/6636270

  19. Cho, K.H., Han, D., Park, Y., Lee, S.W., Cha, S.M., Kang, J.H., Kim, J.H.: Evaluation of the relationship between two different methods for enumeration fecal indicator bacteria: colony-forming unit and most probable number. J. Environ. Sci. (China) 22, 846–850 (2010). https://doi.org/10.1016/s1001-0742(09)60187-x. PMID: 20923095

    Article  Google Scholar 

  20. Ali, J., Khan, R., Ahmad, N., Maqsood, I.: Random forests and decision trees. Int. J. Comput. Sci. Issues (IJCSI) (2012)

    Google Scholar 

  21. Popescu, M., Balas, V., Perescu-Popescu, L., Mastorakis, N.: Multilayer perceptron and neural networks. WSEAS Trans. Circ. Syst. 8 (2009)

    Google Scholar 

  22. Rana, A., Singh Rawat, A., Bijalwan, A., Bahuguna, H.: Application of multi layer (perceptron) artificial neural network in the diagnosis system: a systematic review. In: 2018 International Conference on Research in Intelligent and Computing in Engineering (RICE), pp. 1–6 (2018). https://doi.org/10.1109/RICE.2018.8509069

  23. Chen, T., Guestrin, C.: XGBoost: A scalable tree boosting system. In: Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining (KDD ‘16). Association for Computing Machinery, New York, NY, USA, pp. 785–794 (2016). https://doi.org/10.1145/2939672.2939785

  24. Tu Tu, C., Liu, H., Xu, B.: AdaBoost typical Algorithm and its application research. In: MATEC Web of Conferences, 139, 00222 (2017) https://doi.org/10.1051/matecconf/201713900222

  25. Sarker, I.H.: Machine learning: algorithms, real-world applications and research directions. SN Comput. Sci. 2, 160 (2021). https://doi.org/10.1007/s42979-021-00592-x

    Article  Google Scholar 

  26. John, G.H., Langley, P.: Estimating continuous distributions in bayesian classifiers. In: Proceedings of the Eleventh conference on Uncertainty in artificial intelligence, Morgan Kaufmann Publishers Inc. pp. 338–345 (1995)

    Google Scholar 

  27. Mahesh, B.: Machine Learning Algorithms—A Review (2019). https://doi.org/10.21275/ART20203995

  28. Idris, A., Mamun, A.A., Soom, M., Sulaiman, W.: Review of water quality standards and practices in Malaysia 22, 145–155 (2003)

    Google Scholar 

  29. Silveira, M.L., Joao, M.B., Vendramini, Sollenberger, L.E.: Phosphorus management and water quality problems in grazingland ecosystems. Int. J. Agronomy, Article ID 517603, 8 pages (2010). https://doi.org/10.1155/2010/517603

  30. Calmuc, V.-A., Calmuc, M., Țopa, C., Mihaela, T., Iticescu, C., Georgescu, L.: Various methods for calculating the water quality index 41, 171–178 (2018). https://doi.org/10.35219/ann-ugal-math-phys-mec.2018.2.09.

  31. Healthy Environments, oregon.gov https://www.oregon.gov/oha/ph/HealthyEnvironments/DrinkingWater/Monitoring/Documents/health/ammonia.pdf. Last accessed 2021/12/22

    Google Scholar 

  32. Dissolved_oxygen,enr.gov, https://www.enr.gov.nt.ca/sites/enr/files/dissolved_oxygen.pdf. Last accessed 2021/12/22

  33. Water quality criteria, epa.gov, https://www.epa.gov/sites/default/files/2015-10/documents/rwqc2012.pdf. Last accessed 2021/12/22

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Abhinav Mittra .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2022 The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd.

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Mittra, A., Singh, D., Banda, A. (2022). A Supervised Machine Learning Approach for Analysis and Prediction of Water Quality. In: Shakya, S., Ntalianis, K., Kamel, K.A. (eds) Mobile Computing and Sustainable Informatics. Lecture Notes on Data Engineering and Communications Technologies, vol 126. Springer, Singapore. https://doi.org/10.1007/978-981-19-2069-1_18

Download citation

Publish with us

Policies and ethics