batchtools icon indicating copy to clipboard operation
batchtools copied to clipboard

addExperiments: referring to problems or algos without parameters

Open berndbischl opened this issue 8 years ago • 0 comments

currently one has to write this

reg = makeExperimentRegistry(file.dir = NA, make.default = FALSE)
prob = addProblem(reg = reg, "p1", data = 1)
prob = addProblem(reg = reg, "p2", data = 2)
algo = addAlgorithm(reg = reg, "a", fun = function(...) list(...))

algo.designs = list(a = data.table(par1 = 1, par2 = 2))
addExperiments(reg = reg, prob.designs = list(p1 = data.table()), algo.designs = algo.designs)

BE offered the possibility to shorten the last line to addExperiments(reg = reg, prob.designs = "p1", algo.designs = algo.designs)

and i would suggest that we should allow this again

this is simple and useful convenience for the user. if i pass a charvec (x, y, z) this is internally tranformed to list(x = data.table(), y = data.table(), z = data.table())

berndbischl avatar Jul 07 '16 04:07 berndbischl