*3.5. Clustering-Based ANN (CB-ANN) and LSTM (CB-LSTM)*

CB-ANN was designed following [23]. CB-LSTM is a global forecasting model, designed using K-medoid clustering followed by LSTM. Meteorological parameters collected from the neighboring sites together with clearness index values from the forecast site were not directly used as predictors. As mentioned in Section 3.2, derived features were extracted for Kt from the forecast site and cloud cover information from neighboring sites.

Figure 6 shows a cluster-specific feature identification to understand the important features of a cluster. For each forecasting site, a spatiotemporal dataset was created that was split into training (80%) and test sets (20%). A global dataset was created by combining the training sets of all the forecast sites, and normalized using the min–max normalizer [33]. Next, the optimal number of clusters was determined on the basis of the elbow–silhouette [34] method. The K-medoids algorithm is used to cluster the time windows in the dataset. As the input attributes were related to cloud formation, the clusters intuitively represent different cloud types. As a result, the dataset was split into k clusters, where each cluster center was represented by a medoid.

**Figure 6.** Cluster-specific best feature identification strategy.

The proposed approach is presented in Figure 7 and is described as follows:



**Table 4.** Hyperparameters to optimize.

**Figure 8.** Network configuration of CB-LSTM.


**Table 5.** Optimal hyperparameter settings for CB-LSTM in different cloud conditions.
