Explainable Machine Learning for Streamflow Forecasting: Application to the Bosna River Basin
As one of the key water systems in Bosnia and Herzegovina, the Bosna River Basin plays a vital role in sustaining agricultural production, industrial development, and water supply for municipalities. Accurate streamflow forecasting is fundamental to optimising water resource planning. This study explores streamflow forecasting using long-term data (1961–2020) from five meteorological stations and one hydrological station distributed across various sections of the basin. For precise streamflow forecasting, the study employs several machine-learning models: Random Forest, LSTM, and XGBoost. Model performance is evaluated using widely used metrics, including mean absolute error, root mean square error, Nash–Sutcliffe efficiency (NSE), and Kling–Gupta efficiency (KGE). Among the tested models, Random Forest proved to be the most accurate for streamflow forecasting, confirming its effectiveness in capturing the complex dynamics of hydrological processes. During the testing phase, the Random Forest model achieved an NSE of 0.591 and a KGE of 0.591, demonstrating good generalisation and reliable predictions. The results demonstrate the strength of Random Forest in capturing nonlinear hydrological patterns and supporting reliable streamflow forecasting for national water management. Moreover, as a novel approach, explainable AI was applied using SHAP analysis to go beyond the regular predictions of the models, thereby providing a deeper understanding of the model’s performance described by the magnitude and direction of influence of each problem feature.
Institutions
- Guizhou Normal University (CN)
- University of Banja Luka (BA)
- University of Nova Gorica (SI)
- Institute of Electrical Engineering of the Slovak Academy of Sciences (SK)
- Institute of Information Science (SI)
Publication Details
- Journal
- Water
- Published
- 2026-05-19
- DOI
- https://doi.org/10.3390/w18101226
- Primary Topic
- Hydrological Forecasting Using AI
- Type
- article
- Field-Weighted Citation Impact
- 0.00
Funders
- European Regional Development Fund