An Integrated EWQI-Guided Machine Learning Framework for Groundwater Quality: Regression and Multi-Class Classification under Iraqi Standards
Preprint
- 22 April 2026
- preprint
- Published by MDPI AG in Preprints.org
Abstract
Groundwater is a major source of water supply in Diyala Governorate, Iraq. This study proposes an integrated framework for groundwater quality assessment and forecasting by combining the Entropy Weighted Water Quality Index (EWQI) with machine learning algorithms. A total of 855 groundwater samples were collected, of which 853 were retained after preprocessing. The EWQI was calculated using ten hydrochemical parameters for each sample, namely pH, total dissolved solids (TDS), K+, Na+, Mg2+, Ca2+, Cl−, SO42−, HCO3−, and NO3−. Based on the Iraqi Standard Drinking Water Limits (IQS), EWQI values were categorized into five water quality classes: Excellent, Good, Medium, Poor, and Extremely Poor. For predictive analysis, both regression and classification models were developed using support vector machine (SVM), random forest (RF), backpropagation multilayer perceptron (BP-MLP), and one-dimensional convolutional neural network (1D-CNN) algorithms under three feature scenarios: (1) hydrochemical variables only, (2) hydrochemical variables combined with well properties, and (3) hydrochemical variables, well properties, and spatial coordinates. Model hyperparameters were optimized using grid search with 10-fold cross-validation on the training set, and model performance was evaluated using an 80/20 stratified split. Among the tested models, SVM demonstrated the best performance for EWQI prediction in the first scenario (hydrochemical variables only), achieving RMSE = 4.14, MAE = 0.93, and R2 = 0.999. It also produced the highest classification performance, with an accuracy of 0.971 and a macro-F1 score of 0.973. Meanwhile, RF showed consistently strong and balanced classification performance across all scenarios, reaching a macro-F1 score of 0.961. These findings highlight the effectiveness of integrating EWQI with machine learning techniques for reliable groundwater quality assessment and prediction, thereby supporting sustainable water resource management in Diyala Governorate.Keywords
All Related Versions
This publication has 34 references indexed in Scilit:
- Assessing groundwater quality for drinking and irrigation using hydrogeochemistry and machine learning in Northern ChinaAgricultural Water Management, 2025
- From data to decision: leveraging machine learning and water quality index for groundwater quality evaluationSustainable Water Resources Management, 2025
- A comparative study of imputation techniques for missing values in healthcare diagnostic datasetsInternational Journal of Data Science and Analytics, 2025
- Integrated machine learning based groundwater quality prediction through groundwater quality index for drinking purposes in a semi-arid river basin of south IndiaEnvironmental Geochemistry and Health, 2025
- Comparative Assessment of Machine Learning Models for Groundwater Quality Prediction Using Various ParametersEnvironmental Processes, 2025
- Investigation of groundwater quality indices and health risk assessment of water resources of Jiroft city, Iran, by machine learning algorithmsApplied Water Science, 2024
- Groundwater quality assessment using machine learning models: a comprehensive study on the industrial corridor of a semi-arid regionEnvironmental Science and Pollution Research, 2024
- The usage of 10-fold cross-validation and grid search to enhance ML methods performance in solar farm power generation predictionCleaner Engineering and Technology, 2023
- Evaluation of machine learning algorithms for groundwater quality modelingEnvironmental Science and Pollution Research, 2023
- The Nature of Tigris–Euphrates Rivers Flow: Current Status and Future Prospective2021