## 1 Introduction  
In recent years, scientists have been working on the use and development of systems based on machine learning principles. Machine learning systems achieve almost 100% accuracy in predicting results based on input data with advanced algorithms. Renewable energy production prediction from alternative energy sources is becoming increasingly critical in revealing economic potential and promoting sustainable practices. Machine learning (ML) is a powerful tool that provides almost optimum precision in energy production prediction applications in renewable energy sources. Prediction has significant problems, including data quality fluctuations, environmental uncertainty, and complexities of energy systems. These problems require the investigation of sophisticated ML techniques designed specifically for the renewable energy sector [1]. Such problems have led to various algorithms and artificial intelligence models over time. New algorithms, new approaches emerge, and solutions are produced day by day. ML models use different methods for classification, prediction, and detection. In these methods, certain paths are followed for training the data. Generally, ML techniques are divided into four categories: supervised, unsupervised, semi-supervised, and reinforcement learning [2; 3; 4].  
Tree-based models play an important role in predictions of renewable energy resources. Tree-based models are important in improving the energy prediction accuracy in renewable energy resources [5]. Ensemble learning (EL) has shown significant effectiveness in improving the prediction stability using multiple models. EL approaches such as bagging, boosting, and stacking have increased the accuracy and robustness in various applications including renewable energy prediction [6]. Although ML approaches have shown versatility in various fields, their use in real-time renewable energy prediction has not yet been sufficiently explored. Precise prediction models are essential for improving energy production, storage, and integration in smart grids, especially for renewable resources.  
This study aims to fill this gap by using tree-based ensemble learning methodologies to increase the accuracy and reliability of renewable energy forecasts, especially targeting photovoltaic production. The effect of the methodologies used in increasing the accuracy of energy production forecasts under different weather environmental conditions is highlighted. The effects of weather conditions are an important step in revealing the connections between the factors affecting energy production, and these connections are critical for making accurate forecasts. While traditional econometric methods, such as regression analysis, have been widely used in renewable energy prediction, they often struggle to capture the non-linear and dynamic interactions between environmental factors and energy production. This study highlights the advantages of machine learning approaches, particularly ensemble learning methods, in addressing these challenges through improved accuracy and robustness. In addition, the novelty of this study lies in its systematic evaluation of tree-based ensemble learning methods, such as bagged and boosted trees, for renewable energy prediction. Unlike prior works that focus on standalone models, this study integrates environmental factors and compares computational efficiency, thereby providing practical insights for optimizing energy management systems.