Skip to content

Opportunity to reduce redundant evaluation #442

@zkurtz

Description

@zkurtz

In a simple example of a mixed space optimization with mostly-default parameters and a deterministic objective, mbo repeatedly evaluates the same point:

library(mlrMBO)
library(data.table)

fun = function(x) {
  if(x$method == "a") return(x$number)
  return(1)
}

space = makeParamSet(
  makeDiscreteParam("method", values = c("a", "b")),
  makeNumericParam("number", lower = 0,upper = 2 * pi, requires = quote(method == "a"))
)

obj = makeSingleObjectiveFunction(
  name = "mixed_example",
  fn = fun,
  par.set = space,
  has.simple.signature = FALSE,
  noisy = FALSE,
  minimize = TRUE
)

run = mbo(obj, control = makeMBOControl(), show.info = FALSE)

## ... many warnings of the form:
#           Warning in generateDesign(control$infill.opt.focussearch.points, ps.local,  :
#             generateDesign could only produce 1 points instead of 1000!

DT = as.data.table(run$opt.path)
head(DT[is.na(number), c("method", "number", "y")])

The result shows that one point got evaluated repeatedly, even though I set noisy = FALSE in the objective. Such repeated evaluation is costly in other settings -- is there any reason to allow it?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions