Log in

A new machine learning model for predicting the water quality index

  • Original Article
  • Published:
Modeling Earth Systems and Environment Aims and scope Submit manuscript

Abstract

The water quality directly affects the human health and its assessment requires predicting the Water Quality Index (WQI), which is important for supporting the agriculture and industry and protecting the environment. To this end, the present study: 1) introduces a novel hierarchical spatiotemporal graph neural network (HSTGNN) model to overcome the limitations of the multiple linear regression model (MLR), extract the spatiotemporal features, and capture the global and local inter dependencies of the quality parameters, 2) develops a new particle swarm optimization-Nomad algorithm (PSO-NA) to choose the best input scenario, balance the NA’s exploration/exploitation capabilities and improve the accuracy of the PSO and NA, 3) uses the analysis of variance (ANOVA) method to decompose the models’ output uncertainties into those of the parameters and inputs, and 4) compares the HM with CNN-LSTM model (CL), (LSTM)-MLR (SLM), LSTM-MLR (LM), CNN-MLR (CM), SL, LSTM, CNN and MLR model. All these models have been used to predict the WQI of a plain in Iran.

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

Access this article

Subscribe and save

Springer+ Basic
EUR 32.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

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

Data availability

The datasets generated during and/or analyzed during the current study are available from the corresponding author on reasonable request.

