**4. Result and Discussion**

Figure 9 shows the average value and standard deviation of the clearness index for all forecasting sites. Greater variability was observed for Idukki, Vaibhavwadi, Tiruchirappalli, and Osmanabad. Khaga had the lowest variability.

Figure 10 shows cluster-specific features, and K-medoids led to three clusters. Features were selected on the basis of the reduction in impurity scores. For Cluster 0, the mean decrease in impurity was highest for features Kt slope (1-h) and KtPrev15. For Cluster 1, cloud cover squared and KtPrev15-nearby-mean were the most important features. For Cluster 2, cloud cover squared and Kt Slope (1-h) were the most important features. To understand the cloud type of each cluster, we calculated the percentage of cloud-cover information falling in each cluster, and this is illustrated in Figure 11. For Cluster 0, the majority of observations belonged to the broken-cloud type. In Cluster 1, the majority of observations belonged to the clear/sunny-sky type. For Cluster 2, the total numbers of observations in the broken and bvercast cloud types were relatively similar.

Table 5 shows the optimal hyperparameters of the proposed approach (CB-LSTM) for three different cloud conditions of broken, clear/sunny, and broken/overcast. Complex cloud conditions (broken or overcast) require more hidden nodes and parameters to produce good forecasting. Nevertheless, model complexity is less in clear/sunny sky conditions.

Table 6 provides information on the climatic zone-specific forecasting performance of ST-LSTM and a comparison with M-LSTM. For the composite climatic zone, ST-LSTM achieved 5.96%, 3.71%, and 8.80% less RMSE, NRMSE, and MAE, respectively, than the M-ULSTM did. For the hot and dry climatic zone, the corresponding values were 1.58%,

1.44%, and 0.25% respectively. The biggest gain was in the warm and humid climatic zone, with corresponding percentages at 8.65%, 8.34%, and 11.55% respectively.

**Figure 9.** Average value and variability of clearness index of forecasting sites.

**Figure 10.** Cluster-specific best features in terms of mean decrease in impurity.

**Figure 11.** Understanding cloud patterns via cluster-specific distribution of cloud type.


**Table 6.** Forecasting performance of spatial LSTM compared to univariate and multivariate LSTMs.

Table 7 demonstrates the superiority of CB-LSTM over CB-ANN and ST-LSTM in terms of RMSE, NRMSE, and MAE. For the composite climatic zone, CB-LSTM outperformed CB-ANN by 27.16%, 29.49%, and 38.86% in terms of RMSE, NRMSE, and MAE, respectively. For the hot and dry climatic zone, percentages were -5.28%, 8.03%, and 8.85%, respectively. For the warm and humid climatic zone, CB-LSTM achieved 9.80%, 22.04%, and 19.94% less RMSE, NRMSE, and MAE, respectively, as compared to CB-ANN. ST-LSTM was dominated by CB-LSTM in the composite climatic zone by 33.77%, 28.49%, and 19.64% in terms of RMSE, NRMSE, and MAE, respectively. In the hot and dry climatic zone, CB-LSTM led to reductions of 35.37%, 35.26%, and 34.74% in RMSE, NRMSE, and MAE, respectively, as compared to ST-LSTM. For the warm and humid climatic zone, CB-LSTM led to corresponding reductions of 27.65%, 17.78%, and 25.34%, respectively.

The largest gain was observed in the composite climatic zone compared to CB-ANN in terms of RMSE, NRMSE, and MAE. On the other hand, compared to CB-LSTM, the greatest gain was seen in the hot and dry climatic zone. Thus, CB-LSTM led to less forecasting error than that of the M-LSTM and ST-LSTM. CB-LSTM dominated both M-LSTM and ST-LSTM at each of the three different times of day in terms of NRMSE.


**Table 7.** Forecasting performance of CB-LSTM compared to multivariate and spatiotemporal LSTM.

Table 8 illustrates the climatic-zone-specific forecasting superiority of CB-LSTM compared to three benchmark models [21,23,41]. In the hot and dry climatic zone, CB-LSTM achieved maximal gain with 8.86% and 26.81% lower NRMSE compared to [21,41]. On the other hand, in the composite climatic zone, the best NRMSE was 30.56% compared to [23].


**Table 8.** Forecasting performance of CB-LSTM compared with benchmark models in terms of NRMSE (%).

Figure 12a shows climatic-zone-specific variability in predictions of CB-LSTM in terms of NRMSE. clustering-based ANN [23] for the composite and hot and dry climatic zone, and RF-SVR [21] for the warm and humid climatic zone were the worst-performing models. For all climatic zones, CB-LSTM achieves the least prediction error.

Figure 12b shows region-specific variability in predictions of CB-LSTM in terms of NRMSE. CB-LSTM had the least prediction error in both inland and coastal regions.

**Figure 12.** (**a**) Climatic-zone-specific variability in predictions; (**b**) region-specific variability in predictions. The symbol "†" indicates an outlier.

Table 9 shows a comparison of the overall forecasting performance of CB-LSTM to that of three benchmark models in terms of NRMSE and mean rank. CB-LSTM showed the lowest overall NRMSE and mean rank.

**Table 9.** Overall forecasting performance of CB-LSTM compared to that of benchmarks.

