Published June 14, 2023 | Version 1

Finding the Sweet Spot: Determining the Number of Runs Required for Accurate Single-Objective Stochastic Optimization Analysis

  • 1. Jožef Stefan Institute

Description

This repository contains the code and data for the paper "Finding the Sweet Spot: Determining the Number of Runs Required for Accurate Single-Objective Stochastic Optimization Analysis"
To ease reproducibility, the repository has been separated into multiple folders, each containing the materials needed for a subset of the work. This readme serves to connect these folders, following the ordering as seen in the paper. 

# Part 1: Performance data

The data for this paper is based on running a set of 104 DE configurations (hyperparameters available in the 'DE_configurations' csv) on the COCO benchmark suite (24 problems x 15 instances x 3 problem dimensions (10, 20, 40)), 104 DE configurations (hyperparameters listed in the 'DE_configurations' csv) on the CEC 2014 benchmark suite (30 problems x a single instance x 5 problem dimensions (10, 20, 30, 50, 100)), five Modular CMA-ES run on the COCO benchmark suite (24 problems x 15 instances x 3 problem dimensions (10, 20, 40)) (hyperparameters presented in the paper), 11 Nevergrad algorithms with their default hyperparameters run on COCO (25 problems x 10 instances x one dimension (20)). For each combination (problem, instance, dimension) and an algorithm 50 repeated runs have been collected. In total, all described combinations of an algorithm portfolio and a benchmark suite resulted in 6,798,000 runs.

The results of running DE configurations on the COCO benchmark suite are stored in the 'COCO' folder, the results of running DE configurations on the CEC 2014 benchmark suite are stored in the 'CEC' folder, the results of running modular CMA-ES on the COCO benchmark suite are stored in 'CMAES' folder, while the results from running the Nevergrad algorithms on the COCO benchmark suite are available in the 'Nevergrad' folder. For each algorithm, the performance data is stored in a separate file.


# Part 2: Estimating the number of runs 

The run_parser.R code estimate the percentage of triplets per each algorithm/configuration separately for which the proposed methodology leads accurate estimation together with the results from the post-hoc evaluations. The code should be executed for each algorithm/configuration (input command parameter) separately and produces three outputs "{i_}{name_of_the_input_file}.csv", "i" is the id of the outlier technique applied (1 - IQR, 2 - Percentile, 3 - MAD). Each output file contains the percentage of triplets for which the proposed methodology leads accurate estimation together with the results from the post-hoc evaluations across 10 different sampling seeds (10 rows in the csv file). The last row is the average results across the 10 rows, which is the percentage of triplets of correct estimations across all problem instances and across all problem dimensionality of the selected benchmark suite and the selected algorithm/configuration.

Example: 

    In general every R script can be run in the following format:
        Rscript [path_to_script]{script_name}.R [script_parameters]
    
    Running command for a single file (algorithm/configuration) could be as follows:
        Rscript run_parser.R -p [path_to_folder]COCO/per_benchmark_set_COCO-1679673042670.csv

    The generated output files for provided example would be:
        - out/1_per_benchmark_set_COCO-1679673042670.csv
        - out/2_per_benchmark_set_COCO-1679673042670.csv
        - out/3_per_benchmark_set_COCO-1679673042670.csv

Running the code for different folders of the performance data produces the following results stored in COCO_results (for DE configurations and COCO benchmark suite), CEC_results (for DE configurations), CMAES_COCO (for modular CMAES configurations and COCO benchmark suite), and Nevergrad_COCO (for Nevergrad algorithms and COCO benchmark suite). 

# Part 3: Wrong analysis per dimension and problem

