How to get min and mean from Rdtata file?

43 views
Skip to first unread message

aitabde...@gmail.com

unread,
Oct 1, 2019, 2:07:11 PM10/1/19
to The irace package: Iterated Racing for Automatic Configuration
Hi,

I would like to ask about something, please!

I want to fill a table to sort my results like following : (best value and average value for
each instance)
______________________

|   Best  |    Average   |

------------------------

what are the information that I should get from the .stdout and the instances used by Irace in the tuning that I got
from the Rdata file.

Could you please give me an example where you show me how to fill the
values for one of the instances?
Or maybe you can give me the instructions to use with R to get get them from the Rdata file?

Sincerely,
Imène

Leslie Perez Caceres

unread,
Oct 1, 2019, 2:10:14 PM10/1/19
to The irace package: Iterated Racing for Automatic Configuration
Dear Imène,

Yes, the information of the stdout will not be useful for this, so you need to get this information from the
Rdata file. So, go to the R console and use the following code:

# Load your irace data to the console
load("irace.Rdata")

# Get the mean per instance as follows
apply(iraceResults$experiments, 1, mean, na.rm=TRUE)

# Get the min per instance as follows
apply(iraceResults$experiments, 1, min)

To know the name of the instances:
# Get the instance ids
i.ids = iraceResults$state$.irace$instancesList[1:nrow(iraceResults$experiments),"instance"]
# Get the seeds
i.seeds = iraceResults$state$.irace$instancesList[1:nrow(iraceResults$experiments),"seed"]
# Get the instance names (/paths)
iraceResults$scenario$instances[i.ids]

Now, if you would like to get the configuration that obtained the minimum value per each instance:
# Get the ID of each candidate that obtained the minimum per instance:
ids = apply(iraceResults$experiments, 1, which.min)
# Get the candidate for instance 1:
best = iraceResults$allConfigurations[ids[1], ]
# Get it on execution format
irace:::buildCommandLine(values=irace:::removeConfigurationsMetaData(best), switches=iraceResults$parameters$switches)


Let us know if you have any other question!

Bests,
Leslie.
Reply all
Reply to author
Forward
0 new messages