A statistical learning framework for solar irradiance forecasting using temperature clustering and tree-based models
摘要
Forecasting Photovoltaic Global Tilted Irradiance (PV-GTI) plays a key role in planning solar energy production, particularly in semi-arid regions like Morocco, where climate conditions can vary significantly. This study leverages 27 years of monthly solar and meteorological data from the Moroccan Solar Atlas to model long-term solar patterns. To capture heterogeneous weather regimes, four clustering techniques, including K-Means, K-Medoids, Gaussian Mixture Models (GMM), and Fuzzy C-Means (FCM), were evaluated using multiple validation indices, including the Silhouette coefficient (SC), Davies–Bouldin index (DBI), Calinski–Harabasz (CH), Adjusted Rand Index (ARI), and ANOVA. Our contribution is a statistically interpretable framework that integrates unsupervised temperature-based clustering with Bayesian-optimized ensemble regressors to improve GTI forecasting in semi-arid settings. The analysis revealed that K-Means with two clusters, representing cold and hot periods, provided the most meaningful segmentation. Cluster-specific forecasting models were then developed using Bayesian Optimization (BO) to fine-tune ensemble learning algorithms. LightGBM achieved the best performance in the cold period, while XGBoost showed superior accuracy in the hot period. After aggregating cluster-level forecasts, the proposed cluster-based XGBoost model achieved a MAPE of 1.48%, outperforming the best full-dataset model, corresponding to a 3.3% reduction in forecasting error. These findings demonstrate that the proposed cluster-based forecasting framework enhances predictive accuracy by accounting for climatic heterogeneity, providing a robust and scalable strategy for solar energy forecasting under varying environmental conditions.