The COCO_parser.R code produces three output folders: 'COCO_results_dim', 'COCO_results_problems', and 'COCO_results_problems_dim'. The 'COCO_results_dim' contains the number of problem instances per each problem dimension (10, 20, and 40) that are not solved per each algorithm/configuration separately (evaluated by the bootstrapping CIs). The output files are "{i_}{name_of_the_input_file}.csv", "i" is the id of the outlier technique applied (1 - IQR, 2 - Percentile, 3 - MAD).  Here, each output file contains the number of problem instances for which the proposed methodology lead to inaccurate estimation across 10 different sampling seeds (10 rows in the csv file). The last row is the average result across the 10 rows, which is the number of incorrect estimations across all problem instances of the selected benchmark suite and the selected algorithm/configuration. The 'COCO_results_problems' contains files where the problem, the instance, and its dimension for which the proposed methodology leads to inaccurate estimation are stored for each file separately and one sampling seed. The names of the files are "{i_}{j_}{name_of_the_input_file}.csv", "i" is the id of the outlier technique applied (1 - IQR, 2 - Percentile, 3 - MAD), and j is the seed used for sampling. The 'COCO_results_problems_dim' contains the number of problem instances per each problem dimension (10, 20, and 40) that are not solved per each algorithm/configuration separately (evaluated by the post-hoc approach). "{i_}{j_}{name_of_the_input_file}.csv", "i" is the id of the outlier technique applied (1 - IQR, 2 - Percentile, 3 - MAD), and j is the seed used for sampling. Here, each output file contains the number of problem instances for which the proposed methodology leads to inaccurate estimation across all problem instances. The files contain six rows which are the percentages used for post-hoc evaluation.

The CEC_parser.R code produces three output folders: 'CEC_results_dim', 'CEC_results_problems', and 'CEC_results_problems_dim'. The explanation is the same as the COCO_parser only the CEC benchmark problems are used in five problem dimensions (10, 20, 30, 50, and 100).

These results allow us to summarize them and present them in Fig 2, Fig 3, and Fig 4. The pre-processing scripts for making the visualizations can be requested by the authors.


# Part 4: Results from the probability equations:
The codes CEC_COCO_calucaltions.R (for DE configurations) and Nevergard_CMAES_calucaltions.R (for modular CMAES and Nevergrad) calculate the results obtained by the probability theory in the process of estimating the number of runs for each triplet. The codes are the same, the difference is only the formatting format of the files, which is the reason for having two different scripts. The results for each combination of an algorithm portfolio and a benchmark suite are stored in the 'Calucaltion' folder. There are four subfolders 'COCO' for DE and COCO, 'CEC' for DE and CEC, 'CMAES' for modular CMAES and COCO, and 'Nevergrad' for Nevergrad algorithms and COCO. All files (in each folder) produced by the codes are named  "{i_}{name_of_the_input_file}.csv", "i" is the id of the outlier technique applied (1 - IQR, 2 - Percentile, 3 - MAD).

The summarization of those results allows us to calculate the green benchmarking results presented in Table V.

Files

Calculation.zip

Files (192.1 MB)

Name Size
md5:6ea646b2956dbde60b01c9ae67f130db
7.2 MB Preview Download
md5:bf95580158de989e4d1028e00e8993a4
5.1 kB Download
md5:5e2eb68966a93f927fe72f3fb7de5484
7.8 kB Download
md5:8e7179095b84f829b12ba7fec40b0636
144.2 kB Preview Download
md5:a6a87a93bb5dda0cc575e9af475f3b3a
119.5 kB Preview Download
md5:e44f3ba0c5dcedb871411457b65baff2
1.7 MB Preview Download
md5:e9a04ed99afd7ec1cfcf8e9cd618b4f2
1.2 MB Preview Download
md5:7c7d6d5a1e06a46f28881d600113a3c4
13.6 kB Preview Download
md5:904a76cdd55b77f1ef57c886aaa5ace8
7.8 kB Download
md5:025abb03436a2c46af24eef158ca0682
169.7 kB Preview Download
md5:fbcc623187acd685030cd66f81ad4d62
114.0 kB Preview Download
md5:e82ecc05fcd61125a3ab2fd16f255526
4.8 MB Preview Download
md5:804e84aa63f65516f116e652361e4f06
1.1 MB Preview Download
md5:59dbf7952e25897f8bf842c2b2dcd8dd
2.5 kB Preview Download
md5:9f73ec4da56e65d5c0405a9a12a3caa6
5.1 kB Download
md5:83c0f4c0e74bc71d0c1dffa048eeef00
20.9 kB Preview Download
md5:f030df137018c9cd3d4b7954f8ff4bc3
175.5 MB Preview Download
md5:4307aee14f1314d99f0cc636c7e15803
7.2 kB Preview Download
md5:620a78d55aec7ba33b3525ddf3f2dcb9
6.8 kB Download