References

  • Abba SI, Pham QB, Saini G, Linh NTT, Ahmed AN, Mohajane M, Khaledian M, Abdulkadir RA, Bach QV (2020) Implementation of data intelligence models coupled with ensemble machine learning for prediction of water quality index. Environ Sci Pollut Res. https://doi.org/10.1007/s11356-020-09689-x

    Article  Google Scholar 

  • Abba SI, Abdulkadir RA, Sammen SS, Pham QB, Lawan AA, Esmaili P, Malik A, Al-Ansari N (2022) Integrating feature extraction approaches with hybrid emotional neural networks for water quality index modeling. Appl Soft Comp. https://doi.org/10.1016/j.asoc.2021.108036

    Article  Google Scholar 

  • Abyaneh HZ (2014) Evaluation of multivariate linear regression and artificial neural networks in prediction of water quality parameters. J Environ Health Sci Eng. https://doi.org/10.1186/2052-336X-12-40

    Article  Google Scholar 

  • AfshariNia M, Panahi F, Ehteram M (2023) Convolutional neural network- ANN- E (Tanh): A new deep learning model for predicting rainfall. Water Resour Manag. https://doi.org/10.1007/s11269-023-03454-8

    Article  Google Scholar 

  • Agbaogun BK, Olu-Owolabi BI, Buddenbaum H, Fischer K (2023) Adaptive neuro-fuzzy inference system (ANFIS) and multiple linear regression (MLR) modelling of Cu, Cd, and Pb adsorption onto tropical soils. Environ Sci Pollut Res. https://doi.org/10.1007/s11356-022-24296-8

    Article  Google Scholar 

  • Alizamir M, Shiri J, Fard AF, Kim S, Gorgij ARD, Heddam S, Singh VP (2023) Improving the accuracy of daily solar radiation prediction by climatic data using an efficient hybrid deep learning model: Long short-term memory (LSTM) network coupled with wavelet transform. Eng Appl Art Intell. https://doi.org/10.1016/j.engappai.2023.106199

    Article  Google Scholar 

  • Asadollah SBHS, Sharafati A, Motta D, Yaseen ZM (2021) River water quality index prediction and uncertainty analysis: A comparative study of machine learning models. J Environ Chem Eng. https://doi.org/10.1016/j.jece.2020.104599

    Article  Google Scholar 

  • Awadallah MA, Hammouri AI, Al-Betar MA, Braik MS, Abd Elaziz M (2022) Binary Horse herd optimization algorithm with crossover operators for feature selection. Comput Biol Med 141:105152

    Article  Google Scholar 

  • Chen L, Wu T, Wang Z, Lin X, Cai Y (2023a) A novel hybrid BPNN model based on adaptive evolutionary artificial bee colony algorithm for water quality index prediction. Ecol Indic. https://doi.org/10.1016/j.ecolind.2023.109882

    Article  Google Scholar 

  • Chen L, Chen W, Wang L, Zhai C, Hu X, Sun L, Tian Y, Huang X, Jiang L (2023b) Convolutional neural networks (CNNs)-based multi-category damage detection and recognition of high-speed rail (HSR) reinforced concrete (RC) bridges using test images. Eng Struct. https://doi.org/10.1016/j.engstruct.2022.115306

    Article  Google Scholar 

  • Dagal I, Akın B, Akboy E (2022) Improved salp swarm algorithm based on particle swarm optimization for maximum power point tracking of optimal photovoltaic systems. Int J Energy Res 46(7):8742–8759

  • Dargahi P, Nasseri S, Hadi M, Nodehi RN, Mahvi AH (2023) Prediction models for groundwater quality parameters using a multiple linear regression (MLR): a case study of Kermanshah, Iran. J Environ Health Sci Eng. https://doi.org/10.1007/s40201-022-00836-9

    Article  Google Scholar 

  • Ehteram M, Ahmed AN, Sherif M, El-Shafie A (2024) An advanced deep learning model for predicting water quality index. Ecol Indic 160:111806

    Article  Google Scholar 

  • Esmaeili H, Hakami V, Bidgoli BM, Shokouhifar M (2022) Application-specific clustering in wireless sensor networks using combined fuzzy firefly algorithm and random forest. Exp Syst Appl 210:118365

    Article  Google Scholar 

  • Ge D, Zhang Z, Kong X, Wan Z (2022) Extreme learning machine using bat optimization algorithm for estimating state of health of lithium-ion batteries. Appl Sci. https://doi.org/10.3390/app12031398

    Article  Google Scholar 

  • Gholami M, Ghanbari-Adivi E, Ehteram M, Singh VP, Ahmed AN, Mosavi A, El-Shafie A (2023) Predicting longitudinal dispersion coefficient using ensemble models and optimized multi-layer perceptron models. Ain Shams Eng J 14(12):102223. https://doi.org/10.1016/j.asej.2023.102223

  • Hameed M, Sharqi SS, Yaseen ZM, Afan HA, Hussain A, Elshafie A (2017) Application of artificial intelligence (AI) techniques in water quality index prediction: a case study in tropical region. Neural Computing and Applications, Malaysia. https://doi.org/10.1007/s00521-016-2404-7

    Book  Google Scholar 

  • Ibrahim H, Yaseen ZM, Scholz M, Ali M, Gad M, Elsayed S, Khadr M, Hussein H, Ibrahim HH, Eid MH, Kovács A, Péter S, Khalifa MM (2023) Evaluation and prediction of groundwater quality for irrigation using an integrated water quality indices, machine learning models and gis approaches: A representative case study. Water. https://doi.org/10.3390/w15040694

    Article  Google Scholar 

  • Kattenborn T, Leitloff J, Schiefer F, Hinz S (2021) Review on convolutional neural networks (CNN) in vegetation remote sensing. ISPRS J Photogramm Remote Sens. https://doi.org/10.1016/j.isprsjprs.2020.12.010

    Article  Google Scholar 

  • Kouadri S, Elbeltagi A, Islam ARMT, Kateb S (2021) Performance of machine learning methods in predicting water quality index based on irregular data set: application on Illizi region (Algerian southeast). Appl Water Sci. https://doi.org/10.1007/s13201-021-01528-9

    Article  Google Scholar 

  • Kouadri S, Pande CB, Panneerselvam B, Moharir KN, Elbeltagi A (2022) Prediction of irrigation groundwater quality parameters using ANN, LSTM, and MLR models. Environ Sci Pollut Res. https://doi.org/10.1007/s11356-021-17084-3

    Article  Google Scholar 

  • Lap BQ, Phan TTH, Nguyen HDu, Quang LX, Hang PT, Phi NQ, Hoang VT, Linh PG, Hang BTT (2023) Predicting Water Quality Index (WQI) by feature selection and machine learning: A case study of An Kim Hai irrigation system. Ecol Informat. https://doi.org/10.1016/j.ecoinf.2023.101991

    Article  Google Scholar 

  • Li Q, Feng Y, Tong X, Zhou Y, Wu P, **e H, ** Y, Chen P, Liu S, Xv X, Liu S, Wang C (2022) Firefly algorithm-based cellular automata for reproducing urban growth and predicting future scenarios. Sustain Cities Soc. https://doi.org/10.1016/j.scs.2021.103444

    Article  Google Scholar 

  • Lin N, Fu L, Zhao L, Hawbani A, Tan Z, Al-Dubai A, Min G (2022) A novel nomad migration-inspired algorithm for global optimization. Comput Elect Eng. https://doi.org/10.1016/j.compeleceng.2022.107862

    Article  Google Scholar 

  • Liu Y, Sun Z, Zhang W (2023) Improving fraud detection via hierarchical attention-based Graph Neural Network. J Inf Secur Appl. https://doi.org/10.1016/j.jisa.2022.103399

    Article  Google Scholar 

  • Loc HH, Do QH, Cokro AA, Irvine KN (2020) Deep neural network analyses of water quality time series associated with water sensitive urban design (WSUD) features. J Appl Water Eng Res 8(4):313–332. https://doi.org/10.1080/23249676.2020.1831976

    Article  Google Scholar 

  • Lyu Z, Wu G, Wang Q (2023) A novel data-driven method for fuel-consumptionprediction based on fast converged kernel extreme learning machine. Meas Sci Technol 34(8):085112

  • Ma M, **e P, Teng F, Wang B, Ji S, Zhang J, Li T (2023) HiSTGNN: Hierarchical spatio-temporal graph neural network for weather forecasting. Inf Sci 648:119580

    Article  Google Scholar 

  • Najafzadeh M, Basirian S (2023) Evaluation of river water quality index using remote sensing and artificial intelligence models. Remote Sens 15(9):2359

    Article  Google Scholar 

  • Reiser P, Neubert M, Eberhard A, Torresi L, Zhou C, Shao C, ..., Friederich P (2022) Graph neural networks for materials science and chemistry. Commun Mater 3(1):93

    Article  CAS  Google Scholar 

  • Samsudin MS, Azid A, Khalit SI, Sani MSA, Lananan F (2019) Comparison of prediction model using spatial discriminant analysis for marine water quality index in mangrove estuarine zones. Mar Pollut Bull. https://doi.org/10.1016/j.marpolbul.2019.02.045

    Article  Google Scholar 

  • Şen Z (2012) Innovative trend analysis methodology. J Hydrol Eng 17(9):1042–1046

    Article  Google Scholar 

  • Shehab M, Abu-Hashem MA, Shambour MKY, Alsalibi AI, Alomari OA, Gupta JN, ...,  Abualigah L (2023) A comprehensive review of bat inspired algorithm: Variants, applications, and hybridization. Arch Comput Methods Eng 30(2):765–797

    Article  Google Scholar 

  • Sheikh Khozani Z, Iranmehr M, Wan Mohtar WHM (2022) Improving Water Quality Index prediction for water resources management plans in Malaysia: application of machine learning techniques. Geocarto Int 37(25):10058–10075

    Article  Google Scholar 

  • Su B, Lin Y, Wang J, Quan X, Chang Z, Rui C (2022) Sewage treatment system for improving energy efficiency based on particle swarm optimization algorithm. Energ Rep. https://doi.org/10.1016/j.egyr.2022.06.053

    Article  Google Scholar 

  • Uddin MG, Nash S, Olbert AI (2021) A review of water quality index models and their use for assessing surface water quality. Ecol Ind. https://doi.org/10.1016/j.ecolind.2020.107218

    Article  Google Scholar 

  • Uddin MG, Nash S, Rahman A, Olbert AI (2023) Performance analysis of the water quality index model for predicting water state using machine learning techniques. Process Safe Environ Prot. https://doi.org/10.1016/j.psep.2022.11.073

    Article  Google Scholar 

  • Wang HM, Chen J, Xu CY, Zhang J, Chen H (2020) A framework to quantify the uncertainty contribution of gcms over multiple sources in hydrological impacts of climate change. Earth’s Future. https://doi.org/10.1029/2020EF001602

    Article  Google Scholar 

  • Wang D, Liang Y, Ma H, Xu F (2023) Refined answer selection method with attentive bidirectional long short-term memory network and self-attention mechanism for intelligent medical service robot. Appl Sci. https://doi.org/10.3390/app13053016

    Article  Google Scholar 

  • Wei Y, Wu D, Terpenny J (2023) Bearing remaining useful life prediction using self-adaptive graph convolutional networks with self-attention mechanism. Mech Systems Sig Process. https://doi.org/10.1016/j.ymssp.2022.110010

    Article  Google Scholar 

  • Yadav V, Verma P, Katiyar V (2023) Long short term memory (LSTM) model for sentiment analysis in social data for e-commerce products reviews in Hindi languages. Int J Inf Technol. https://doi.org/10.1007/s41870-022-01010-y

    Article  Google Scholar 

  • Yang J, Wu Z, Wang Z, Zhang D, Wang W, Wen Q, Zhang W (2023) Enhanced anisotropic radius basis function metamodel based on recursive evolution Latin hypercube design and fast K-fold cross-validation. Struct Multidiscip Opt 66(7):169

    Article  Google Scholar 

  • Zhang X, Wang H, Peng A, Wang W, Li B, Huang X (2020) Quantifying the uncertainties in data-driven models for reservoir inflow prediction. Water Resour Manag. https://doi.org/10.1007/s11269-020-02514-7

    Article  Google Scholar 

  • Zhou J, Cui G, Hu S, Zhang Z, Yang C, Liu Z, Wang L, Li C, Sun M (2020) Graph neural networks: A review of methods and applications. AI Open. https://doi.org/10.1016/j.aiopen.2021.01.001

    Article  Google Scholar 

  • Ehteram M, Ghanbari-Adivi E (2023) Self-attention (SA) temporal convolutional network (SATCN)-long short-term memory neural network (SATCN-LSTM): an advanced python code for predicting groundwater level. Environ Sci Pollut Res 1–19

  • Shams MY, Elshewey AM, El-kenawy ESM, Ibrahim A, Talaat FM, Tarek Z (2023) Water quality prediction using machine learning models based on grid search method. Multimed Tools Appl 1–28

Download references

Funding

The authors declare that no funds, grants, or other support were received during the preparation of this manuscript.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Elham Ghanbari-Adivi.

Ethics declarations

Ethics approval

Not applicable.

Consent to participate

All authors have given consent to their contribution.

Consent for publication

All authors have agreed with the content and all have given explicit consent to publish.

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.

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

Ghanbari-Adivi, E. A new machine learning model for predicting the water quality index. Model. Earth Syst. Environ. (2024). https://doi.org/10.1007/s40808-024-02083-3

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s40808-024-02083-3

Keywords

Navigation