In collaboration with Iranian Watershed Management Association

Document Type : Research Paper

Authors

1 Ph.D Graduate of Cliamatology, University of Isfahan, Isfahan, Iran

2 Professor of Department of Physical Geography, University of Isfahan, Isfahan, Iran

3 Associate Professor, Soil Conservation and Watershed Management Research Institute, Agricultural Research, Education and Extension Organization (AREEO), Tehran, Iran

4 Associate Professor of Department of Economics, University of Isfahan, Isfahan, Iran

Abstract

Introduction
The complexity of aquatic systems, their spatiotemporal variations, the high cost and time-consuming nature of traditional testing methods, and the need for continuous monitoring all contribute to the difficulty of monitoring and evaluating water quality. Therefore, artificial intelligence, machine learning, and deep learning approaches are useful for predicting water quality given the diverse parameters involved and are more cost-effective compared to traditional testing methods. There is no uniform algorithm that performs optimally for predicting water quality, and different algorithms exhibit superior performance in different contexts. The quality of rivers in the Zagros mountainous region has decreased due to the erosion of karst formations, their passage through residential areas, changes in land use, drought, and climate change. Some of these rivers, such as the Karkheh, Karun, and Dez, serve as the source of drinking water for a population of over 10 million people. Therefore, changes in water quality pose increased risks and threats to the drinking water supply of these settlements. Assessing the quality of water resources and developing a suitable model will play an effective role in managing the required water supply. The present study aims to identify the best machine learning algorithm for estimating the water quality parameters of the Cham Anjir watershed while facilitating ongoing monitoring of the resource.
 
Materials and methods
Data from 321 samples of discharge and water quality parameters at the Cham Anjir hydrometric station during the period 1969–2021 were used to select a suitable artificial intelligence model and to assessthe quality of surface water resources in the Cham Anjir watershed. These samples included physical and chemical indicators: TDS, TH, SAR, Na, Mg, Ca, and Cl. Machine learning algorithms were employed to model the water quality of the Cham Anjir watershed. Through iterative testing of different models, the Support Vector Machine (SVM) and Classification and Regression Tree (CART) models were selected as the best performers. A correlation matrix was used to evaluate relationships among the variables, and based on these correlations, monthly discharge and monthly water quality indices—including TDS, TH, SAR, Na, Mg, Ca, Cl, EC, %Na, pH, HCO₃, and temporary hardness—were analyzed. A total of 321 monthly samples of the two key indices, TDS and TH, were studied over the statistical period of 1969–2021. To evaluate the accuracy of the machine learning algorithms in water quality modeling, the following performance indices were used: coefficient of determination (R²), mean squared error (MSE), and mean absolute error (MAE).
Results and discussion
The p-value from trend tests confirmed the existence of an increasing trend at the 95% confidence level for the two variables TDS and TH (surface water quality parameters of the Cham Anjir watershed) since 1985. The average TDS in the first period (1969–1984) was 286.6 mg/L, and in the second period (1985–2021) it was 422.08 mg/L. The average TH in the first period (1969–1984) was 181.5 mg/L, and in the second period (1985–2021) it was 278.6 mg/L.
The results of the correlation matrix indicated that TDS has a strong correlation with EC and TH. TH has a positive correlation with TDS, EC, HCO₃, Ca, Cl, and Mg , and an inverse correlation with pH. The machine learning algorithms SVM and CART successfully captured the increasing trend for the two parameters of total hardness and total dissolved solids in the discharge of the Cham Anjir watershed. The SVM algorithm with the linear kernel exhibited the best performance. In addition, the root mean square error (RMSE) validation index also showed lower values for the SVM algorithm compared to the CART algorithm. Therefore, SVM is more accurate in predicting water quality indicators.
 
Conclusion
Machine learning algorithms are effective for water quality modeling. The results indicated an increasing trend in TDS and TH concentrations in the Cham Anjir watershed since 1985. SVM performed better than CART in predicting TDS and TH. The findings suggest that decreasing river flow, increasing water consumption, and karst geology influence TH and TDS concentrations in the quality of this watershed. Water quality monitoring is essential for water resource management. For future estimates of water quality in this context, the SVM algorithm is recommended.

Keywords

