Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

read_pcs_file

read_pcs_file


Description

Read parameters in PCS (AClib) format and write them in irace format.

Usage

read_pcs_file(file, digits = 4, debugLevel = 0, text)

Arguments

file

(character(1))
Filename containing the definitions of the parameters to be tuned.

digits

The number of decimal places to be considered for the real parameters.

debugLevel

(integer(1))
Larger values produce more verbose output.

text

(character(1))
If file is not supplied and this is, then parameters are read from the value of text via a text connection.

Details

Either file or text must be given. If file is given, the parameters are read from the file file. If text is given instead, the parameters are read directly from the text character string. In both cases, the parameters must be given (in text or in the file whose name is file) in the expected form. See the documentation for details. If none of these parameters is given, irace will stop with an error.

Value

A string representing the parameters in irace format.

Author(s)

Manuel López-Ibáñez

Examples

## Read the parameters directly from text
 pcs.table <- '
 # name       values               [conditions (using R syntax)]
 algorithm    {as,mmas,eas,ras,acs}[as]
 localsearch  {0, 1, 2, 3}[0]
 alpha        [0.00, 5.00][1]
 beta         [0.00, 10.00][1]
 rho          [0.01, 1.00][0.95]
 ants         [5, 100][10]i
 q0           [0.0, 1.0][0]
 rasrank      [1, 100][1]i
 elitistants  [1, 750][1]i
 nnls         [5, 50][5]i
 dlb          {0, 1}[1] 
 Conditionals:
 q0 | algorithm in {acs}
 rasrank | algorithm in {ras}
 elitistants | algorithm in {eas}
 nnls | localsearch in {1,2,3}
 dlb | localsearch in {1,2,3}
 '
 parameters.table <- read_pcs_file(text=pcs.table)
 parameters <- readParameters(text=parameters.table)
 str(parameters)

irace

Iterated Racing for Automatic Algorithm Configuration

v3.4.1
GPL (>= 2)
Authors
Manuel López-Ibáñez [aut, cre] (<https://orcid.org/0000-0001-9974-1295>), Jérémie Dubois-Lacoste [aut], Leslie Pérez Cáceres [aut], Thomas Stützle [aut], Mauro Birattari [aut], Eric Yuan [ctb], Prasanna Balaprakash [ctb], Nguyen Dang [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.