irace implements iterated Race. It receives some parameters to be tuned
and returns the best configurations found, namely, the elite configurations
obtained from the last iterations (and sorted by rank).
irace(scenario, parameters)Data structure containing irace settings.The data structure
has to be the one returned by the function defaultScenario and
readScenario.
Data structure containing the parameter definition. The data
structure has to be the one returned by the function readParameters.
A data frame with the set of best algorithm configurations found by irace. The data frame has the following columns:
.ID.Internal id of the candidate configuration.
Parameter namesOne column per parameter name in parameters.
.PARENT.Internal id of the parent candidate configuration.
Additinally, this function saves an R data file containing an object called
iraceResults. The path of the file is indicated in scenario$logFile.
The iraceResults object is a list with the following structure:
scenarioThe scenario R object containing the irace
options used for the execution. See defaultScenario help
for more information.
parametersThe parameters R object containing the
description of the target algorithm parameters. See
readParameters.
allConfigurationsThe target algorithm configurations
generated by irace. This object is a data frame, each row is a
candidate configuration, the first column (.ID.) indicates the
internal identifier of the configuration, the following columns
correspond to the parameter values, each column named as the parameter
name specified in the parameter object. The final column
(.PARENT.) is the identifier of the configuration from which
model the actual configuration was sampled.
allElitesA list that contains one element per iteration,
each element contains the internal identifier of the elite candidate
configurations of the corresponding iteration (identifiers correspond to
allConfigurations$.ID.).
iterationElitesA vector containing the best candidate configuration internal identifier of each iteration. The best configuration found corresponds to the last one of this vector.
experimentsA matrix with configurations as columns and
instances as rows. Column names correspond to the internal identifier of
the configuration (allConfigurations$.ID.).
experimentLogA matrix with columns iteration,
instance, configuration, time. This matrix contains the log of all the
experiments that irace performs during its execution. The
instance column refers to the index of the scenario$instancesList
data frame. Time is saved ONLY when reported by the targetRunner.
softRestartA logical vector that indicates if a soft
restart was performed on each iteration. If FALSE, then no soft
restart was performed.
stateA list that contains the state of irace, the recovery is done using the information contained in this object.
testingA list that constains the testing results. The
elements of this list are: experiments a matrix with the testing
expriments of the selected configurations in the same format as the
explained above and seeds a vector with the seeds used to execute
each experiment.
The function irace executes the tuning procedure using
the information provided in scenario and parameters. Initially it checks
the correctness of scenario and recovers a previous execution if
scenario$recoveryFile is set. A R data file log of the execution is created
in scenario$logFile.
irace.maina higher-level command-line interface to irace.
readScenariofor reading a configuration scenario from a file.
readParametersread the target algorithm parameters from a file.
defaultScenarioreturns the default scenario settings of irace.
checkScenarioto check that the scenario is valid.
# NOT RUN {
parameters <- readParameters("parameters.txt")
scenario <- readScenario(filename = "scenario.txt",
scenario = defaultScenario())
irace(scenario = scenario, parameters = parameters)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab