Skip to contents

Probability of Improvement.

Dictionary

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

mlr_acqfunctions$get("pi")
acqf("pi")

References

  • Kushner, J. H (1964). “A New Method of Locating the Maximum Point of an Arbitrary Multipeak Curve in the Presence of Noise.” Journal of Basic Engineering, 86(1), 97–106.

Super classes

bbotk::Objective -> mlr3mbo::AcqFunction -> AcqFunctionPI

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.

Methods

Inherited methods


Method new()

Creates a new instance of this R6 class.

Usage

AcqFunctionPI$new(surrogate = NULL)

Arguments

surrogate

(NULL | SurrogateLearner).


Method update()

Update the acquisition function and set y_best.

Usage

AcqFunctionPI$update()


Method clone()

The objects of this class are cloneable with this method.

Usage

AcqFunctionPI$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)
  }
  domain = ps(x = p_dbl(lower = -10, upper = 10))
  codomain = ps(y = p_dbl(tags = "minimize"))
  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(learner, archive = instance$archive)

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

  acq_function$surrogate$update()
  acq_function$update()
  acq_function$eval_dt(data.table(x = c(-1, 0, 1)))
}
#>       acq_pi
#>        <num>
#> 1: 0.2666813
#> 2: 0.2939562
#> 3: 0.3509427