Abuzir, S. Y., Abuzir, Y. S., 2022. Machine learning for water quality classification. Water Qual. Res. J., 57(3), 152-164.
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), 2210.
Al-Adhaileh, M. H., Aldhyani, T. H., Alsaade, F. W., Al-Yaari, M., Albaggar, A. K. A., 2022. Groundwater quality: The application of artificial intelligence. J. Environ. Public Health, 2022(1), 8425798.
Arabgol, R., Sartaj, M., Asghari, K., 2016. Predicting nitrate concentration and its spatial distribution in groundwater resources using support vector machines (SVMs) model. ENVIRON MODEL ASSESS, 21, 71-82.
Barbieri, M., Barberio, M. D., Banzato, F., Billi, A., Boschetti, T., Franchini, S., Gori, F., Petitta, M., 2023. Climate change and its effect on groundwater quality. J. Environ. Public Health, 45(4), 1133-1144.
Beiranvand, N., Sepahvand, A., Haghizadeh, A., 2023. Total Dissolved Solids modeling using machine learning algorithms in periods of low and high water (Case study: Khorammabad, Biranshahr and Alashtar watersheds, Lorestan province). JRWM, 76(3), 215-236. (in persian)
Bui, D. T., Khosravi, K., Tiefenbacher, J., Nguyen, H., Kazakis, N., 2020. Improving prediction of water quality indices using novel hybrid machine-learning algorithms. Sci. Total Environ., 721, 137612.
Cojbasic, S., Dmitrasinovic, S., Kostic, M., Turk Sekulic, M., Radonic, J., Dodig, A., Stojkovic, M., 2023. Application of machine learning in river water quality management: A review. Water Sci. Technol., 88(9), 2297-2308.
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. Model. Earth Syst. Environ., 4, 311-324.
Delbaz, R., Ebrahimian, H., 2024. A Review of the Application of Data Science and Machine Learning in Agricultural Water Management. Journal of Water and Sustainable Development, 11(2), 39-56. doi: 10.22067/jwsd.v11i2.2402.1310 (in persian).
Dritsas, E., Trigka, M., 2023. Efficient data-driven machine learning models for water quality prediction. Computation J. (MDPI), 11(2), 16.
El-Rawy, M., Batelaan, O., Alshehri, F., Almadani, S., Ahmed, M. S., Elbeltagi, A., 2023. An Integrated GIS and Machine-Learning Technique for Groundwater Quality Assessment and Prediction in Southern Saudi Arabia. Water, 15(13), 2448.
Eze, E., Kirby, S., Attridge, J., Ajmal, T., 2023. Aquaculture 4.0: hybrid neural network multivariate water quality parameters forecasting model. Sci. Rep., 13(1), 16129.
Farhadinejad, T. , vayskarami, I., Zand, M., 2024. Investigating the relationship between river flow changes caused by drought and the quality of surface water resources in the Tirah River Basin. Watershed Engin. Manage.16(1), 64-81. doi: 10.22092/ijwmse.2023.361325.2009.(in persian)
Farid Giglou, B. , Ghazavi, R., Dokhani, S., 2022. Evaluating the impact of climate change on Aras border river water quality using statistical methods, SWAT Model and WQISC Index. Watershed Engin. Manage.13(4), 718-731. doi: 10.22092/ijwmse.2021.351242.1822.(in persian)
Fernández del Castillo, A., Yebra-Montes, C., Verduzco Garibay, M., de Anda, J., Garcia-Gonzalez, A., Gradilla-Hernández, M. S., 2022. Simple prediction of an ecosystem-specific water quality index and the water quality classification of a highly polluted river through supervised machine learning. Water, 14(8), 1235.
Ghaemi, A. , Azhdary Moghaddam, M., Keikha, S., 2024. Evaluation of integrated artificial intelligence models in estimating total dissolved solid concentrations in the upstream of Sari city. Watershed Engin. Manage.16(1), 50-63. doi: 10.22092/ijwmse.2023.358863.1975.(in persian)
Goodarzi, M. R., Niknam, A. R. R., Barzkar, A., Niazkar, M., Zare Mehrjerdi, Y., Abedi, M. J., Heydari Pour, M., 2023. Water quality index estimations using machine learning algorithms: a case study of Yazd-Ardakan Plain, Iran. Water, 15(10), 1876.
Granata, F., Papirio, S., Esposito, G., Gargano, R., De Marinis, G., 2017. Machine learning algorithms for the forecasting of wastewater quality indicators. Water,  9(2), 105.
Hasheminasab, S., Rahimi, D., Zakerinejad, R., Kropáček, J., 2022. Assessment of climate change impact on surface water: a case study—Karoun River Basin, Iran. Arab. J. Geosci., 15(9), 904.
Haghiabi, A. H., Nasrolahi, A. H., Parsaie, A., 2018. Water quality prediction using machine learning methods. Water Qual. Res. J., 53(1), 3-13.
Hamada, M. S., Zaqoot, H. A., & Sethar, W. A. (2024). Using a supervised machine learning approach to predict water quality at the Gaza wastewater treatment plant. Environ. Sci.: Adv., 3(1), 132-144.
Hussein, E. A., Thron, C., Ghaziasgar, M., Bagula, A., Vaccari, M., 2020. Groundwater prediction using machine-learning tools. Algorithms, 13(11), 300.
Kaur, I., Gulati, A., Lamba, P.S., Jain, A., Taneja, H. and Syal, J.S., 2024. Water Quality Assessment using Machine Learning: A Focus on Coliform Prediction in Water. Asian J. Water Environ. Pollut., 21(5), pp.19-26.
Khan, M. S. I., Islam, N., Uddin, J., Islam, S., Nasir, M. K., 2022. Water quality prediction and classification based on principal component regression and gradient boosting classifier approach. J. King Saud Univ. - Comput. Inf. Sci., 34(8), 4773-4781.
Khan, Y., See, C. S., 2016. 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). IEEE.
Khullar, S., Singh, N., 2021. Machine learning techniques in river water quality modelling: a research travelogue. Water Supply, 21(1), 1-13.
Kouadri, S., Elbeltagi, A., Islam, A. R. M. T., 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., 11(12), 190.
Lakshmi, T. M., Martin, A., Begum, R. M., Venkatesan, V. P., 2013. An analysis on performance of decision tree algorithms using student’s qualitative data. Int. J. Mod. Educ. Comput. Sci., 5(5), 18-27.
Li, D., Cui, B., Zuo, F., Zong, H. and Yu, W., 2023. Hydrological characteristics and water quality change in mountain river valley on Qinghai-Tibet Plateau. Appl. Water Sci., 13(4), p.104.
Makumbura, R.K., Mampitiya, L., Rathnayake, N., Meddage, D.P.P., Henna, S., Dang, T.L., Hoshino, Y. and Rathnayake, U., 2024. Advancing water quality assessment and prediction using machine learning models, coupled with explainable artificial intelligence (XAI) techniques like shapley additive explanations (SHAP) for interpreting the black-box nature. Results Eng., 23, p.102831.
Murdoch, P. S., Baron, J. S., Miller, T. L., 2000. Potential effects of climate change on surface‐water quality in North America 1. J. Am. Water Resour. Assoc., 36(2), 347-366.
Murphy, J., Chanat, J., 2023. Leveraging machine learning to automate regression model evaluations for large multi-site water-quality trend studies. Environ. Model. Softw., 170, 105864.
Nallakaruppan, M.K., Gangadevi, E., Shri, M.L., Balusamy, B., Bhattacharya, S. and Selvarajan, S., 2024. Reliable water quality prediction and parametric analysis using explainable AI models. Sci. Rep., 14(1), p.7520.
Nuanmeesri, S., Poomhiran, L., Kadmateekarun, P., Chopvitayakun, S., 2023. Improving the Water Quality Classification Model for Various Farms Using Features Based on Artificial Neural Network. TEM J. 12(4), 2144.
Oğuz, A., Ertuğrul, Ö. F., 2023. A survey on applications of machine learning algorithms in water quality assessment and water supply and management. Water Supply, 23(2), 895-922.
Okafor, C.O., Ude, U.I., Okoh, F.N. and Eromonsele, B.O., 2024. Safe drinking water: The need and challenges in developing countries. In Water quality-new perspectives. IntechOpen.
Omambia, A., Maake, B., Wambua, A., 2022. Water quality monitoring using IoT & machine learning. In 2022 IST-Africa Conference (IST-Africa) (pp. 1-8). IEEE.
Qie, G., Zhang, Z., Getahun, E., Allen Mamer, E., 2023. Comparison of machine learning models performance on simulating reservoir outflow: A case study of two reservoirs in Illinois, USA. J. Am. Water Resour. Assoc., 59(3), 554-570.
Rahimi, D., Hasheminasab, S., 2017. Analysis water quality by artificial neural network in bazoft river (iran). J Chem Pharm Res, 9, 115-121.
Sahoo, S., Russo, T. A., Elliott, J., Foster, I., 2017. Machine learning algorithms for modeling groundwater level changes in agricultural regions of the US. Water Resour. Res., 53(5), 3878-3895.
Sahour, S., Khanbeyki, M., Gholami, V., Sahour, H., Kahvazade, I., Karimi, H., 2023. Evaluation of machine learning algorithms for groundwater quality modeling. Environ. Sci. Pollut. Res., 30(16), 46004-46021.
Sayahi, F., Divband Hafshejani, L., Tishehzan, P. and Abdolabadi, H., 2024. The combination of dimensionality reduction methods and machine learning algorithms in the optimization of Maroon River water quality prediction. IJSWR, 55(9), pp.1601-1615.
Sepahvand, A., Prelovšek, M., Nazari Samani, A. A., Wasson, R. J., 2021. SOLUTE TRANSPORT AND SOLUTIONAL DENUDATION RATE OF CARBONATE KARST IN THE SEMI-ARID ZAGROS REGION (SOUTHWESTERN IRAN). J. Cave Karst Stud., 83(3).
Shirazi, F., Zahiri, A., Piri, J., Dehghani, A. A., 2023. " Research Paper" Development a new hydraulic method for prediction of river flood discharge. J. atershed Manag. Res., 14(28), 110-123. (in persian)
Soleimani Motlagh, M., Talebi, A., Zareei, M., 2016. The study of drought on the quality of surface water resources in Kashkan watershed. J. Watershed Manag. Res., 6(12), 154-165. (in persian)
Yan, X., Zhang, T., Du, W., Meng, Q., Xu, X., Zhao, X., 2024. A Comprehensive Review of Machine Learning for Water Quality Prediction over the Past Five Years. J. Mar. Sci. Eng., 12(1), 159.
Zaresefat, M., Derakhshani, R., 2023. Revolutionizing groundwater management with hybrid AI models: A practical review. Water, 15(9), 1750.