## 2 Methods
### Drought Regionalization  
Regionalizing is a valuable technique used frequently in various disciplines which deal with large spatial datasets. The goal is to preserve the patterns in the dataset and produce homogeneous and contiguous clusters. Spatial \"K\" luster Analysis using Tree Edge Removal (SKATER) method [38] has been chosen to regionalize droughs in Pakistan because of three reasons. Firstly, SKATER considers the spatial contiguity of the dataset and produces clusters accordingly. This is a crucial consideration when regionalizing drought as it is a spatial phenomenon, so that a comprehensive analysis of this hazard requires the preservation of the spatial contiguity of the dataset used to identify droughts. The second reason for choosing this algorithm is the ability of SKATER to include restrictions while clustering. Finally, SKATER has not been employed in regionalizing droughts in Pakistan before.  
The SKATER algorithm is an efficient method for regionalization, which \"combines the use of a minimum spanning tree with combinational optimization techniques\" [38]. SKATER represents the objects as connected graphs, and it captures the adjacency relationship among these objects by creating a connectivity graph, as shown in Figure 3a. A minimum spanning tree can be seen in Figure 3b.  
Each object in the figure above is represented as a vertex, which is linked to other vertices by edges. The attribute of interest--the value of SPEI in this case--is signified by the vertex, whereas the relationship to its neighbors is characterized by a \"weight,\" or cost, assigned to the respective edges.  
The weight of each edge is directly proportional to the dissimilarity measure between the two vertices it joins. The value of the attribute stored in each vertex is used to calculate the dissimilarity measure, which is then assigned to the edge joining the vertices. Connected clusters are obtained by pruning the graph at suitable places with a high dissimilarity.  
A tree is a special type of a connected graph where no circuits are present. A circuit is defined as a path in graphs where \"the first and the final nodes (vertices) are the same\" [38]. Moreover, a spanning tree of a graph where all the nodes are connected by an exclusive path and the number of edges is one less than the total number of nodes. A Minimum Spanning Tree (MST), in addition, is a spanning tree with the edges having the minimum cost, i.e., the total dissimilarity measure of all the edges combined is the lowest.  
[PERSON]'s algorithm [39] is used to build the MST recursively. Starting with an empty spanning tree, the algorithm maintains two sets of vertices. The first one contains all the vertices not included in the MST, whereas the other one contains those vertices that are included in the MST. Each iteration picks the edge with minimum cost and moves the endpoint of the edge to the set containing the MST. This process is repeated until all the vertices are included in the set contained in the MST.  
A hierarchical division strategy is used to produce clusters in the MST. Initially, a single tree incorporates all the vertices. Each iteration partitions the MST by removing an edge to produce the required number of disconnected trees. The edge to be removed is selected based on the quality of the resulting cluster, which is measured in terms of the sum of the intra-cluster square deviation, which is to be kept to a minimum. Homogeneous regions have a low sum of square deviations. The result is spatially contiguous regions based on a property value assigned to the vertices.  
Figure 3: (a) Connectivity graph displaying the adjacency relationship between objects; (b) minimum spanning tree produced after pruning edges with high dissimilarity.