Learn R Programming

irace (version 4.2.0)

psRace: Post-selection race

Description

psRace performs a post-selection race of a set of configurations.

Usage

psRace(
  iraceResults,
  max_experiments,
  conf_ids = NULL,
  iteration_elites = FALSE,
  psrace_logFile = NULL
)

Value

The elite configurations after the post-selection. In addition, if iraceResults$scenario$logFile is defined, it saves an updated copy of iraceResults in that file, where iraceResults$psrace_log is a list with the following elements:

configurations

Configurations used in the post-selection race.

instances

Data frame with the instances used in the post-selection race. First column has the instances IDs from iraceResults$scenario$instances, second column the seed assigned to the instance.

max_experiments

Configuration budget assigned to the post-selection race.

experiments

Matrix of results generated by the post-selection race, in the same format as the matrix iraceResults$experiments. Column names are the configuration IDs and row names are the instance IDs.

elites

Best configurations found in the experiments.

Arguments

iraceResults

list()|character(1)
Object created by irace and typically saved in the log file irace.Rdata. If a character string is given, then it is interpreted as the path to the log file from which the iraceResults object will be loaded.

max_experiments

numeric(1)
Number of experiments for the post-selection race. If it is equal to or smaller than 1, then it is a fraction of the total budget given by iraceResults$scenario$maxExperiments or iraceResults$scenario$maxTime / iraceResults$state$boundEstimate.

conf_ids

IDs of the configurations in iraceResults$allConfigurations to be used for the post-selection. If NULL, then the configurations are automatically selected.

iteration_elites

If FALSE, give priority to selecting the configurations that were elite in the last iteration. If TRUE, select from all elite configurations of all iterations. This parameter only has an effect when conf_ids is not NULL.

psrace_logFile

character(1)
Log file to save the post-selection race log. If NULL, the log is saved in iraceResults$scenario$logFile.

Author

Leslie Pérez Cáceres and Manuel López-Ibáñez

Examples

Run this code
# \donttest{
  irace_log <- read_logfile(system.file(package="irace", "exdata", "sann.rda"))
  # Use a temporary file to not change the original "sann.rda".
  psrace_logFile <- withr::local_tempfile(fileext = ".Rdata")
  # Execute the post-selection after the execution of irace. Use 10% of the total budget.
  psRace(irace_log, max_experiments=0.1, psrace_logFile = psrace_logFile)
  # Print psrace_log
  irace_log <- read_logfile(psrace_logFile)
  str(irace_log$psrace_log)
# }

Run the code above in your browser using DataLab