| mlr_acqfunctions_cb | R Documentation |
Lower / Upper Confidence Bound.
This AcqFunction can be instantiated via the dictionary
mlr_acqfunctions or with the associated sugar function acqf():
mlr_acqfunctions$get("cb")
acqf("cb")
"lambda" (numeric(1))
\lambda value used for the confidence bound.
Defaults to 2.
bbotk::Objective -> mlr3mbo::AcqFunction -> AcqFunctionCB
new()Creates a new instance of this R6 class.
AcqFunctionCB$new(surrogate = NULL, lambda = 2)
surrogate(NULL | SurrogateLearner).
lambda(numeric(1)).
clone()The objects of this class are cloneable with this method.
AcqFunctionCB$clone(deep = FALSE)
deepWhether to make a deep clone.
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.
Other Acquisition Function:
AcqFunction,
mlr_acqfunctions,
mlr_acqfunctions_aei,
mlr_acqfunctions_ehvi,
mlr_acqfunctions_ehvigh,
mlr_acqfunctions_ei,
mlr_acqfunctions_ei_log,
mlr_acqfunctions_eips,
mlr_acqfunctions_mean,
mlr_acqfunctions_multi,
mlr_acqfunctions_pi,
mlr_acqfunctions_sd,
mlr_acqfunctions_smsego,
mlr_acqfunctions_stochastic_cb,
mlr_acqfunctions_stochastic_ei
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("cb", surrogate = surrogate, lambda = 3)
acq_function$surrogate$update()
acq_function$eval_dt(data.table(x = c(-1, 0, 1)))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.