psRace
performs a postselection race of a set of configurations.
Arguments
- iraceResults
list()
|character(1)
Object created by irace and typically saved in the log fileirace.Rdata
. If a character string is given, then it is interpreted as the path to the log file from which theiraceResults
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 byiraceResults$scenario$maxExperiments
oriraceResults$scenario$maxTime / iraceResults$state$boundEstimate
.- conf_ids
IDs of the configurations in iraceResults$allConfigurations to be used for ablation. If NULL, the
iteration_best
argument will be to decide.- iteration_elites
If TRUE, only select the best configuration of each iteration. If FALSE, select from all elite configurations of all iterations.
max_experiments
Value
If iraceLogFile is NULL, it returns a list with the following elements:
- configurations
Configurations used in the race.
- instances
A matrix with the instances used in the experiments. First column has the instances ids from iraceResults$scenario$instances, second column the seed assigned to the instance.
- maxExperiments
Maximum number of experiments set for the race.
- experiments
A matrix with the results of the experiments (columns are configurations, rows are instances).
- elites
Best configurations found in the experiments.
If iraceLogFile
is provided this list object will be saved in iraceResults$psrace_log
.
Examples
# \donttest{
logfile <- system.file(package="irace", "exdata", "sann.rda")
# Execute the postselection after the execution of irace. Use 10% of the total budget.
psRace(logfile, max_experiments=0.1)
#> # 2024-11-21 13:44:56 UTC: Starting post-selection:
#> # scenario maxExperiments:1000
#> # 2024-11-21 13:44:57 UTC: Configurations selected: 83, 85, 103, 31, 40, 46, 59, 61, 62, 64, 72, 97, 98, 99, 100, 101, 102, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134.
#> # 2024-11-21 13:44:57 UTC: Pending instances: 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2.
#> # Seed: 1479281000
#> # Configurations: 48
#> # Available experiments: 100
#> # minSurvival: 1
#> # Markers:
#> x No test is performed.
#> c Configurations are discarded only due to capping.
#> - The test is performed and some configurations are discarded.
#> = The test is performed but no configuration is discarded.
#> ! The test is performed and configurations could be discarded but elite configurations are preserved.
#> . All alive configurations are elite and nothing is discarded.
#>
#> +-+-----------+-----------+-----------+----------------+-----------+--------+-----+----+------+
#> | | Instance| Alive| Best| Mean best| Exp so far| W time| rho|KenW| Qvar|
#> +-+-----------+-----------+-----------+----------------+-----------+--------+-----+----+------+
#> |.| 8| 48| 131| 0.006898463880| 0|00:00:00| NA| NA| NA|
#> |x| 11| 48| 109| 0.07309310820| 45|00:00:01|-0.22|0.39|1.0866|
#> |.| 7| 48| 109| 0.1155582505| 45|00:00:00|+0.01|0.34|0.9474|
#> |.| 3| 48| 109| 0.09813457860| 45|00:00:00|+0.06|0.29|0.9213|
#> |.| 2| 48| 109| 2.290391222| 45|00:00:00|-0.03|0.17|0.9966|
#> |.| 4| 48| 109| 1.929141110| 45|00:00:00|-0.04|0.13|1.0164|
#> |=| 10| 48| 85| 0.09524784895| 52|00:00:00|-0.03|0.12|1.0149|
#> |.| 9| 48| 85| 0.1169488759| 52|00:00:00|-0.04|0.09|1.0131|
#> |.| 6| 48| 85| 0.1193722978| 52|00:00:00|-0.02|0.10|0.9824|
#> |.| 1| 48| 85| 0.1238406956| 52|00:00:00|-0.01|0.09|0.9731|
#> |.| 5| 48| 85| 0.3995484935| 52|00:00:00|-0.01|0.08|0.9718|
#> |=| 12| 48| 103| 0.4084286122| 100|00:00:01|+0.01|0.09|0.9562|
#> +-+-----------+-----------+-----------+----------------+-----------+--------+-----+----+------+
#> Best-so-far configuration: 103 mean value: 0.4084286122
#> Description of the best-so-far configuration:
#> .ID. tmax temp .PARENT.
#> 103 103 517 48.0103 85
#>
#> # 2024-11-21 13:44:59 UTC: Elite configurations (first number is the configuration ID; listed from best to worst according to the sum of ranks):
#> tmax temp
#> 103 517 48.0103
#> 85 644 48.5462
#> 105 679 48.8441
#> # Total CPU user time: 41.518, CPU sys time: 0.061, Wall-clock time: 41.658
#> .ID. tmax temp .PARENT. .RANK. .WEIGHT.
#> 103 103 517 48.0103 85 186 0.5000000
#> 85 85 644 48.5462 46 202 0.3333333
#> 105 105 679 48.8441 85 205 0.1666667
# }