# Generation of Data-Driven Expected Energy Models for Photovoltaic Systems
## 2 Methodology
### Model Design and Training
In addition to individual parameter influences, interactions and temporal factors were incorporated as input features to capture nuances within the datasets. Interaction parameters, which allow the effect of one parameter on the response variable to be weighted by the value of another variable, are introduced by including terms which are the product of two or more predictor variables. For example, Figure 4 shows that the relationship between \(E\) and \(I\) does vary across \(C_{DC}\). Thus, the inclusion of an \(I\) and \(C_{DC}\) interaction term may be helpful in predicting the generated energy. The suite of interaction combinations are instantiated using polynomial models up to the third order (i.e., degree \(d=3\)). In a model with \(d=2\) and \(2\) covariates, the initiated regression model would take the following form:  
\[y=\beta_{0}+\beta_{1}x_{1}^{2}+\beta_{2}x_{2}^{2}+\beta_{3}x_{1}x_{2}+\beta_{4 }x_{1}+\beta_{5}x_{2}. \tag{3}\]  
Notice that a \(d=2\) also includes \(d=1\) parameters (i.e., \(\beta_{4}x_{1}\) and \(\beta_{5}x_{2}\)). This remains true for all values of the polynomial power (e.g., for a model initiated with \(d=3\), terms from \(d=2\) and \(d=1\) are also included). Two interaction polynomial orders are tested: a second-order (\(d=2\)) and a third-order (\(d=3\)) (Table 2). The particular interaction noted above (\(I\times C_{DC}\)) is captured in multiple models, including an additive model with a single interaction term (Table 2). In addition to interactions, temporal factors are used to capture a variable's changing effect on the energy generated over time. For instance, the correlation between \(I\) and \(E\) changes over the course of the year due to spectral irradiance effects [32; 33]. Therefore, allowing the model to capture time-variant nuances may be important for capturing such nonlinearities. Three temporal based conditions were explored: seasonal (four per year), monthly, and hourly. A model with two predictor variables and monthly temporal-based variable conditions would be instantiated as:  
\[ \begin{split} y&=a_{jan}1_{t\in jan}x_{1}+a_{feb}1 _{t\in feb}x_{1}+\ldots+a_{dec}1_{t\in dec}x_{1}\\ &+b_{jan}1_{t\in jan}x_{2}+b_{feb}1_{t\in feb}x_{2}+\ldots+b_{ dec}1_{t\in dec}x_{2},\end{split}  \tag{4}\]  
where the \(a\) and \(b\) parameters are coefficients describing the effect of parameter \(x_{1}\) and \(x_{2}\), respectively, when conditioned on a month of the year. For instance, \(a_{jan}\) describes the effect of \(x_{1}\) on the \(y\) response variable during the month of January. The indicator function \(1_{t}\) masks the predictor variable to ensure it is within its timeframe. With the various combinations of interactions and temporal conditions, a total of 13 regression kernels were evaluated (Table 2; see Appendix A for some of the mathematical formulations). Figure 4: Correlation between energy production and irradiance for raw data (**a**) and preprocessed data (**b**) for different site capacities. Higher correlations in the preprocessed data indicate interaction between DC capacity and irradiance for energy production.