DOI: 10.17798/bitlisfen.1892953 ISSN: 2147-3129

Interpretable Machine Learning for Daily Streamflow Using Gam And Xgboost With Shap-Based Analysis

Mehmet Şamil Güneş
Predicting and interpreting streamflow changes is critical for the long-term sustainability of water resources under climate variability. This study investigates daily streamflow dynamics in Turkey's Sakarya River Basin using Generalized Additive Models (GAM), Extreme Gradient Boosting (XGBoost), and Explainable AI techniques. Daily discharge data from five gauge stations were combined to represent basin-scale behavior, and corresponding meteorological variables were obtained from the NASA POWER dataset for 2021. Two modeling approaches were compared: GAM, which captures non-linear relationships among variables, and XGBoost, which accounts for complex variable interactions. Model performance was evaluated using R², RMSE, MAE, and train-test overfitting diagnostics. XGBoost significantly outperformed GAM (R² = 0.769 vs. 0.502) while demonstrating consistent generalization capacity (ΔR² ≤ 0.05). To bridge the gap between predictive accuracy and interpretability, SHAP-based feature attribution was applied. Results reveal that temperature, dew point temperature, and atmospheric humidity exert a greater individual influence on daily discharge variability than precipitation alone, highlighting the dominant role of thermal and atmospheric moisture dynamics in basin-scale hydrological responses at the daily timescale. The XGBoost–SHAP framework effectively combines high predictive accuracy with process-consistent interpretability, supporting the advancement of hybrid predictive-interpretive approaches in hydrologic modeling. These findings confirm that machine learning models, when paired with explainability tools, provide meaningful insights into underlying physical processes driving streamflow. The methodology presented serves as a transferable framework for analyzing streamflow responses to changing climate conditions across diverse river basins, contributing to more informed and resilient water resource management strategies