## 2 Materials and Methods
### Methods
\[Loss\ Function=\sum_{i=1}^{n}(y_{i}-(\beta_{0}+\beta_{1}X_{i}))^{2}+a\sum_{j=1 }^{p}\beta_{j}^{2}\]  
Lasso regression employs an \(L1\) penalty, which not only reduces the magnitude of coefficients but also causes some of them to become zero, thereby facilitating the selection of pertinent features [20]. \[Loss\ Function=\sum_{i=1}^{n}(y_{i}-(\beta_{0}+\beta_{1}X_{i}))^{2}+a\sum_{j=1 }^{p}\lvert\beta_{j}\rvert\]  
The ElasticNet algorithm employs a hybrid approach, integrating both the Lasso (\(L1\)) and Ridge (\(L2\)) penalties [21]. \[Loss\ Function=\sum_{i=1}^{n}(y_{i}-(\beta_{0}+\beta_{1}X_{1}+\beta_{2}X_{2}+ \beta_{3}X_{3}))^{2}+a_{1}\sum_{j=1}^{p}\lvert\beta_{j}\rvert+a_{2}\sum_{j=1 }^{p}\beta_{j}^{2}\]  
Support Vector Regression (SVR) employs a non-linear approach to data partitioning in order to generate forecasts. The predictions of this model are typically concentrated around a central value. Similarly, the Random Forest model, which is also a non-linear forecasting model like the SVR, employs a method of combining multiple decision trees to make forecasts. In general, this model demonstrates efficacy in the analysis of complex and variable data. SVR is fundamentally distinct from linear and regularized regression models in that it fits the optimal hyperplane within a margin (\(\epsilon\)) [22]. \[y=\omega^{T}X+b\]  
Random Forest is an ensemble learning method that aggregates the predictions of multiple decision trees:  
\[\hat{y}=\frac{1}{M}\sum_{m=1}^{M}f_{m}(X)\]  
The variable \(M\) represents the number of trees, while \(f_{m}(X)\) denotes the prediction derived from the \(m\)-th tree [23]. The selection of the most appropriate model is contingent upon the nature of the data and the analysis requirements. Linear regression, despite its status as a fundamental and elucidating model, is vulnerable to multicollinearity and the risk of overfitting. Regularized regression models, such as Ridge and Lasso, have been shown to enhance the generalization capacity of the model. ElasticNet combines these advantages. Support Vector Machines (SVMs) and Random Forest are more suitable for non-linear and complex data structures. In this study, the input data (features) for the regression models consist mainly of environmental parameters: irradiance, air temperature, panel temperature, humidity, atmospheric pressure, wind speed, and ultraviolet index (UV index). These parameters were recorded concurrently with energy production data from monocrystalline and polycrystalline photovoltaic panels. The modeling of environmental factors as input variables (features) and the utilization of energy production as the target variable (target) is a key aspect of this study. During the preparation of the dataset, missing data were removed, anomalous values were rectified, and consistent scaling was ensured among all variables. The integration of these parameters into the models was achieved by combining data on the environmental conditions and the energy produced under these conditions in each observation. For instance, radiation and temperature were identified as key determinants of energy production, and their individual and joint effects were analyzed. Regression models have been developed to predict energy production using environmental data. This methodological approach facilitated a comprehensive examination of the relationship between environmental factors and energy production, thereby enhancing the representation of this relationship in non-linear models. In this study, all experiments were conducted using the Python programming language, which offers a comprehensive ecosystem of libraries supporting data analysis and machine learning processes. Various Python-based libraries were utilized to facilitate different stages of the analysis. Notably, the Pandas library was employed for data preprocessing and manipulation, encompassing operations such as loading datasets, editing date formats, and filtering data from the previous six months.