Introduction
The global increase in flood occurrences, particularly from intense rainfall, poses serious threats to people, infrastructure, and the environment. South Africa is no exception, with Ladysmith Town located within the uThukela watershed on the foothills of the Drakensberg mountains, experiencing frequent flooding over the past century. Despite advances in hydrological modelling, accurate flood prediction remains challenging due to the non-linear and non-stationary nature of flow data.
Methods
This study employs a data-driven machine learning (ML) approach to predict floods along the Klip River using daily flow time series obtained from the Department of Water and Sanitation for the period 07/08/2022 to 23/06/2023. A comparative analysis was conducted between Random Forest (RF) and ARIMA models. RF operated in two stages: classification (distinguishing between increase and decrease in flow) followed by regression (predicting the magnitude of flow change), using default parameters and an 80:20 training–validation split. For ARIMA, the Augmented Dickey-Fuller test was applied to assess stationarity, and the optimal model was selected as ARIMA (3,4,1). Traditional methods like ARIMA assume stationarity, whereas ML techniques overcome this limitation by identifying underlying patterns without such constraints.
Results
The hybrid RF model achieved a mean absolute error (MAE) of 16 m³/s, significantly outperforming ARIMA, which recorded an MAE of 80.19 m³/s, a nearly five-fold improvement. RF also successfully predicted flood peaks, demonstrating superior performance in capturing non-stationary patterns and extreme events. This highlights the advantage of ensemble learning approaches like RF over conventional time-series methods for complex hydrological data.
Conclusion
These findings clearly demonstrate that Random Forest can enhance flood prediction and decision-making for water management within the Klip River catchment of Ladysmith. The study supports broader adoption of ML techniques for improving early warning systems, disaster preparedness, and resilience in flood-prone regions.