Skip to content
Conference

Performance Comparison of Artificial Neural Networks and Random Forest for Water Quality Prediction

Aug 2026 · International Conference Computational Vision and Bio Inspired Computing · pp. 306-311 · 0 citations · 20 references

Abstract

Accurate prediction of the groundwater quality is essential for safeguarding public health from contaminated water and to guide water management decisions, especially in areas in which rapid population, industrial and agricultural growth lead to pollution and groundwater is the primary source of water. Traditional statistical methods cannot capture the non-linear relationships among groundwater quality parameters; the Water Quality Index (WQI) combines multiple physicochemical parameters into a single index of water quality. Groundwater quality data from primary sources were used for this study to predict WQI using two machine learning algorithms: Artificial Neural Network (ANN) and Random Forest (RF) regression. Twelve physicochemical parameters (pH, TDS, EC, alkalinity, chloride, sodium, potassium, magnesium, calcium, Total Hardness, and nitrate) were used as input variables and WQI as output variables. The data was split into a 70:30 ratio for training and testing. They were chosen because they can handle non-linear relationships, multicollinearity, and complex interactions in hydrogeochemical data. The ANN with the backpropagation model had good predictive ability, with $\mathrm{R}^{\mathrm{2}}$ values of $\text{1. 0 0 0}$ in training, 0.987 in validation, and 0.955 in testing, and an average RMSE of less than 6. Sensitivity to data partitioning is a common problem in small datasets with extreme values. The RF model was more stable with $\mathrm{R}^{\mathrm{2}} > \text{0. 9 5}$ and $\text{R M S E} = \mathrm{5}$ for both the training and test data. Diagnostic tests confirmed their reliability: out-of-bag error increased, and the residuals were randomly distributed around Zero, exhibiting no systematic bias. The models' suitability for assessing groundwater quality was similar, with Random Forest showing better generalisation-resistance to fitting and prediction accuracy. The results validate the potential of implementing groundwater quality monitoring and management using machine learning (especially RF regression), and the method could be easily transferred to other areas and environmental parameters for better groundwater resource planning.

View source

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.