# Efficient Machine Learning-Based Prediction of Solar Irradiance Using Multi-Site Data
## 3 Results and Discussion
### Results from Each Station
Zenith Angle [degrees]_t1_30 min has a strong negative correlation with ghi_t1_30 min at \(-\)0.77 and ghi_t2_30 min at \(-\)0.76, indicating that as the sun ascends, the GHI increases. Furthermore, Azimuth Angle [degrees]_t6_30 min shows moderate correlations with other features, like Zenith Angle [degrees]_t1_30 min at 0.47 and Zenith Angle [degrees]_t-2_30 min at 0.99, reflecting the sun's position and its impact on irradiance. Lastly, the high correlation at 0.89 between Direct Normal (calc) [W/m\({}^{2}\)]_t1_30 min and Diffuse Horiz (shadowband) [W/m\({}^{2}\)]_t1_30 min indicates a strong relationship between these two types of irradiance. On the other hand, the model performance table in Table 6 highlights that CatBoostRegressor and other ensemble methods like GradientBoostingRegressor and RandomForestRegressor achieve high \(R^{2}\) values (approximately 0.97), indicating strong predictive capabilities. These models also exhibit low RMSE and MAE values, confirming their accuracy in predicting irradiance values. The median absolute error (median AE) is consistently low, particularly for RandomForestRegressor and ExtraTreesRegressor, suggesting fewer large prediction errors. When visualizing Figure 10c, the CatBoost regressor residuals analysis for predicting GHI in the next 30 min across the time axis, it is evident that the errors are generally within \(\pm\)200. Only a few outliers exceed this range, indicating that the model performs well over the entire three-year dataset. It can also be observed that this error margin narrows to less than \(\pm\)100 at certain time points, such as between January 2022 and March 2022. 4. UNLV: A total of 20 features exist at this station, representing the GHI variations, the ambient conditions, and the performance monitoring of the solar panels. The time-shifted values revealed a strong correlation between global UVA and UVE for up to 2 h, as depicted in Figure 9d. Similarly, shifted GHI and DNI values showed high correlation for up to 1 h. Subsequently, tree-based algorithms were trained to predict GHI values for the next 30 min. The performance comparison of the models shows that all tested algorithms achieve high \(R^{2}\) values, indicating strong predictive accuracy, as viewed in Table 6. RF performs slightly better, with the highest \(R^{2}\) of 0.9814 and the lowest MAE of 14.67, reflecting minimal average prediction error. CatBoostRegressor follows closely, with similar accuracy but a slightly higher RMSE and MAE. MLPRegressor and GradientBoostingRegressor show good performance as well, though they exhibit higher RMSE and MAE compared to RF. ET is comparable to RF in terms of \(R^{2}\) and error metrics. DecisionTreeRegressor, while having a lower \(R^{2}\) and higher RMSE and MAE, still shows reasonable performance but with less accuracy. In this comparison, RandomForestRegressor emerges as the most effective model. RAZON: The RAZON station is characterized by 15 features that include the GHI, DNI, DHI, ambient conditions, solar PV temperature, azimuth angle, and battery operating conditions. The training process, like all the other stations, consisted of studying the correlation with lagged versions and employing the most influential features as inputs for the models. Figure 9e provides a feature correlation study, while Table 6 provides the obtained results. The correlation heatmap for RAZON over 30 min intervals reveals significant relationships among the variables, particularly between the GHI and DNI across different time shifts (\(t-1\), \(t-2\), \(t-3\),...). Notably, the GHI values at \(t-3\) and \(t-2\) have very high positive correlations with each other, at 0.95, and with DNI at corresponding time shifts. Conversely, the azimuth and zenith angles exhibit lower correlations with irradiance variables, indicating less dependency. This suggests that while the angles provide important contextual data, the irradiance measures are more interdependent.