Algal blooms increasingly threaten freshwater ecosystems under escalating anthropogenic pressures and climate warming, yet short-term forecasting remains challenging due to their complex, nonlinear, and region-specific dynamics. Rather than emphasizing algorithm selection, this study develops a robust and ecosystem-adaptive algal bloom forecasting framework that systematically integrates feature selection, optimal forecasting horizon screening, and hyperparameter optimization within an explainable machine-learning architecture. By conceptualizing algal bloom development as a binary state transition from non-bloom to bloom conditions, the framework links data-driven prediction with ecological threshold theory to better support management-oriented applications. It was evaluated using multi-year datasets from four hydrologically contrasting lakes in China, including three deep reservoirs in the northeast and the shallow eutrophic Taihu Lake in the southeast. By jointly optimizing forecasting horizons and input variables and benchmarking Random Forest (RF), Support Vector Machine (SVM), and eXtreme Gradient Boosting (XGBoost) models, we demonstrate that forecasting performance and optimal configurations are ecosystem-dependent. The RF-based framework achieved the highest predictive robustness, achieving accuracy (ACC) of 94% in northeastern lakes (NEL) and 82% in Taihu, with optimal horizons of 3 and 5 days, respectively. By employing SHapley Additive exPlanations (SHAP), we interpreted model behavior by quantifying the relative contributions of predictors to bloom classification: organic matter and electrical conductivity contributed strongly to model predictions in deep and cold-water systems, whereas thermal and meteorological factors were the most influential predictors in the shallow subtropical lake. This study highlights that robust algal bloom forecasting depends not merely on algorithm selection, but on a systematic, ecosystem-adaptive framework that tailors predictive variables and forecasting windows. The proposed framework provides a mechanism-aware and scalable tool for early warning of algal blooms across diverse freshwater environments. • Conceptualizes algal bloom forecasting as a binary classification problem distinguishing between bloom occurrence and non-occurrence. • Introduces an explainable ensemble learning framework integrating SHAP analysis. • Identifies region-specific factors associated with bloom occurrence across four Chinese lakes. • Provides a data-driven and interpretable approach for supporting freshwater management.
Wang et al. (Sun,) studied this question.