Estimating Indices of Irrigation Water Quality (TH, SAR, and RSC) by EC and pH Using Machine Learning Algorithms

Document Type : Research Paper

Authors

1 Associate Prof., Department of Nature Engineering, Faculty of Agriculture & Natural Resources, Ardakan University, P.O. Box 184, Ardakan, Iran.

2 Associate Prof., Department of Horticulture, Faculty of Agriculture and Natural Resources, Ardakan University, Ardakan, Iran.

Abstract

The parameters sodium adsorption ratio (SAR), total hardness (TH), and residual sodium carbonate (RSC) play a vital role in agricultural activities, but their measurement requires specialized equipment and considerable time. The aim of this study was to predict SAR, TH, and RSC values based on measured electrical conductivity (EC) and pH using different Machine Learning algorithms. For this purpose, seven algorithms including Decision Tree, K-Nearest Neighbors (KNN), Support Vector Machine (SVM), Cubist, Random Forest, Super Learning, and XGBoost were examined. In this study, data from 132 water samples with laboratory-measured EC, pH, SAR, RSC, and TH values were used. Results showed that the use of Super Learning significantly improved prediction accuracy compared to the other algorithms. Specifically, the R² values obtained using both EC and pH simultaneously for predicting TH, RSC, and SAR were 0.91, 0.88, and 0.68, respectively, which were higher than those of other methods. Using EC alone yielded R² values of 0.87 for TH, 0.86 for RSC, and 0.73 for SAR, while using pH alone reduced the R² values to 0.12, 0.11, and 0.9, respectively. The findings of the present study indicate that with simple EC and pH measurements combined with machine learning algorithms, especially Super Learning, it is possible to accurately predict TH, RSC, and SAR parameters, thereby reducing costs and enabling faster decision-making in water resources management

Keywords


  1. آزاد اسلامیه، محمدرضا، کلانتری، سعیده، شیر­مردی، مصطفی، و تازه، مهدی، 1395. بررسی کاربری اراضی و خصوصیات شیمیایی-فیزیکی‌خاک بر سرعت آستانۀ فرسایش ‌بادی با استفاده از داده‌کاوی، نشریه مهندسی اکوسیستم بیابان، (29)9، صص 12-1. https://doi.org/22052/deej.2020.9.29.1
  2. تقی­زاده، روح­الله، غزالی، آرزو، کلانتری، سعیده ، و رحیمیان، محمد حسن،1395. مکان‌یابی شوری خاک با استفاده از داده‌های محیطی و نمونه‌برداری هایپرکیوب در شهرستان میبد، نشریهخشک بوم، (6)1، صص79-69. https://doi.org/1001.1.2008790.1395.6.1.6.9
  3. فتحی­زاد، حسن، تازه، مهدی، و کلانتری، سعیده،1394. مقایسه کارآیی روشهای طبقه بندی پیکسل پایه (روشهای شبکه عصبی آرتمپ فازی و تصمیم­گیری درختی) و شیءگرا در تهیه نقشه کاربری اراضی (مطالعه موردی: حوزه خشک و نیمه­خشک میمه، استان ایلام)، نشریه خشک بوم، (5)2،صص 81-69.
  4. Afendras, G. and Markatou, M., 2019. Optimality of training/test size and resampling effectiveness in cross-validation. Journal of Statistical Planning and Inference199, pp.286-301. https://doi.org/10.1016/j.jspi.2018.07.005
  5. Ahmed, A.N., Binti Othman, F., Abdulmohsin Afan, H., Khaleel Ibrahim, R., Ming Fai, C., Shabbir Hossain, M.D., Ehteram, M., Elshafie, A., 2019. Machine learning methods for better water quality prediction. J. Hydrol. 578, 124084.

https://doi.org/10.1016/j.jhydrol.2019.124084

  1. Cagliari, J., Veronez, M.R. and Alves, M.E., 2011. Remaining phosphorus estimated by pedotransfer function. Revista Brasileira de Ciência do Solo35, pp.203-212.

https://doi.org/10.1590/S0100-06832011000100019

  1. Carr, P.M., Brevik, E.C., Horsley, R.D. and Martin, G.B., 2015. Long‐Term No‐Tillage Sequesters Soil Organic Carbon in Cool Semiarid Regions. Soil Horizons56(6), pp.1-7. https://doi.org/10.2136/sh15-07-0016
  2. Castrillo, M., García, Á.L., 2020. Estimation of high frequency nutrient concentrations from water quality surrogates using machine learning methods. Water 2020.115490. Res. 172, 115490.

https://doi.org/10.1016/j

  1. Chen, K., Chen, H., Zhou, C., Huang, Y., Qi, X., Shen, R., Liu, F., Zuo, M., Zou, X., Wang, J., Zhang, Y., Chen, D., Chen, X., Deng, Y., Ren, H., 2020. Comparative analysis of surface water quality prediction performance and identification of key water parameters using different machine learning models based on big data. Water Res. 171, 115454. https://doi.org/10.1016/j.watres.2019.115454.
  2. Di, Z., Chang, M., Guo, P., 2019. Water quality evaluation of the Yangtze River in China using machine learning techniques and data monitoring on different time scales. Water (Switzerland) 11. https://doi.org/10.3390/w11020339.
  3. Fathizad, H., Tazeh, M., Kalantari, S. and Shojaei, S., 2017. The investigation of spatiotemporal variations of land surface temperature based on land use changes using NDVI in southwest of Iran. Journal of African Earth Sciences134, pp.249-256. https://doi.org/10.1016/j.jafrearsci.2017.06.007
  4. Gupta, S.K., 1983. Variations of water table in Yamuna drainage basin of Haryana-implications and management strategies. In Seminar on Strategies for Irrigation Water Management, Patna.
  5. Liu, P., Wang, J., Sangaiah, A., Xie, Y., Yin, X., 2019. Analysis and prediction of water quality using LSTM deep neural networks in IoT environment. Sustainability 11, 2058. https://doi.org/10.3390/su11072058.
  6. Lu, H., Ma, X., 2020. Hybrid decision tree-based machine learning models for short term water quality prediction. Chemosphere 249, 126169.

