findExperiments: Find ids of experiments that match a query.

Description Usage Arguments Value Examples

View source: R/findExperiments.R

Description

Find job ids by querying problem/algorithm ids, problem/algorithm parameters or replication number.

Usage

1
2
findExperiments(reg, ids, prob.pattern, prob.pars, algo.pattern, algo.pars,
  repls, match.substring = TRUE, regexp = FALSE)

Arguments

reg

[ExperimentRegistry]
Registry.

ids

[integer]
Ids of selected experiments to restrict to. Default is all experiments.

prob.pattern

[character(1)]
If not missing, all problem ids that match this string are selected.

prob.pars

[R expression]
If not missing, all problems whose parameters match the given expression are selected.

algo.pattern

[character(1)]
If not missing, all algorithm ids that match this string are selected.

algo.pars

[R expression]
If not missing, all algorithms whose parameters match the given expression are selected.

repls

[integer]
If not missing, restrict to jobs with given replication numbers.

match.substring

[logical(1)]
Is a match in prob.pattern and algo.pattern if the id contains the pattern as substring or must the id exactly match? Default is TRUE.

regexp

[logical(1)]
Are prob.pattern and algo.pattern regular expressions? Note that this is significantly slower than substring matching. If set to TRUE the argument match.substring has no effect. Default is FALSE.

Value

[integer]. Ids for experiments which match the query.

Examples

1
2
3
4
5
6
7
8
reg = makeExperimentRegistry(id = "example1", file.dir = tempfile())
p1 = addProblem(reg, "one", 1)
p2 = addProblem(reg, "two", 2)
a = addAlgorithm(reg, "A", fun = function(static, n) static + n)
addExperiments(reg, algo.design = makeDesign(a, exhaustive = list(n = 1:4)))
findExperiments(reg, prob.pattern = "one")
findExperiments(reg, prob.pattern = "o")
findExperiments(reg, algo.pars = (n > 2))

tudo-r/BatchExperiments documentation built on Dec. 1, 2017, 4:02 a.m.