Using these values for mean relative emergence, we then classified S. hermonthica populations as generalist or specialist using two complementary approaches. First, we used hierarchical clustering, an unsupervised approach, to identify groups of S. hermonthica populations with similar mean relative emergence across the three hosts using the ‘hclust’ function in R (R Core Team 2020). Clustering was performed using correlation-based distance, which clusters observations with similar profiles, even if there is large variation in the magnitude of feature values (i.e. mean relative emergence). As the measure of cluster dissimilarity, we used ‘complete linkage’, which considers the maximum distance between any pair of observations in two clusters. We also considered a continuous measure of host specialization, the Paired Difference Index (PDI), calculated as \[PDI=1/(R-1)\sum_{i=2}^R(P_1-P_i)\]where P1 is the highest link strength, P1 is the link strength with the ith resource, and R is the number of resources (Poisot et al. 2012). For calculations of PDI, mean relative emergence was used as a measure of link strength on each resource (host).