race.wrapper: Test a candidate on a task

Description Arguments Value Note Author(s) See Also Examples

Description

The function

1
race.wrapper(candidate,task,data)

is to be provided by the user. It's definition has to be given (together with the one of race.info) in a file, and the name of such file has to be passed as first argument to the function race.

Arguments

candidate

The candidate to be evaluated: a number between 1 and no.candidates, where no.candidates is the number of candidates and is to be defined within the function race.wrapper itself.

task

The task on which to the candidate should be evaluated: a number between 1 and no.tasks, where no.tasks is the number of tasks available for testing, and is to be defined within the function race.wrapper itself.

data

It is the object of type list (possibly empty) returned by race.init, if the latter is defined by the user.

Value

A number: the result obtained by the given candidate at the given task. If no.subtasks>1 (see race.info), the function is expected to return a vector of length equal to no.subtasks where the component k of such vector is the result obtained by the given candidate on the k-th subtask composing the given task.

Note

Please notice that race is a minimization algorithm: it selects the candidate that obtains the smallest results on the various tasks considered.

Author(s)

Mauro Birattari

See Also

race, race.init, race.info

Examples

1
2
3
4
5
6
# Please have a look at the function `race.wrapper'
# defined in the file `example-wrapper.R':
local({
  source(file.path(system.file(package="race"),
                           "examples","example-wrapper.R"),local=TRUE);
  print(race.wrapper)})

race documentation built on May 29, 2017, 12:03 p.m.

Related to race.wrapper in race...