race.wrapper {race} | R Documentation |
This function 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
.
race.wrapper(candidate,task,data)
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. |
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.
Please notice that race
is a minimization algorithm:
it selects the candidate that obtains the smallest results on
the various tasks considered.
Mauro Birattari
# 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)})