# Evaluation and Comparison of Spatial Clustering for Solar Irradiance Time Series
## 4 Koppen Climatic Classification and Clustering Methods
### Geographical Clustering Methods
#### 4.2.2 Clustering Methods Comparison  
The notion of \"objectively correct\" does not exist in clustering: \"clustering is in the eye of the beholder\" [82]. The most appropriate clustering algorithm for a particular problem must often be chosen experimentally, unless there is a mathematical reason to prefer one clustering model over another. An algorithm designed for a specific model type will usually fail on a dataset containing a radically different model type. For example, k-means cannot find nonconvex clusters. According to the literature review, three important factors can be evaluated in clustering: (a) clustering tendency, which helps to evaluate whether the dataset we are working with has clustering tendency and not just uniformly distributed points [81; 83]; (b) number of clusters k and (c) clustering quality. Concerning the last point, which is the most important for us, we can note several metrics which can be divided into internal and external measurements. The first one uses internal information to validate the clustering; that is, it evaluates how good the clustering structure is without the need for information from outside the algorithm itself [84; 85]. Some of the clustering performance measures are the Davies-Bouldin Index, Silhouette Coefficient, Calinski-Harabasz Index, etc. The second one uses external information to validate the clustering and is independent of the clustering technique [86]. Some of the clustering-performance measures are the Rand Index, Jaccard Index, Fowlkes-Mallows scores, mutual-information-based scores, homogeneity, completeness, V-measure, etc. As it seems more relevant to us to use external measures, we have opted for the Rand Index method and the Jaccard Index:  
* The Rand Index (RI) is a measure of the percentage of correct decisions made by the algorithm: RI = (TP + TN)/(TP + FP + FN + TN), where TP is the number of true \begin{table} - & Repeat: Merge the two closest clusters and update the proximity matrix;  
- & Until only a single cluster remains.  
As there is no consensus on which method to use, we chose to test all three in the next one. Table 2 offers a comparison of the main characteristics of the clustering methods used in this work.  
\begin{tabular}{c c c c c} \hline \hline
**Clustering Method** & **Basis of Algorithm** & **Input to Algorithm** & \begin{tabular}{c} **Requires Specified** \\ **Number of Clusters** \\ \end{tabular} & **Cluster Shapes Identified** \\ \hline Hierarchical & \begin{tabular}{c} Distance between objects \\ \end{tabular} & \begin{tabular}{c} Pairwise distances \\ between observations \\ \end{tabular} & No & \begin{tabular}{c} Arbitrarily shaped clusters, \\ depending on the specified \\ “Linkage” algorithm \\ \end{tabular} \\ \hline k-Means & \begin{tabular}{c} Distance between \\ objects and \\ centroids \\ \end{tabular} & Actual observations & Yes & \begin{tabular}{c} Spheroidal clusters with \\ equal diagonal covariance \\ \end{tabular} \\ \hline Spectral & \begin{tabular}{c} Graph representing \\ connections \\ between data points \\ \end{tabular} & \
\begin{tabular}{c} Actual observations \\ or similarity matrix \\ \end{tabular} &
\begin{tabular}{c} Yes, but the algorithm \\ also provides a way to \\ estimate the number \\ of clusters \\ \end{tabular} & Arbitrarily shaped clusters \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Comparison of the main characteristics of the clustering algorithms [80]. positives, TN is the number of true negatives, FP is the number of false positives, and FN is the number of false negatives;
* The Jaccard Index (JI) is a measure that quantifies the degree of similarity between two sets: \(\text{JI}=\mid\text{A}\cap\text{B}\mid/\mid\text{A}\cup\text{B}\mid\), where A and B are two sets or clusters. There is no real reason for this choice, except that their construction seemed better suited to the specificities of our study. The Rand and Jaccard Indices measure the degree of similarity between two sets.