Skip to contents

Expected Improvement per Second.

It is assumed that calculations are performed on an bbotk::OptimInstanceBatchSingleCrit. Additionally to target values of the codomain that should be minimized or maximized, the bbotk::Objective of the bbotk::OptimInstanceBatchSingleCrit should return time values. The column names of the target variable and time variable must be passed as cols_y in the order (target, time) when constructing the SurrogateLearnerCollection that is being used as a surrogate.

Dictionary

This AcqFunction can be instantiated via the dictionary mlr_acqfunctions or with the associated sugar function acqf():

mlr_acqfunctions$get("eips")
acqf("eips")

References

  • Snoek, Jasper, Larochelle, Hugo, Adams, P R (2012). “Practical Bayesian Optimization of Machine Learning Algorithms.” In Pereira F, Burges CJC, Bottou L, Weinberger KQ (eds.), Advances in Neural Information Processing Systems, volume 25, 2951–2959.

Super classes

bbotk::Objective -> mlr3mbo::AcqFunction -> AcqFunctionEIPS

Public fields

y_best

(numeric(1))
Best objective function value observed so far. In the case of maximization, this already includes the necessary change of sign.

Active bindings

col_y

(character(1)).

col_time

(character(1)).

Methods

Inherited methods


Method new()

Creates a new instance of this R6 class.

Usage

AcqFunctionEIPS$new(surrogate = NULL)

Arguments

surrogate

(NULL | SurrogateLearnerCollection).


Method update()

Update the acquisition function and set y_best.

Usage

AcqFunctionEIPS$update()


Method clone()

The objects of this class are cloneable with this method.

Usage

AcqFunctionEIPS$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

if (requireNamespace("mlr3learners") &
    requireNamespace("DiceKriging") &
    requireNamespace("rgenoud")) {
  library(bbotk)
  library(paradox)
  library(mlr3learners)
  library(data.table)

  fun = function(xs) {
    list(y = xs$x ^ 2, time = abs(xs$x))
  }
  domain = ps(x = p_dbl(lower = -10, upper = 10))
  codomain = ps(y = p_dbl(tags = "minimize"), time = p_dbl(tags = "time"))
  objective = ObjectiveRFun$new(fun = fun, domain = domain, codomain = codomain)

  instance = OptimInstanceBatchSingleCrit$new(
    objective = objective,
    terminator = trm("evals", n_evals = 5))

  instance$eval_batch(data.table(x = c(-6, -5, 3, 9)))

  learner = default_gp()

  surrogate = srlrn(list(learner, learner$clone(deep = TRUE)), archive = instance$archive)
  surrogate$cols_y = c("y", "time")

  acq_function = acqf("eips", surrogate = surrogate)

  acq_function$surrogate$update()
  acq_function$update()
  acq_function$eval_dt(data.table(x = c(-1, 0, 1)))
}
#>    acq_eips
#>       <num>
#> 1: 4.401246
#> 2: 4.864655
#> 3: 5.297142