https://doi.org/10.1016/j.chemosphere.2020.126169

  1. Ibrahim, H., Yaseen, Z.M., Scholz, M., Ali, M., Gad, M., Elsayed, S., Khadr, M., Hussein, H., Ibrahim, H.H., Eid, M.H. and Kovács, A., 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. Water15(4), p.694. https://doi.org/10.3390/w15040694
  2. Marakoğlu, T. and Çarman, K., 2010. Fuzzy knowledge-based model for prediction of soil loosening and draft efficiency in tillage. Journal of Terramechanics47(3), pp.173-178. https://doi.org/10.1016/j.jterra.2009.10.001
  3. McBratney, A.B., Odeh, I.O., Bishop, T.F., Dunbar, M.S. and Shatar, T.M., 2000. An overview of pedometric techniques for use in soil survey. Geoderma97(3-4), pp.293-327. https://doi.org/10.1016/S0016-7061(00)00043-4
  4. Merdun, H., Çınar, Ö., Meral, R. and Apan, M., 2006. Comparison of artificial neural network and regression pedotransfer functions for prediction of soil water retention and saturated hydraulic conductivity. Soil and Tillage Research90(1-2), pp.108-116. https://doi.org/10.1016/j.still.2005.08.011
  5. Minasny, B., McBratney, A.B., Brough, D.M. and Jacquier, D., 2011. Models relating soil pH measurements in water and calcium chloride that incorporate electrolyte concentration. European Journal of Soil Science62(5), pp.728-732.

 https://doi.org/10.1111/j.1365-2389.2011.01386.x

  1. Papacharalampous, G., Tyralis, H. and Koutsoyiannis, D., 2019. Comparison of stochastic and machine learning methods for multi-step ahead forecasting of hydrological processes. Stochastic environmental research and risk assessment33(2), pp.481-514. https://doi.org/10.1007/s00477-018-1638-6
  2. Peltre, C., Thuriès, L., Barthès, B., Brunet, D., Morvan, T., Nicolardot, B., Parnaudeau, V. and Houot, S., 2011. Near infrared reflectance spectroscopy: A tool to characterize the composition of different types of exogenous organic matter and their behaviour in soil. Soil Biology and Biochemistry43(1), pp.197-205.

 https://doi.org/10.1016/j.soilbio.2010.09.036

  1. Polley, E., LeDell, E., Kennedy, C., Lendle, S. and van der Laan, M.J., 2019. SuperLearner: super learner prediction R packages. [Online] Available: https://github. com/ecpolley/SuperLearner [2019 Jan. 2].
  2. Deka, P.C., 2014. Support vector machine applications in the field of hydrology: a review. Applied soft computing19, pp.372-386.

https://doi.org/10.1016/j.asoc.2014.02.002

  1. Sagi, O. and Rokach, L., 2018. Ensemble learning: A survey. Wiley interdisciplinary reviews: data mining and knowledge discovery8(4), p.e1249.

https://doi.org/10.1002/widm.1249

  1. Shaw, S.K. and Sharma, A., 2025. Evaluation and prediction of groundwater quality for irrigation using regression and machine learning models. Water Quality Research Journal, p.wqrj2025075. https://doi.org/10.2166/wqrj.2025.075
  2. Simm, J., De Abril, I.M. and Sugiyama, M., 2014. Tree-based ensemble multi-task learning method for classification and regression. IEICE TRANSACTIONS on Information and Systems97(6), pp.1677-1681. https://doi.org/10.1587/transinf.E97.D.1677
  3. Tyralis, H., Papacharalampous, G., Burnetas, A. and Langousis, A., 2019. Hydrological post-processing using stacked generalization of quantile regression algorithms: Large-scale application over CONUS. Journal of Hydrology577, p.123957.

https://doi.org/10.1016/j.jhydrol.2019.123957

  1. Tyralis, H., Papacharalampous, G. and Langousis, A., 2019. A brief review of random forests for water scientists and practitioners and their recent history in water resources. Water11(5), p.910. https://doi.org/10.3390/w11050910
  2. Wang, X., Zhang, F., Ding, J., 2017. Evaluation of water quality based on a machine learning algorithm and water quality index for the Ebinur Lake Watershed. China. Sci. Rep. 7, 1–18. https://doi.org/10.1038/s41598-017-12853-y.
  3. Wang, D., Liu, S., Zhang, C., Xu, M., Yang, J., Yasir, M. and Wan, J., 2023. An improved semantic segmentation model based on SVM for marine oil spill detection using SAR image. Marine Pollution Bulletin192, p.114981.

 https://doi.org/10.1016/j.marpolbul.2023.114981

  1. Wilcox, L.V., Blair, G.Y. and Bower, C.A., 1954. Effect of bicarbonate on suitability of water for irrigation. Soil Science77(4), pp.259-266. https://doi.org/10.1097/00010694-195404000-00001
  2. Zhu, A.X., Qi, F., Moore, A. and Burt, J.E., 2010. Prediction of soil properties using fuzzy membership values. Geoderma158(3-4), pp.199-206.

https://doi.org/10.1016/j.geoderma.2010.05.001