## 2 Materials and Methods
### CEEMDAN-CNN-ATT-LSTM Model
To conclude this section, the experiments were conducted using the Python programming language (version 3.11.11) in the PyTorch library (version 2.5.1+cu121) within a Google Colab environment. The environment comprised an Intel(R) Xeon(R) CPU @ 2.20 GHz (Intel, Santa Clara, CA, USA), 51.00 GB of RAM, a Tesla K80 accelerator (Tesla, Austin, TX, USA), and 12 GB of GDDR5 VRAM. ## 3 Results

This section presents the results for the winter and summer seasons, considering different forecasting time horizons at 1 h, 6 h, and 12 h. In addition, the analyses performed for different temporal resamples are included. The results are compared to the base models, providing an evaluation of the proposed model's performance compared to traditional approaches. Table 6 summarizes the losses obtained using various configurations of our solar radiation forecasting model, evaluated from 12 h forecasts. Our model shows an MAE of 110.43 and a \(R^{2}\) of 0.63, indicating solid performance compared to the models without the proposed configurations. The \"Model + Wavelet\" configuration achieves an MAE of 120.03 and an \(R^{2}\) of 0.61, demonstrating reasonable performance but falling short of the CEEMDAN-enhanced model, particularly in capturing intricate variability in solar irradiance data. The \"Model without attention mechanisms\" yields an MAE of 126.36 and an \(R^{2}\) of 0.60, suggesting a slight reduction in accuracy when attention mechanisms are removed. The \"Model without encoder-decoder and history\" shows an MAE of 132.61 and an \(R^{2}\) of 0.58, reflecting a further loss of accuracy when both historical data and the encoder-decoder structure are excluded. Finally, the \"Baseline LSTM model\" yields an MAE of 135.75 and an \(R^{2}\) of 0.55, indicating a lower explanatory power than the other models. The execution time of our proposed model was evaluated for 12 h forecasts using the hyperparameters outlined in Table 5 with a 1 h resampling interval. Figure 9 shows that the average iteration time was measured across different batch sizes. A batch size of 256 significantly increased iteration time due to processing more data, while a batch size of 64 reduced iteration time by handling fewer data points. However, it is worth noting that in this case, the larger the batch size, the less training time we obtain by \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Model** & **MAE** & **RMSE** & \(R^{2}\) & **Train/Epoch (s)** \\ \hline Our model + CEEMDAN & 110.43 & 141.27 & 0.63 & 2.71 \\ Model + Wavelet & 120.03 & 147.50 & 0.61 & 2.60 \\ Model without attention mechanisms & 126.36 & 145.32 & 0.60 & 2.42 \\ Model without encoder-decoder and history & 132.61 & 150.46 & 0.58 & 2.30 \\ Baseline LSTM model & 135.75 & 133.69 & 0.55 & 1.95 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Losses and training time by epoch for each architecture component with 1 h resampling for 12 h forecast in summer. sacrificing model accuracy. We selected a batch size of 128, as it balances computational efficiency and performance, particularly with eight attention heads. Analysis of dropout rates revealed that values of 0.01 and 0.3 exhibited similar iteration times (0.55 and 0.57 s, respectively). Regarding attention heads, configurations with four heads were slightly faster than those with eight heads. Larger hidden sizes increased iteration time compared to a hidden size of 128, reflecting the higher computational demands of more extensive representations. Similarly, increasing the number of layers led to longer training times due to more computations per iteration. The learning rate had minimal impact on run time, although it significantly affected model accuracy, as will be discussed later. In addition, longer sequence lengths resulted in more complex architectures and exponentially increased training time. Figure 10 presents the loss rates during training and validation across different hyperparameters, including the number of layers, sequence length, and learning rate.