TY - JOUR T1 - PREDICTING WATER HARDNESS THROUGH DATA-DRIVEN INTELLIGENCE: A COMPARATIVE MACHINE LEARNING APPROACH AU - Çoban, Erdem AU - Saplıoğlu, Kemal PY - 2025 DA - December Y2 - 2025 DO - 10.36306/konjes.1709984 JF - Konya Journal of Engineering Sciences JO - KONJES PB - Konya Technical University WT - DergiPark SN - 2667-8055 SP - 1094 EP - 1106 VL - 13 IS - 4 LA - en AB - Water hardness is a key parameter in evaluating water availability and plays a critical role in the development of sustainable water management strategies. In this study, water hardness was estimated using four advanced machine learning algorithms: Random Forest (RF), Support Vector Regression (SVR), Multiple Linear Regression (MLR), and AdaBoost. The input variables used for model training included sodium (Na), potassium (P), and anion-cation concentrations. The dataset was obtained from the Beşkonak flow measurement station located on the Köprüçay Stream in southern Turkey, which plays a vital role in the regional hydrological system. Model performance was assessed using statistical indicators such as mean square error (MSE), root mean square error (RMSE), coefficient of determination (R²), and mean absolute percentage error (MAPE). Among the evaluated models, MLR achieved the highest accuracy with an R² value of 0.9945, followed by SVR with 0.9939, AdaBoost with 0.9700, and RF with 0.9400. In terms of predictive error, MLR yielded the lowest RMSE value at 0.248, while SVR, AdaBoost, and RF recorded RMSE values of 0.264, 0.545, and 0.592, respectively. These results demonstrate that the MLR model outperformed the others in estimating water hardness, while the remaining models also produced acceptable levels of accuracy. This study provides a valuable contribution to the understanding of data-driven approaches for water quality assessment and offers insights for future water resource planning. KW - Water Hardness KW - Machine Learning KW - Prediction Models KW - Regression Analysis KW - Support Vector Regression KW - Random Forest KW - Multiple Linear Regression KW - Adaboost Algorithm CR - M. Hori, K. Shozugawa, K. Sugimori, and Y. Watanabe, "A survey of monitoring tap water hardness in Japan and its distribution patterns," Sci. Rep., vol. 11, no. 1, p. 13546, 2021, Doi: 10.1038/s41598-021-92949-8. CR - L. Cohen, A. Moreno, and J. L. Berna, "Influence of anionic concentration and water hardness on foaming properties of a linear alkylbenzene sulfonate," J. Am. Oil Chem. Soc., vol. 70, pp. 75–78, 1993. doi: 10.1007/BF02545371 CR - T. Morales-Pinzón, R. Lurueña, X. Gabarrell, C. M. Gasol, and J. Rieradevall, "Financial and environmental modelling of water hardness—Implications for utilising harvested rainwater in washing machines," Sci. Total Environ., vol. 470, pp. 1257–1271, 2014, doi: 10.1016/j.scitotenv.2013.10.101. CR - D. J. Soucek et al., "Influence of water hardness and sulfate on the acute toxicity of chloride to sensitive freshwater invertebrates," Environ. Toxicol. Chem., vol. 30, no. 4, pp. 930–938, 2011, doi: 10.1002/etc.454. CR - Avcı, B. C., Kesgin, E., Atam, M., & Tan, R. I. (2023). Modeling agricultural practice impacts on surface water quality: Case of Northern Aegean watershed, Turkey. International Journal of Environmental Science and Technology, 20(5), 5265–5280. https://doi.org/10.1007/s13762-022-04477-1 CR - Y. Liu, P. Wu, D. Zhu, L. Zhang, and J. Chen, "Effect of water hardness on emitter clogging of drip irrigation," Trans. Chin. Soc. Agric. Eng., vol. 31, no. 20, pp. 95–100, 2015. doi: 10.11975/j.issn.1002-6819.2015.20.014 CR - U. Mohseni, C. B. Pande, S. C. Pal, and F. Alshehri, "Prediction of weighted arithmetic water quality index for urban water quality using ensemble machine learning model," Chemosphere, vol. 352, p. 141393, 2024, doi: 10.1016/j.chemosphere.2024.141393. CR - S. Talukdar et al., "Predicting lake water quality index with sensitivity-uncertainty analysis using deep learning algorithms," J. Clean. Prod., vol. 406, p. 136885, 2023. CR - R. Acar and K. Saplıoğlu, "Etkili girdi parametrelerinin çoklu regresyon ile belirlendiği su sertliğinin ANFIS yöntemi ile tahmin edilmesi," Afyon Kocatepe Univ. J. Sci. Eng., vol. 22, no. 6, pp. 1413–1424, 2022, https://doi.org/10.35414/akufemubid.1147492. CR - K. Saplıoğlu and R. Acar, “K-Means Kümeleme Algoritması Kullanılarak Oluşturulan Yapay Zekâ Modelleri ile Sediment Taşınımının Tespiti”, Bitlis Eren Üniversitesi Fen Bilimleri Dergisi, vol. 9, no. 1, pp. 306–322, 2020, doi: 10.17798/bitlisfen.558113. CR - R. Acar and K. Saplıoğlu, “AKARSULARDAKİ SEDİMENT TAŞINIMININ YAPAY SİNİR AĞLARI VE ANFIS YÖNTEMLERİ KULLANILARAK TESPİTİ”, NÖHÜ Müh. Bilim. Derg., vol. 9, no. 1, pp. 437–450, 2020, doi: 10.28948/ngumuh.681208. CR - R. Acar and K. Saplioglu, Using the Particle Swarm Optimization (PSO) Algorithm for Baseflow Separation and Determining the Trends for the Yesilirmak River (North Turkey). Russ. Meteorol. Hydrol. 49, 40–51, 2024, https://doi.org/10.3103/S1068373924010060. CR - Güçlü, Y. S., Subyani, A. M., & Şen, Z. (2017). Regional fuzzy chain model for evapotranspiration estimation. Journal of Hydrology, 544, 233–241. https://doi.org/10.1016/j.jhydrol.2016.11.045 CR - E. Çoban, "Makine Öğrenmesi Algoritmaları ile Yaz Sezonu Ortalama Akım Değerlerinin Tahmini," J. Innov. Civ. Eng. Technol., vol. 6, no. 2, pp. 73–81, doi: 10.60093/jiciviltech.1497771. CR - A. Mosavi, F. S. Hosseini, B. Choubin, M. Goodarzi, and A. A. Dineva, "Groundwater salinity susceptibility mapping using classifier ensemble and Bayesian machine learning models," IEEE Access, vol. 8, pp. 145564–145576, 2020. doi: 10.1109/ACCESS.2020.3014908 CR - A. N. Ahmed et al., "Machine learning methods for better water quality prediction," J. Hydrol., vol. 578, p. 124084, 2019, doi: 10.1016/j.jhydrol.2019.124084. CR - N. Nasir et al., "Water quality classification using machine learning algorithms," J. Water Process Eng., vol. 48, p. 102920, 2022, doi: 10.1016/j.jwpe.2022.102920. CR - B. Ouadi et al., "Optimizing silt density index prediction in water treatment systems using pressure-based Gradient Boosting hybridized with Salp Swarm Algorithm," J. Water Process Eng., vol. 68, p. 106479, 2024, doi: 10.1016/j.jwpe.2024.106479. CR - U. Ejaz et al., "Monitoring the industrial waste polluted stream—Integrated analytics and machine learning for water quality index assessment," J. Clean. Prod., vol. 450, p. 141877, 2024. doi: 10.1016/j.jclepro.2024.141877 CR - L. Breiman, "Random forests," Mach. Learn., vol. 45, pp. 5–32, 2001. doi: 10.1023/A:1010933404324 CR - V. Vapnik, The Nature of Statistical Learning Theory, Springer, 1995. CR - Montgomery, D. C., Peck, E. A., & Vining, G. G. (2012). Introduction to Linear Regression Analysis (5th ed.). Wiley. CR - Y. Freund and R. E. Schapire, "A decision-theoretic generalization of on-line learning and an application to boosting," J. Comput. Syst. Sci., vol. 55, no. 1, pp. 119–139, 1997. doi: 10.1006/jcss.1997.1504 CR - 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. https://doi.org/10.3390/w11112210 CR - Mosavi, A., Hosseini, F. S., Choubin, B., Abdolshahnejad, M., Gharechaee, H., Lahijanzadeh, A., & Dineva, A. A. (2020). Susceptibility prediction of groundwater hardness using ensemble machine learning models. Water, 12(10), 2770. https://doi.org/10.3390/w12102770 CR - Nouraki, A., Alavi, M., Golabi, M., & Albaji, M. (2021). Prediction of water quality parameters using machine learning models: A case study of the Karun River, Iran. Environmental Science and Pollution Research, 28(40), 56792–56805. https://doi.org/10.1007/s11356-021-14560-8 UR - https://doi.org/10.36306/konjes.1709984 L1 - https://dergipark.org.tr/en/download/article-file/4918154 ER -