A simulated annealing algorithm for joint stratification and sample allocation
Section 6. Comparing the performance of the two algorithms
6.1 Evaluation plan
In this section, we
outline the comparison of the performance of the grouping genetic algorithm
with the simulated annealing algorithm. We used a number of data sets of
varying sizes in these experiments. There are a number of regions in each data
set (labelled here as domains). An optimal stratification and minimum sample
allocation was selected for each domain.
The sum of the samples
for all domains provides the total sample size. The sample size, or cost of the
solution, defines the solution quality. For more details on domains refer to
Ballin and Barcaroli (2013). The aim of these experiments was to consider
whether the SAA can attain comparable solution quality with the GGA in less
computation time per solution thus resulting in savings in execution times.
However, we also compared
the total execution times as this is a consequence of the need to train the
hyperparameters for both algorithms. More details are available in the Appendix.
We tabulate the results
of these experiments in Section 6.4 where for comparison purposes we
express the SAA results as a ratio of those for the GGA.
6.2 Comparing the number of solutions generated
After the first iteration
the GGA retains the elite solutions, from the
previous iteration. These are calculated by the product of the elitism rate
(the proportion of the chromosome population which are elite solutions), and the
chromosome population size (the number of candidate solutions in each
iteration), As have already
been evaluated they are not evaluated again.
For this reason, we
compared the evaluation times for the evaluated solutions in the GGA with all
those of the SAA. For the GGA, the total number of evaluated solutions, is a function
of the number of domains, the chromosome
population size, the non-elite solutions (calculated by the product of and and the number
of iterations, For more
details on the implementation of GGAs (e.g. elite solutions, elitism rate,
chromosome population) we refer the reader to (Falkenauer, 1998)
For the simulated annealing algorithm, the maximum number of solutions, is the number of domains, by the number of sequences, maxit, by the length of sequence, Recall that the SAA also stops if the minimum temperature has
been reached ‒ hence we refer to the maximum number of
solutions rather than the total. For comparability purposes however,
because the temperature is decremented only at the end of each sequence and we
have a small number of sequences in the experiments below we assume the full
number of solutions has been generated
6.3 Data sets, target and auxiliary variables
Table 6.1 provides a
summary by data set of the target and auxiliary variables.
Table 6.1
Summary by data set of the target and auxiliary variables
Table summary
This table displays the results of Summary by data set of the target and auxiliary variables. The information is grouped by Dataset (appearing as row headers), Target variables, Description and Auxiliary variables (appearing as column headers).
| Dataset |
Target variables |
Description |
Auxiliary variables |
Description |
| Swiss Municipalities |
Surfacebois |
wood area |
POPTOT |
total population |
| Airbat |
area with buildings |
Hapoly |
municipality area |
| American Community Survey, 2015 |
HINCP |
Household income past 12 months |
BLD |
Units in structure |
| VALP |
Property value |
TEN |
Tenure |
| SMOCP |
Selected monthly owner costs |
WKEXREL |
Work experience of householder and spouse |
| INSP |
Fire/hazard/flood insurance yearly amount |
WORKSTAT |
Work status of householder or spouse in family households |
| HFL |
House heating fuel |
| YBL |
When structure first built |
| US Census, 2000 |
HHINCOME |
total household income |
PROPINSR |
Annual property insurance cost |
| COSTFUEL |
annual home heating fuel cost |
| COSTELEC |
Annual electricity cost |
| VALUEH |
House value |
| Kiva Loans |
term_in_months |
duration for which the loan was disbursed |
sector |
high level categories, e.g. food |
| lender_count |
the total number of lenders |
currency |
currency of the loan |
| loan |
the amount in USD |
activity |
more granular category, e.g. fruits & vegetables |
| region |
region name within the country |
| partner_id |
ID of the partner organization |
| UN Commodity Trade Statistics data |
trade_usd |
value of the trade in USD |
commodity |
type of commodity e.g. “Horses, live except pure-bred breeding” |
| flow |
whether the commodity was an import, export, re-import or re-export |
| category |
category of commodity, e.g. silk or fertilisers |
The target and auxiliary
variables for the Swiss Municipalities data set were selected based on the
experiment described in Ballin and Barcaroli (2020). Accordingly, POPTOT
and HApoly were converted into categorical variables using the k-means
clustering algorithm. However, we used more domains and iterations in our
experiment. More information on this data set is provided by Barcaroli (2014).
For the remaining
experiments we selected target and auxiliary variables which we deemed likely
to be of interest to survey designers. Further details on the American
Community Survey, 2015 (U.S. Census Bureau, 2016), the U.S. Census, 2000 (Ruggles,
Genadek, Goeken, Grover and Sobek, 2017), Kiva Loans (Kiva, 2018), and the UN
commodity trade statistics data (United Nations, 2017) metadata are available
in O’Luing et al. (2019).
A further summary by data
set of the number of records and atomic strata, along with a description of the
domain variable, is provided in Table 6.2 below.
Table 6.2
Summary by data set of the number of records and atomic strata and a description of the domain variable
Table summary
This table displays the results of Summary by data set of the number of records and atomic strata and a description of the domain variable. The information is grouped by Data set (appearing as row headers), Number of records, Number of atomic strata, L and Domain variable (appearing as column headers).
| Data set |
Number of records |
Number of atomic strata, L |
Domain variable |
| Swiss Municipalities |
2,896 |
579 |
REG |
| American Community Survey, 2015 |
619,747 |
123,007 |
ST (the 51 states) |
| US Census, 2000 |
627,611 |
517,632 |
REGION |
| Kiva Loans |
614,361 |
84,897 |
country code |
| UN Commodity Trade Statistics data |
352,078 |
351,916 |
country or area |
6.4 Results
As mentioned previously,
we used an initial solution in each experiment that is created by the KmeansSolution
algorithm (Ballin and Barcaroli, 2020). We then compared the performance of the
algorithms in terms of average computation time (in seconds) per solution and
solution quality. Table 6.3 provides the sample size, execution times and
total execution times for the SAA and GGA.
Table 6.3
Summary by data set of the sample size and evaluation time for the grouping genetic algorithm and simulated annealing algorithm
Table summary
This table displays the results of Summary by data set of the sample size and evaluation time for the grouping genetic algorithm and simulated annealing algorithm. The information is grouped by Data set (appearing as row headers), GGA and SAA (appearing as column headers).
| Data set |
GGA |
SAA |
| Sample size |
Execution time (seconds) |
Total Execution time (seconds) |
Sample size |
Execution time (seconds) |
Total Execution time (seconds) |
| Swiss Municipalities |
128.69 |
753.82 |
10,434.30 |
125.17 |
248.91 |
8,808.63 |
| American Community Survey, 2015 |
10,136.50 |
13,146.25 |
182,152.46 |
10,279.44 |
517.76 |
6,822.42 |
| US Census, 2000 |
228.81 |
2,367.36 |
36,298.35 |
224.75 |
741.75 |
8,996.85 |
| Kiva Loans |
6,756.19 |
15,669.11 |
288,946.79 |
6,646.67 |
664.30 |
7,549.87 |
| UN Commodity Trade Statistics data |
3,216.68 |
6,535.97 |
88,459.22 |
3,120.07 |
1,169.26 |
12,161.80 |
The total execution time is
the sum of the execution times for 20 evaluations of the GGA and SAA algorithms
(by the MBO (model-based
optimisation) function in the R package mlrMBO (Bischla,
Richterb, Bossekc, Hornb, Thomasa and Langb, 2017))
using 20 sets of selected hyperparameters (i.e. one set for each evaluation).
Details on the precision constraints and hyperparameters for each experiment
can be found in the Appendix. Table 6.4 expresses the SAA results as a
ratio of those for the GGA.
Table 6.4
Ratio comparison of the sample sizes, execution times, and total execution times for the grouping genetic algorithm and simulated annealing algorithm
Table summary
This table displays the results of Ratio comparison of the sample sizes. The information is grouped by Data set (appearing as row headers), Sample size, Execution time (seconds) and Total execution time (seconds) (appearing as column headers).
| Data set |
Sample size |
Execution time (seconds) |
Total execution time (seconds) |
| Swiss Municipalities |
0.97 |
0.33 |
0.84 |
| American Community Survey, 2015 |
1.01 |
0.04 |
0.04 |
| US Census, 2000 |
0.98 |
0.31 |
0.25 |
| Kiva Loans |
0.98 |
0.04 |
0.03 |
| UN Commodity Trade Statistics data |
0.97 |
0.18 |
0.14 |
As can be seen, the
sample sizes are similar, however, the SAA shows significantly lower execution
and total execution times. When these experiments are run in parallel, for
cases where there is a large number of domains, there may not be enough cores
to cover all domains in one run. Indeed, it may take several parallel runs to
complete the task, and this will affect mean evaluation time. The computer
specifications are provided in Table A.2. Table 6.5 shows the number
of solutions evaluated by each algorithm to obtain the results shown in Table 6.3.
It also provides a ratio comparison of the average execution time (in seconds) per
solution.
Table 6.5
Number of solutions and ratio comparison of execution time (per second) between the grouping genetic algorithm and simulated annealing algorithm
Table summary
This table displays the results of Number of solutions and ratio comparison of execution time (per second) between the grouping genetic algorithm and simulated annealing algorithm. The information is grouped by Data set (appearing as row headers), Number of solutions evaluated and Average execution time per solution (seconds) (appearing as column headers).
| Data set |
Number of solutions evaluated |
Average execution time per solution (seconds) |
| GGA |
SAA |
GGA |
SAA |
Proportion |
| Swiss Municipalities |
840,140 |
210 |
0.0009 |
0.0012 |
1.3210 |
| American Community Survey, 2015 |
2,550,510 |
459 |
0.0052 |
0.0011 |
0.2188 |
| US Census, 2000 |
10,872 |
36 |
0.2177 |
0.0206 |
0.0946 |
| Kiva Loans |
2,190,730 |
730 |
0.0072 |
0.0009 |
0.1272 |
| UN Commodity Trade Statistics data |
2,395,026 |
1,539,000 |
0.0027 |
0.0008 |
0.2784 |
The above results
indicate that the GGA has evaluated more solutions to find a solution of
similar quality to the SAA in all cases, except for the US Census, 2000
experiment. However, we also can see that the SAA takes less time to evaluate
each solution in all cases except for the Swiss Municipalities
experiment. The average execution time for each experiment can be considered in
the context of the size of the data set, parallelisation, and the particular
sets of hyperparameters used for the GGA and SAA. In addition to this, there is
also memoisation in the evaluation algorithm for the GGA, and the gains
obtained by delta evaluation by the SAA.
Gains are more noticeable
for larger data sets, because of the size of the solution and number of atomic
strata in each stratum. As the strata get larger in size, the movement of atomic strata
from one stratum to another (where is small) will
have a smaller impact on solution quality and, therefore, the delta evaluation
will be quicker.
ISSN : 1492-0921
Editorial policy
Survey Methodology publishes articles dealing with various aspects of statistical development relevant to a statistical agency, such as design issues in the context of practical constraints, use of different data sources and collection techniques, total survey error, survey evaluation, research in survey methodology, time series analysis, seasonal adjustment, demographic studies, data integration, estimation and data analysis methods, and general survey systems development. The emphasis is placed on the development and evaluation of specific methodologies as applied to data collection or the data themselves. All papers will be refereed. However, the authors retain full responsibility for the contents of their papers and opinions expressed are not necessarily those of the Editorial Board or of Statistics Canada.
Submission of Manuscripts
Survey Methodology is published twice a year in electronic format. Authors are invited to submit their articles in English or French in electronic form, preferably in Word to the Editor, (statcan.smj-rte.statcan@canada.ca, Statistics Canada, 150 Tunney’s Pasture Driveway, Ottawa, Ontario, Canada, K1A 0T6). For formatting instructions, please see the guidelines provided in the journal and on the web site (www.statcan.gc.ca/SurveyMethodology).
Note of appreciation
Canada owes the success of its statistical system to a long-standing partnership between Statistics Canada, the citizens of Canada, its businesses, governments and other institutions. Accurate and timely statistical information could not be produced without their continued co-operation and goodwill.
Standards of service to the public
Statistics Canada is committed to serving its clients in a prompt, reliable and courteous manner. To this end, the Agency has developed standards of service which its employees observe in serving its clients.
Copyright
Published by authority of the Minister responsible for Statistics Canada.
© His Majesty the King in Right of Canada as represented by the Minister of Industry, 2022
Use of this publication is governed by the Statistics Canada Open Licence Agreement.
Catalogue No. 12-001-X
Frequency: Semi-annual
Ottawa