## 2 Materials and Methods
### CEEMDAN-CNN-ATT-LSTM Model
As for the summer season, data from December to May 2023 are used for training, July 2024 for validation, and August 2024 for testing. This strategy considers seasonal variations, which can significantly affect the model's accuracy. ### Model Hyperparameters

Table 5 shows the hyperparameters used in the hybrid model. The hyperparameters shown in the table were selected because they obtained the best model performance. The sequence length and model prediction were set to 144, allowing the model to process data sequences of 144 units. A batch size 128 was used to balance computational efficiency and training stability. The model includes 2 LSTM layers, allowing temporal dependencies in the data to be more effectively captured. In addition, 8 attention mechanisms were implemented to improve the model's ability to focus on relevant parts of the sequence. Finally, 3 convolutional layers were added to extract additional spatial features from the data. ### Model Evaluation Metrics

We use different common error metrics in forecasting models to evaluate the proposed model. These metrics include the root mean square error (RMSE), the mean absolute error (MAE), the mean absolute percentage error (MAPE), and the coefficient of determination (\(R^{2}\)). In Equations (41)-(44) we define these metrics. * Root mean square error (RMSE): RMSE calculates the square root of the mean of the squared differences between the predicted values (\(\hat{y}_{i}\)) and the actual values (\(y_{i}\)). It is highly sensitive to large errors, as these are squared before averaging. A lower RMSE indicates higher predictive accuracy, and a value of zero would represent a perfect model. RMSE is calculated as in Equation (41). Figure 8:6 (41)
* Mean absolute error (MAE): MAE is defined as in Equation (42). This metric calculates the mean of the absolute differences between predicted and actual values. In contrast to RMSE, MAE does not penalize large errors so heavily and so it is a good option when a metric that treats all errors equally is required. A lower MAE indicates better model performance. Figure 8:7 (42)
* Mean absolute percentage error (MAPE): MAPE is the mean of the absolute percentage errors between the forecast and actual values. A lower MAPE indicates that the forecast is closer to the observed values. However, one disadvantage of MAPE is that when actual values tend toward zero, they typically become extremely large, leading to disproportionately large values. Its calculation is based on Equation (43). Figure 8:8 (43) \begin{table}
\begin{tabular}{l c} \hline \hline
**Hyperparameter** & **Value** \\ \hline Sequence length & 144 \\ Length of prediction & 4 (2 h), 24 (12 h) \\ Batch size & 128 \\ Hidden dimension (CNN LSTM \& ATT) & 256 \\ Kernel Size (CNN) & 3 \\ Stride (CNN) & 2 \\ Padding (CNN) & 1 \\ Output dimension & 1 \\ Number of LSTM layers & 3 \\ Number of encoder/decoder layers & 1 \\ Attention mechanisms & 8 \\ Dropout probability & 0.1 \\ Learning rate & 0.00001 \\ Learning rate factor & 0.25 \\ Epochs with max learning rate & 3 \\ Total epochs & 100 \\ Patience for early stopping & 10 \\ Time resampling interval & 10 min, 30 min and 1 h \\ Target variable & Solar irradiance (W/m\({}^{2}\)) \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Hyperparameters used in CNN-ATT-LSTM. * Coefficient of determination (\(R^{2}\)): \(R^{2}\), defined in Equation (44), measures the proportion of the variance in the dependent variable that is predictable from the independent variables. A value \(R^{2}\) close to 1 indicates that the model accurately predicts the target variable. In contrast, a value \(R^{2}\) close to 0 indicates that the model does no better than the mean of the target values. \[R^{2}=1-\frac{\sum_{i=1}^{n}(y_{i}-\hat{y}_{i})^{2}}{\sum_{i=1}^{n}(y_{i}-\hat{ y})^{2}}\] (44)

In Equations (41)-(44), \(y_{i}\) represents the actual values, \(\hat{y}_{i}\) represents the predicted values, \(n\) is the number of samples, and \(\hat{y}\) is the mean value of \(y_{i}\).