Hybrid Stacking Ensemble of XGBoost and LightGBM with Ridge Regression for High-Accuracy Short-Term Solar Photovoltaic Power Forecasting: A Comprehensive Benchmarking Study
Amira S. Mohamed Amira S. Mohamed, Frederic Andres Frederic Andres
For the successful integration of solar energy into power systems, accurately forecasting photovoltaic (PV) power is critically important. Despite numerous proposals for machine learning and deep learning techniques, few studies offer a unified, leakage-free comparison of models from different families. In this paper, we present Hybrid 3, an efficient stacking ensemble that integrates XGBoost and LightGBM as base learners with a Ridge regression meta-learner. The proposed method is thoroughly compared with 10 alternative forecasting approaches, including a combined persistence baseline (Naïve 24H, Historical Average, and Persistence 1H), linear regression, standalone LightGBM and XGBoost, leaf-index-based hybrids (LGB→XGB and XGB→LGB), residual boosting, GRU, Vanilla Transformer, and a Transformer-Linear Regression hybrid. According to the findings, Hybrid 3 demonstrates excellent performance, achieving an R² of 0.9994, RMSE of 0.0369 kW, MAE of 0.0274 kW, and SMAPE of 12.46%, outperforming all contenders, including complex deep-learning-based models. The Friedman test confirms statistical significance (p < 10⁻⁵). Furthermore, while advanced feature engineering significantly boosts deep learning models (e.g., +2.53% in R² for the Transformer-LR hybrid), it offers marginal gains for the tree-based stacking ensemble, which effectively captures patterns from raw features.