- Article
Climate change and rising global temperatures are increasingly threatening freshwater ecosystems globally, particularly in semi-arid countries such as South Africa, where water scarcity poses serious challenges to socio-economic development and environmental health. In this regard, predicting how water quality responds to these changes is crucial for sustainable water resource management (WRM) in South Africa. This study presents a machine learning (ML) framework using Random Forest (RF) and Gradient Boosting (GB) models to predict key water quality parameters such as temperature, dissolved oxygen (DO), pH, conductivity (EC), and turbidity in the Vaal River, South Africa. The dataset used in this study was provided by the Department of Water and Sanitation, South Africa, and it has a total of 8096 instances and 55 attributes. The computation process was performed using 20 inputs and missing values were then addressed through gap-filling techniques, without generating artificial trends. The ML framework was chosen in this study due to its ability to capture complex patterns in environmental datasets. Key findings highlight negligible fluctuations in key water quality variables (temperature, DO, pH, EC, and turbidity); with a water sample characterized by temperature: 25 °C and EC: 300 µS/cm, the ensemble model generated the following predictions for key water quality parameters: pH: 7.00 (neutral), turbidity: ~10.44 NTU, and DO: ~8.01 mg/L, implying relatively stable physicochemical conditions and good oxygenation capacity within the sampled section of the river. Results demonstrate that by integrating RF and GB models, the proposed system can robustly predict future parameter loads with high accuracy, offering insights into the complex interplay between temperature increases and microbial contamination. The study also demonstrates that advanced feature engineering and ensemble modelling significantly enhance prediction reliability, making the approach suitable for real-time water quality monitoring systems.
3 December 2026





