From b1680e05751fb76aec2d1293ea9ec991d4a5e656 Mon Sep 17 00:00:00 2001 From: sumny Date: Tue, 13 Aug 2024 09:26:07 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20mlr-org/?= =?UTF-8?q?mlr3mbo@b45f8684bec9e03450237ff2b671c9d90ea17c0a=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dev/articles/mlr3mbo.html | 22 ++++++++++---------- dev/pkgdown.yml | 2 +- dev/reference/mlr_loop_functions_parego.html | 4 ++-- dev/reference/mlr_optimizers_mbo.html | 4 ++-- dev/search.json | 2 +- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/dev/articles/mlr3mbo.html b/dev/articles/mlr3mbo.html index 1b72087f..aa47d229 100644 --- a/dev/articles/mlr3mbo.html +++ b/dev/articles/mlr3mbo.html @@ -672,7 +672,7 @@

Safety Nets= acq_optimizer) optimizer$optimize(instance) -#> WARN [16:37:06.079] [bbotk] missing value where TRUE/FALSE needed +#> WARN [09:25:57.818] [bbotk] missing value where TRUE/FALSE needed #> x x_domain y #> <num> <list> <num> #> 1: -0.01951836 <list[1]> 0.0003809664 @@ -686,16 +686,16 @@

Safety Netsinstance$archive$data #> x y x_domain timestamp batch_nr acq_ei #> <num> <num> <list> <POSc> <int> <num> -#> 1: 1.00000000 1.0000000000 <list[1]> 2024-08-12 16:37:05 1 NA -#> 2: 1.00000000 1.0000000000 <list[1]> 2024-08-12 16:37:05 1 NA -#> 3: 1.00000000 1.0000000000 <list[1]> 2024-08-12 16:37:05 1 NA -#> 4: 1.00000000 1.0000000000 <list[1]> 2024-08-12 16:37:05 1 NA -#> 5: 0.67422986 0.4545859064 <list[1]> 2024-08-12 16:37:06 2 NA -#> 6: 0.66865060 0.4470936288 <list[1]> 2024-08-12 16:37:06 3 0.043581438 -#> 7: 0.38834314 0.1508103944 <list[1]> 2024-08-12 16:37:06 4 0.126450234 -#> 8: -0.53253872 0.2835974922 <list[1]> 2024-08-12 16:37:06 5 0.223167948 -#> 9: 0.04818857 0.0023221379 <list[1]> 2024-08-12 16:37:06 6 0.125654545 -#> 10: -0.01951836 0.0003809664 <list[1]> 2024-08-12 16:37:07 7 0.002040261 +#> 1: 1.00000000 1.0000000000 <list[1]> 2024-08-13 09:25:57 1 NA +#> 2: 1.00000000 1.0000000000 <list[1]> 2024-08-13 09:25:57 1 NA +#> 3: 1.00000000 1.0000000000 <list[1]> 2024-08-13 09:25:57 1 NA +#> 4: 1.00000000 1.0000000000 <list[1]> 2024-08-13 09:25:57 1 NA +#> 5: 0.67422986 0.4545859064 <list[1]> 2024-08-13 09:25:57 2 NA +#> 6: 0.66865060 0.4470936288 <list[1]> 2024-08-13 09:25:58 3 0.043581438 +#> 7: 0.38834314 0.1508103944 <list[1]> 2024-08-13 09:25:58 4 0.126450234 +#> 8: -0.53253872 0.2835974922 <list[1]> 2024-08-13 09:25:58 5 0.223167948 +#> 9: 0.04818857 0.0023221379 <list[1]> 2024-08-13 09:25:58 6 0.125654545 +#> 10: -0.01951836 0.0003809664 <list[1]> 2024-08-13 09:25:58 7 0.002040261 #> .already_evaluated #> <lgcl> #> 1: NA diff --git a/dev/pkgdown.yml b/dev/pkgdown.yml index 504d0160..8d60e984 100644 --- a/dev/pkgdown.yml +++ b/dev/pkgdown.yml @@ -3,7 +3,7 @@ pkgdown: 2.1.0 pkgdown_sha: ~ articles: mlr3mbo: mlr3mbo.html -last_built: 2024-08-12T16:36Z +last_built: 2024-08-13T09:25Z urls: reference: https://mlr3mbo.mlr-org.com/reference article: https://mlr3mbo.mlr-org.com/articles diff --git a/dev/reference/mlr_loop_functions_parego.html b/dev/reference/mlr_loop_functions_parego.html index ad29aeb5..98aeda50 100644 --- a/dev/reference/mlr_loop_functions_parego.html +++ b/dev/reference/mlr_loop_functions_parego.html @@ -204,8 +204,8 @@

Examples optimizer$optimize(instance) } -#> WARN [16:36:54.027] [bbotk] Task 'surrogate_task' has missing values in column(s) 'y_scal', but learner 'regr.km' does not support this -#> WARN [16:36:54.055] [bbotk] Could not update the surrogate a final time after the optimization process has terminated. +#> WARN [09:25:46.319] [bbotk] Task 'surrogate_task' has missing values in column(s) 'y_scal', but learner 'regr.km' does not support this +#> WARN [09:25:46.344] [bbotk] Could not update the surrogate a final time after the optimization process has terminated. #> x x_domain y1 y2 #> <num> <list> <num> <num> #> 1: 1.134356 <list[1]> 1.286764 0.7493391 diff --git a/dev/reference/mlr_optimizers_mbo.html b/dev/reference/mlr_optimizers_mbo.html index c03b59f8..1d2a0d97 100644 --- a/dev/reference/mlr_optimizers_mbo.html +++ b/dev/reference/mlr_optimizers_mbo.html @@ -330,8 +330,8 @@

Examples optimizer$optimize(instance) } -#> WARN [16:36:55.948] [bbotk] Task 'surrogate_task' has missing values in column(s) 'y_scal', but learner 'regr.km' does not support this -#> WARN [16:36:55.949] [bbotk] Could not update the surrogate a final time after the optimization process has terminated. +#> WARN [09:25:48.142] [bbotk] Task 'surrogate_task' has missing values in column(s) 'y_scal', but learner 'regr.km' does not support this +#> WARN [09:25:48.143] [bbotk] Could not update the surrogate a final time after the optimization process has terminated. #> x x_domain y1 y2 #> <num> <list> <num> <num> #> 1: 1.816490 <list[1]> 3.299635 0.03367603 diff --git a/dev/search.json b/dev/search.json index 7f53586d..d2ac40e0 100644 --- a/dev/search.json +++ b/dev/search.json @@ -1 +1 @@ -[{"path":"https://mlr3mbo.mlr-org.com/dev/articles/mlr3mbo.html","id":"intro","dir":"Articles","previous_headings":"","what":"Intro","title":"mlr3mbo","text":"mlr3mbo makes Bayesian Optimization (BO) available within mlr3 ecosystem. BO can used optimizing black box function, suitable hyperparameter optimization machine learning models. mlr3mbo allows building custom BO algorithms relying building blocks modular fashion, also provides variety standard single- multi-objective BO algorithms can used straightforward manner. assume reader somewhat familiar black box optimization bbotk, hyperparameter optimization mlr3tuning knows basics BO. Background material , example, given Garnett (2022), Bischl, Binder, et al. (2023), Bischl, Sonabend, et al. (2023).","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/articles/mlr3mbo.html","id":"building-blocks","dir":"Articles","previous_headings":"","what":"Building Blocks","title":"mlr3mbo","text":"BO iterative optimization algorithm makes use -called surrogate model unknown black box function. observed initial design observations, surrogate model trained data points observed far acquisition function used determine points search space promising candidates evaluated next. acquisition function relies prediction surrogate model requires evaluation true black box function therefore comparably cheap optimize. evaluated next candidate, process repeats given termination criteria met. BO flavors therefore follow simple loop: Fit surrogate observations made far. Optimize acquisition function find next candidate evaluated. Evaluate next candidate. following, basic building blocks BO implementation mlr3mbo introduced detail.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/articles/mlr3mbo.html","id":"loop-function","dir":"Articles","previous_headings":"Building Blocks","what":"Loop Function","title":"mlr3mbo","text":"loop_function determines behavior BO algorithm global level, .e., subroutine look like performed iteration. get overview readily available loop_functions, following dictionary can inspected: dictionary shows key, .e., ID loop_function, brief description, optimization instance resulting BO flavor can used, well documentation can accessed. Technically, loop_functions members S3 class loop_function, simply decorated functions (using R6Class class top - may change future). write loop_function, users can get inspiration readily available ones, e.g., bayesopt_ego performs sequential single-objective optimization: made assertions safety checks, evaluated initial design, bayesopt_ego essentially performs following steps: acq_function$surrogate$update() # update surrogate model acq_function$update() # update acquisition function (e.g., update best value observed far) acq_optimizer$optimize() # optimize acquisition function yield new candidate","code":"library(mlr3mbo) library(data.table) as.data.table(mlr_loop_functions) #> Key: #> key label instance #> #> 1: bayesopt_ego Efficient Global Optimization single-crit #> 2: bayesopt_emo Multi-Objective EGO multi-crit #> 3: bayesopt_mpcl Multipoint Constant Liar single-crit #> 4: bayesopt_parego ParEGO multi-crit #> 5: bayesopt_smsego SMS-EGO multi-crit #> man #> #> 1: mlr3mbo::mlr_loop_functions_ego #> 2: mlr3mbo::mlr_loop_functions_emo #> 3: mlr3mbo::mlr_loop_functions_mpcl #> 4: mlr3mbo::mlr_loop_functions_parego #> 5: mlr3mbo::mlr_loop_functions_smsego"},{"path":"https://mlr3mbo.mlr-org.com/dev/articles/mlr3mbo.html","id":"surrogate","dir":"Articles","previous_headings":"Building Blocks","what":"Surrogate","title":"mlr3mbo","text":"surrogate encapsulates regression learner models unknown black box function based observed data. mlr3mbo, SurrogateLearner SurrogateLearnerCollection higher-level R6 classes used construct surrogate, inheriting base Surrogate class. learner, LearnerRegr mlr3 can used, however, acquisition functions require mean variance prediction (therefore learners suitable scenarios). Typical choices include: Gaussian Process low dimensional numeric search spaces Random Forest higher dimensional mixed (/ hierarchical) search spaces SurrogateLearner can constructed via: using syntactic sugar: Note default_gp default_rf allow construction Gaussian Process random forest sensible hyperparamter values already specified. encapsulated learner can accessed via $learner field: surrogate following hyperparameters: assert_insample_perf = TRUE results insample performance learner calculated asserted performance threshold $update(). requires specification perf_measure (regression measure, e.g., R squared) perf_threshold. threshold met, error thrown (caught within optimization loop - unless catch_errors = FALSE results , e.g., proposing next candidate uniformly random). details error handling, see Safety Nets section. Note insample performance assertion always meaningful, e.g., case using Gaussian Process nugget, insample performance always perfect. Internally, learner fitted regression task constructed Archive OptimInstance optimized features target variable determined automatically can also specified via $cols_x $cols_y active bindings. Ideally, archive already passed construction, however, lazy initialization also possible (.e., $archive field automatically populated within optimization routine OptimizerMbo). Important methods $update() $predict() former one typically used within loop_function latter one used within implementation acquisition function. Depending choice loop_function, multiple targets must modelled (currently independent) surrogates, case SurrogateLearnerCollection used. Construction hyperparameters analogous single target scenario described . get overview available regression learners within mlr3 ecosystem, use: use custom learner included mlr3, mlr3learners, mlr3extralearners, can inherit LearnerRegr use custom learner within surrogate.","code":"library(mlr3learners) #> Loading required package: mlr3 surrogate = SurrogateLearner$new(lrn(\"regr.km\")) surrogate = srlrn(lrn(\"regr.km\")) surrogate$learner #> : Kriging #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, DiceKriging #> * Predict Types: response, [se] #> * Feature Types: logical, integer, numeric #> * Properties: - surrogate$param_set #> #> Key: #> id class lower upper nlevels default #> #> 1: assert_insample_perf ParamLgl NA NA 2 #> 2: catch_errors ParamLgl NA NA 2 #> 3: perf_measure ParamUty NA NA Inf #> 4: perf_threshold ParamDbl -Inf Inf Inf #> parents value #> #> 1: FALSE #> 2: TRUE #> 3: assert_insample_perf #> 4: assert_insample_perf library(mlr3) library(mlr3learners) # there are plenty of more in mlr3extralearners # library(mlr3extralearners) learners = as.data.table(mlr_learners) learners[task_type == \"regr\"]"},{"path":"https://mlr3mbo.mlr-org.com/dev/articles/mlr3mbo.html","id":"acquisition-function","dir":"Articles","previous_headings":"Building Blocks","what":"Acquisition Function","title":"mlr3mbo","text":"Based surrogate, acquisition function quantifies attractiveness point search space evaluated next iteration. popular example given Expected Improvement (Jones, Schonlau, Welch 1998): \\[ \\mathbb{E} \\left[ \\max \\left( f_{\\mathrm{min}} - Y(\\mathbf{x}), 0 \\right) \\right] \\] , \\(Y(\\mathbf{x})\\) surrogate prediction (random variable) given point \\(\\mathbf{x}\\) (using Gaussian Process follows normal distribution) \\(f_{\\mathrm{min}}\\) currently best function value observed far (assuming minimization). get overview available acquisition functions, following dictionary can inspected: dictionary shows key, .e., ID acquisition function, brief description, documentation can accessed. Technically, acquisition functions inherit R6 class AcqFunction simply inherits base Objective class. Construction straightforward via: using syntactic sugar: Internally, domain codomain constructed based Archive referenced Surrogate therefore surrogate passed argument already construction. However, lazy initialization also possible. case acquisition function parameterized, hyperparameters passed constants, e.g.: use custom acquisition function implement new R6 class inheriting AcqFunction.","code":"as.data.table(mlr_acqfunctions) #> Key: #> key label #> #> 1: aei Augmented Expected Improvement #> 2: cb Lower / Upper Confidence Bound #> 3: ehvi Expected Hypervolume Improvement #> 4: ehvigh Expected Hypervolume Improvement via GH Quadrature #> 5: ei Expected Improvement #> 6: eips Expected Improvement Per Second #> 7: mean Posterior Mean #> 8: pi Probability Of Improvement #> 9: sd Posterior Standard Deviation #> 10: smsego SMS-EGO #> man #> #> 1: mlr3mbo::mlr_acqfunctions_aei #> 2: mlr3mbo::mlr_acqfunctions_cb #> 3: mlr3mbo::mlr_acqfunctions_ehvi #> 4: mlr3mbo::mlr_acqfunctions_ehvigh #> 5: mlr3mbo::mlr_acqfunctions_ei #> 6: mlr3mbo::mlr_acqfunctions_eips #> 7: mlr3mbo::mlr_acqfunctions_mean #> 8: mlr3mbo::mlr_acqfunctions_pi #> 9: mlr3mbo::mlr_acqfunctions_sd #> 10: mlr3mbo::mlr_acqfunctions_smsego acq_function = AcqFunctionEI$new() acq_function = acqf(\"ei\") acqf(\"cb\") # lower / upper confidence bound with lambda hyperparameter #> #> Domain: #> #> Empty. #> Codomain: #> #> Empty. #> Constants: #> #> id class lower upper nlevels default value #> #> 1: lambda ParamDbl 0 Inf Inf 2 2"},{"path":"https://mlr3mbo.mlr-org.com/dev/articles/mlr3mbo.html","id":"acquisition-function-optimizer","dir":"Articles","previous_headings":"Building Blocks","what":"Acquisition Function Optimizer","title":"mlr3mbo","text":"find promising candidate evaluation, acquisition function must optimized. Internally, OptimInstance constructed using acquisition function Objective. acquisition function optimizer used solve optimization problem. Technically, optimizer member AcqOptimizer R6 class. Construction requires specifying Optimizer well Terminator: Syntactic sugar: optimizer terminator can accessed via $optimizer $terminator fields: Internally, acquisition function optimizer also requires acquisition function therefore acq_function argument specified construction. However, lazy initialization also possible. AcqOptimizer following hyperparameters: catch_errors = TRUE results catching errors can happen acquisition function optimization allows , e.g., proposing next candidate uniformly random within loop_function. details mechanism, see Safety Nets section. logging_level specifies logging level acquisition function optimization. Often useful log progress BO loop therefore logging_level set \"warn\" default. debugging purposes, set \"info\". skip_already_evaluated = TRUE result proposing candidates evaluation already evaluated previous iterations. warmstart = TRUE results best warmstart_size points present archive OptimInstance also evaluated acquisition function OptimInstance prior running actual acquisition function optimization. especially useful context using evolutionary algorithms variants local search acquisition function optimizer (current best points usually part initial population optimize local optima). get overview Optimizers implemented bbotk can use: similarly Terminators: , can also use custom Optimizers Terminators implementing new R6 classes inheriting Optimizer Terminator respectively.","code":"library(bbotk) #> Loading required package: paradox acq_optimizer = AcqOptimizer$new(opt(\"random_search\"), terminator = trm(\"evals\")) acq_optimizer = acqo(opt(\"random_search\"), terminator = trm(\"evals\")) acq_optimizer$optimizer #> : Random Search #> * Parameters: batch_size=1 #> * Parameter classes: ParamLgl, ParamInt, ParamDbl, ParamFct #> * Properties: dependencies, single-crit, multi-crit #> * Packages: bbotk acq_optimizer$terminator #> : Number of Evaluation #> * Parameters: n_evals=100, k=0 acq_optimizer$param_set #> #> Key: #> id class lower upper nlevels default parents #> #> 1: catch_errors ParamLgl NA NA 2 TRUE #> 2: logging_level ParamFct NA NA 6 warn #> 3: n_candidates ParamInt 1 Inf Inf 1 #> 4: skip_already_evaluated ParamLgl NA NA 2 TRUE #> 5: warmstart ParamLgl NA NA 2 FALSE #> 6: warmstart_size ParamInt 1 Inf Inf warmstart #> value #> #> 1: TRUE #> 2: warn #> 3: 1 #> 4: TRUE #> 5: FALSE #> 6: as.data.table(mlr_optimizers) as.data.table(mlr_terminators)"},{"path":"https://mlr3mbo.mlr-org.com/dev/articles/mlr3mbo.html","id":"putting-it-together","dir":"Articles","previous_headings":"","what":"Putting it Together","title":"mlr3mbo","text":"introduced building blocks now ready put everything together form OptimizerMbo TunerMbo. OptimizerMbo inherits Optimizer requires loop_function, surrogate, acq_function acq_optimizer. Construction performed via: using syntactic sugar: Additional arguments, .e., arguments loop_function can passed via args argument construction $args active binding. Finally, mechanism final result obtained optimization process (.e., best point case single-objective Pareto set case multi-objective optimization) can changed via result_assigner argument construction $result_assigner active binding. example, ResultAssignerSurrogate choose final solution based prediction surrogate instead evaluations logged archive sensible case noisy objective functions. default, however, use ResultAssignerArchive directly choose final solution based evaluations logged archive. get overview available result assigners, following dictionary can inspected: dictionary shows key, .e., ID result assigner, brief description, documentation can accessed. Construction result assigners straightforward: Syntactic sugar: Note important fields OptimizerMbo $param_classes, $packages, $properties automatically determined based choice loop_function, surrogate, acq_function, acq_optimizer, result_assigner. arguments surrogate, acq_function, acq_optimizer result_assigner fully initialized construction, e.g., surrogate missing archive, acq_function missing surrogate, lazy initialization completed prior optimizer used optimization. object class OptimizerMbo can used optimize object class OptimInstanceBatchSingleCrit OptimInstanceBatchMultiCrit. hyperparameter optimization, TunerMbo used (simply relies OptimizerMbo constructed internally):","code":"optimizer = OptimizerMbo$new(bayesopt_ego, surrogate = surrogate, acq_function = acq_function, acq_optimizer = acq_optimizer) optimizer = opt(\"mbo\", loop_function = bayesopt_ego, surrogate = surrogate, acq_function = acq_function, acq_optimizer = acq_optimizer) optimizer #> : Model Based Optimization #> * Parameter classes: ParamLgl, ParamInt, ParamDbl #> * Properties: single-crit #> * Packages: mlr3mbo, mlr3, mlr3learners, DiceKriging, bbotk #> * Loop function: bayesopt_ego #> * Surrogate: LearnerRegrKM #> * Acquisition Function: AcqFunctionEI #> * Acquisition Function Optimizer: (OptimizerBatchRandomSearch | #> TerminatorEvals) as.data.table(mlr_result_assigners) #> Key: #> key label man #> #> 1: archive Archive mlr3mbo::mlr_result_assigners_archive #> 2: surrogate Mean Surrogate Prediction mlr3mbo::mlr_result_assigners_surrogate result_assigner = ResultAssignerArchive$new() result_assigner = ras(\"archive\") tuner = TunerMbo$new(bayesopt_ego, surrogate = surrogate, acq_function = acq_function, acq_optimizer = acq_optimizer) mlr3misc::get_private(tuner)[[\".optimizer\"]] #> : Model Based Optimization #> * Parameter classes: ParamLgl, ParamInt, ParamDbl #> * Properties: single-crit #> * Packages: mlr3mbo, mlr3, mlr3learners, DiceKriging, bbotk #> * Loop function: bayesopt_ego #> * Surrogate: LearnerRegrKM #> * Acquisition Function: AcqFunctionEI #> * Acquisition Function Optimizer: (OptimizerBatchRandomSearch | #> TerminatorEvals)"},{"path":"https://mlr3mbo.mlr-org.com/dev/articles/mlr3mbo.html","id":"the-initial-design","dir":"Articles","previous_headings":"Putting it Together","what":"The Initial Design","title":"mlr3mbo","text":"mlr3mbo offers two different ways specifying initial design: One can simply evaluate points OptimInstance optimized prior using OptimizerMbo. case, loop_function skip construction evaluation initial design. points already evaluated OptimInstance, loop_function construct initial design evaluate , e.g., bayesopt_ego constructs initial design size \\(4D\\) \\(D\\) dimensionality search space sampling points uniformly random. Functions creating different initial designs part paradox package, e.g.: generate_design_random: uniformly random generate_design_grid: uniform sized grid generate_design_lhs: Latin hypercube sampling generate_design_sobol: Sobol sequence","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/articles/mlr3mbo.html","id":"defaults","dir":"Articles","previous_headings":"","what":"Defaults","title":"mlr3mbo","text":"mlr3mbo tries use intelligent defaults loop_function, surrogate, acq_function, acq_optimizer within OptimizerMbo TunerMbo. details, see mbo_defaults.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/articles/mlr3mbo.html","id":"safety-nets","dir":"Articles","previous_headings":"","what":"Safety Nets","title":"mlr3mbo","text":"mlr3mbo quite stable sense - desired - kinds errors can caught handled appropriately within loop_function. example, let’s look inner workings bayesopt_ego: iteration, new candidate chosen based updating surrogate acquisition function, optimizing acquisition function. error happens steps, errors upgraded errors class \"mbo_error\" (\"surrogate_update_error\" surrogate related errors well \"acq_optimizer_error\" acquisition function optimization related errors). errors caught fallback triggered: Evaluating next candidate chosen uniformly random. Note mechanism actually also used handle random interleaving. illustrate error handling mechanism, consider following scenario: try minimize \\(f: [-1, 1] \\rightarrow \\mathbb{R}, x \\mapsto x^2\\), however, Gaussian Process fails due data points close : log tells us error happened caught: \"surrogate_update_error / mbo_error / error / condition\". also see archive first candidate initial design (fifth point) proposed based optimizing acquisition function (\"acq_ei\" column NA ): Nevertheless, due safety net, BO loop eventually worked just fine simply throw error. set catch_errors = FALSE within surrogate, see error indeed caused surrogate: case error belonging acq_optimizer_error class, helpful increase logging level acquisition function optimizer (e.g., acq_optimizer$param_set$values$logging_level = \"info\") also set acq_optimizer$param_set$values$catch_errors = FALSE. allows straightforward debugging. make sure BO loop behaved expected, always inspect log optimization process inspect archive check whether acquisition function column populated expected.","code":"repeat { xdt = tryCatch({ . . . acq_function$surrogate$update() acq_function$update() acq_optimizer$optimize() }, mbo_error = function(mbo_error_condition) { lg$info(paste0(class(mbo_error_condition), collapse = \" / \")) lg$info(\"Proposing a randomly sampled point\") SamplerUnif$new(domain)$sample(1L)$data }) . . . } set.seed(2906) domain = ps(x = p_dbl(lower = -1, upper = 1)) codomain = ps(y = p_dbl(tags = \"minimize\")) objective_function = function(xs) { list(y = xs$x ^ 2) } objective = ObjectiveRFun$new( fun = objective_function, domain = domain, codomain = codomain) instance = OptimInstanceBatchSingleCrit$new( objective = objective, terminator = trm(\"evals\", n_evals = 10)) initial_design = data.table(x = rep(1, 4)) instance$eval_batch(initial_design) surrogate = srlrn(default_gp()) acq_function = acqf(\"ei\") acq_optimizer = acqo(opt(\"random_search\", batch_size = 1000), terminator = trm(\"evals\", n_evals = 1000)) optimizer = opt(\"mbo\", loop_function = bayesopt_ego, surrogate = surrogate, acq_function = acq_function, acq_optimizer = acq_optimizer) optimizer$optimize(instance) #> WARN [16:37:06.079] [bbotk] missing value where TRUE/FALSE needed #> x x_domain y #> #> 1: -0.01951836 0.0003809664 instance$archive$data #> x y x_domain timestamp batch_nr acq_ei #> #> 1: 1.00000000 1.0000000000 2024-08-12 16:37:05 1 NA #> 2: 1.00000000 1.0000000000 2024-08-12 16:37:05 1 NA #> 3: 1.00000000 1.0000000000 2024-08-12 16:37:05 1 NA #> 4: 1.00000000 1.0000000000 2024-08-12 16:37:05 1 NA #> 5: 0.67422986 0.4545859064 2024-08-12 16:37:06 2 NA #> 6: 0.66865060 0.4470936288 2024-08-12 16:37:06 3 0.043581438 #> 7: 0.38834314 0.1508103944 2024-08-12 16:37:06 4 0.126450234 #> 8: -0.53253872 0.2835974922 2024-08-12 16:37:06 5 0.223167948 #> 9: 0.04818857 0.0023221379 2024-08-12 16:37:06 6 0.125654545 #> 10: -0.01951836 0.0003809664 2024-08-12 16:37:07 7 0.002040261 #> .already_evaluated #> #> 1: NA #> 2: NA #> 3: NA #> 4: NA #> 5: NA #> 6: FALSE #> 7: FALSE #> 8: FALSE #> 9: FALSE #> 10: FALSE instance$archive$clear() instance$eval_batch(initial_design) optimizer$surrogate$param_set$values$catch_errors = FALSE optimizer$optimize(instance) #> Error in if (varinit.vario <= 1e-20) varinit.vario <- 1/2 * varinit.vario.total: missing value where TRUE/FALSE needed"},{"path":"https://mlr3mbo.mlr-org.com/dev/articles/mlr3mbo.html","id":"writing-your-own-loop-function","dir":"Articles","previous_headings":"","what":"Writing Your Own Loop Function","title":"mlr3mbo","text":"Writing custom loop_function straightforward. loop_function must object S3 class loop_function (simply standard R function requirements regarding arguments attributes). Arguments function must include instance, surrogate, acq_function, acq_optimizer attributes must include id (id loop function), label (brief description), instance (“single-crit” “multi_crit”), man (link manual page). Technically, loop_function therefore looks like following: inspiration write actual meaningful loop_functions, see, e.g., bayesopt_ego.","code":"bayesopt_custom = function(instance, surrogate, acq_function, acq_optimizer) { # typically some assertions # initial design handling # actual loop function } class(bayesopt_custom) = \"loop_function\" attr(bayesopt_custom, \"id\") = \"bayesopt_custom\" attr(bayesopt_custom, \"label\") = \"My custom BO loop\" attr(bayesopt_custom, \"instance\") = \"single-crit\" attr(bayesopt_custom, \"man\") = \"\" # no man page # if you want to add it to the dictionary: mlr_loop_functions$add(\"bayesopt_custom\", bayesopt_custom) bayesopt_custom #> Loop function: bayesopt_custom #> * Description: My custom BO loop #> * Supported Instance: single-crit"},{"path":"https://mlr3mbo.mlr-org.com/dev/articles/mlr3mbo.html","id":"examples","dir":"Articles","previous_headings":"","what":"Examples","title":"mlr3mbo","text":"final section, standard examples provided.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/articles/mlr3mbo.html","id":"single-objective-2d-schwefel-function","dir":"Articles","previous_headings":"Examples","what":"Single-Objective: 2D Schwefel Function","title":"mlr3mbo","text":"","code":"objective_function = function(xs) { list(y = 418.9829 * 2 - (sum(unlist(xs) * sin(sqrt(abs(unlist(xs))))))) } domain = ps(x1 = p_dbl(lower = -500, upper = 500), x2 = p_dbl(lower = -500, upper = 500)) codomain = ps(y = p_dbl(tags = \"minimize\")) objective = ObjectiveRFun$new( fun = objective_function, domain = domain, codomain = codomain) instance = OptimInstanceBatchSingleCrit$new( objective = objective, search_space = domain, terminator = trm(\"evals\", n_evals = 60)) # Gaussian Process, EI, DIRECT surrogate = srlrn(default_gp()) acq_function = acqf(\"ei\") acq_optimizer = acqo(opt(\"nloptr\", algorithm = \"NLOPT_GN_DIRECT_L\"), terminator = trm(\"stagnation\", threshold = 1e-8)) optimizer = opt(\"mbo\", loop_function = bayesopt_ego, surrogate = surrogate, acq_function = acq_function, acq_optimizer = acq_optimizer) set.seed(2906) optimizer$optimize(instance) library(ggplot2) ggplot(aes(x = batch_nr, y = cummin(y)), data = instance$archive$data) + geom_point() + geom_step() + labs(x = \"Batch Nr.\", y = \"Best y\") + theme_minimal() xdt = generate_design_grid(instance$search_space, resolution = 101)$data ydt = objective$eval_dt(xdt) ggplot(aes(x = x1, y = x2, z = y), data = cbind(xdt, ydt)) + geom_contour_filled() + geom_point(aes(color = batch_nr), size = 2, data = instance$archive$data) + scale_color_gradient(low = \"lightgrey\", high = \"red\") + theme_minimal()"},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/articles/mlr3mbo.html","id":"parego","dir":"Articles","previous_headings":"Examples > Multi-Objective: Schaffer Function N. 1","what":"ParEGO","title":"mlr3mbo","text":"","code":"objective_function = function(xs) { list(y1 = xs$x^2, y2 = (xs$x - 2)^2) } domain = ps(x = p_dbl(lower = -10, upper = 10)) codomain = ps(y1 = p_dbl(tags = \"minimize\"), y2 = p_dbl(tags = \"minimize\")) objective = ObjectiveRFun$new( fun = objective_function, domain = domain, codomain = codomain) instance = OptimInstanceBatchMultiCrit$new( objective = objective, search_space = domain, terminator = trm(\"evals\", n_evals = 30)) # Gaussian Process, EI, DIRECT surrogate = srlrn(default_gp()) acq_function = acqf(\"ei\") acq_optimizer = acqo(opt(\"nloptr\", algorithm = \"NLOPT_GN_DIRECT_L\"), terminator = trm(\"stagnation\", threshold = 1e-8)) optimizer = opt(\"mbo\", loop_function = bayesopt_parego, surrogate = surrogate, acq_function = acq_function, acq_optimizer = acq_optimizer) set.seed(2906) optimizer$optimize(instance) ggplot(aes(x = y1, y = y2), data = instance$archive$best()) + geom_point() + theme_minimal() library(emoa) library(mlr3misc) library(data.table) anytime_hypervolume = map_dtr(unique(instance$archive$data$batch_nr), function(bnr) { pareto = instance$archive$best(batch = 1:bnr)[, instance$archive$cols_y, with = FALSE] dhv = dominated_hypervolume(t(pareto), ref = t(t(c(100, 144)))) data.table(batch_nr = bnr, dhv = dhv) }) ggplot(aes(x = batch_nr, y = dhv), data = anytime_hypervolume[batch_nr > 1]) + geom_point() + geom_step(direction = \"vh\") + labs(x = \"Batch Nr.\", y = \"Dominated Hypervolume\") + theme_minimal()"},{"path":"https://mlr3mbo.mlr-org.com/dev/articles/mlr3mbo.html","id":"sms-ego","dir":"Articles","previous_headings":"Examples > Multi-Objective: Schaffer Function N. 1","what":"SMS-EGO","title":"mlr3mbo","text":"","code":"objective_function = function(xs) { list(y1 = xs$x^2, y2 = (xs$x - 2)^2) } domain = ps(x = p_dbl(lower = -10, upper = 10)) codomain = ps(y1 = p_dbl(tags = \"minimize\"), y2 = p_dbl(tags = \"minimize\")) objective = ObjectiveRFun$new( fun = objective_function, domain = domain, codomain = codomain) instance = OptimInstanceBatchMultiCrit$new( objective = objective, search_space = domain, terminator = trm(\"evals\", n_evals = 30)) # Gaussian Processes, SMS-EGO, DIRECT learner_y1 = default_gp() learner_y2 = learner_y1$clone(deep = TRUE) surrogate = srlrn(list(learner_y1, learner_y2)) acq_function = acqf(\"smsego\") acq_optimizer = acqo(opt(\"nloptr\", algorithm = \"NLOPT_GN_DIRECT_L\"), terminator = trm(\"stagnation\", threshold = 1e-8)) optimizer = opt(\"mbo\", loop_function = bayesopt_smsego, surrogate = surrogate, acq_function = acq_function, acq_optimizer = acq_optimizer) set.seed(2906) optimizer$optimize(instance) ggplot(aes(x = y1, y = y2), data = instance$archive$best()) + geom_point() + theme_minimal() anytime_hypervolume = map_dtr(unique(instance$archive$data$batch_nr), function(bnr) { pareto = instance$archive$best(batch = 1:bnr)[, instance$archive$cols_y, with = FALSE] dhv = dominated_hypervolume(t(pareto), ref = t(t(c(100, 144)))) data.table(batch_nr = bnr, dhv = dhv) }) ggplot(aes(x = batch_nr, y = dhv), data = anytime_hypervolume[batch_nr > 1]) + geom_point() + geom_step(direction = \"vh\") + labs(x = \"Batch Nr.\", y = \"Dominated Hypervolume\") + theme_minimal()"},{"path":"https://mlr3mbo.mlr-org.com/dev/articles/mlr3mbo.html","id":"single-objective-hpo","dir":"Articles","previous_headings":"Examples","what":"Single-Objective HPO","title":"mlr3mbo","text":"","code":"library(mlr3) task = tsk(\"wine\") learner = lrn(\"classif.rpart\", cp = to_tune(lower = 1e-4, upper = 1, logscale = TRUE), maxdepth = to_tune(lower = 1, upper = 10), minbucket = to_tune(lower = 1, upper = 10), minsplit = to_tune(lower = 1, upper = 10)) resampling = rsmp(\"cv\", folds = 3) measure = msr(\"classif.acc\") instance = TuningInstanceBatchSingleCrit$new( task = task, learner = learner, resampling = resampling, measure = measure, terminator = trm(\"evals\", n_evals = 30)) # Gaussian Process, EI, FocusSearch surrogate = srlrn(default_gp(noisy = TRUE)) acq_function = acqf(\"ei\") acq_optimizer = acqo(opt(\"focus_search\", n_points = 100L, maxit = 9), terminator = trm(\"evals\", n_evals = 3000)) tuner = tnr(\"mbo\", loop_function = bayesopt_ego, surrogate = surrogate, acq_function = acq_function, acq_optimizer = acq_optimizer) set.seed(2906) tuner$optimize(instance) instance$result"},{"path":"https://mlr3mbo.mlr-org.com/dev/articles/mlr3mbo.html","id":"multi-objective-hpo","dir":"Articles","previous_headings":"Examples","what":"Multi-Objective HPO","title":"mlr3mbo","text":"","code":"task = tsk(\"wine\") learner = lrn(\"classif.rpart\", cp = to_tune(lower = 1e-4, upper = 1, logscale = TRUE), maxdepth = to_tune(lower = 1, upper = 10), minbucket = to_tune(lower = 1, upper = 10), minsplit = to_tune(lower = 1, upper = 10)) resampling = rsmp(\"cv\", folds = 3) measures = msrs(c(\"classif.acc\", \"selected_features\")) instance = TuningInstanceBatchMultiCrit$new( task = task, learner = learner, resampling = resampling, measures = measures, terminator = trm(\"evals\", n_evals = 30), store_models = TRUE) # required due to selected features # Gaussian Process, EI, FocusSearch surrogate = srlrn(default_gp(noisy = TRUE)) acq_function = acqf(\"ei\") acq_optimizer = acqo(opt(\"focus_search\", n_points = 100L, maxit = 9), terminator = trm(\"evals\", n_evals = 3000)) tuner = tnr(\"mbo\", loop_function = bayesopt_parego, surrogate = surrogate, acq_function = acq_function, acq_optimizer = acq_optimizer) set.seed(2906) tuner$optimize(instance) instance$result"},{"path":"https://mlr3mbo.mlr-org.com/dev/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Lennart Schneider. Maintainer, author. Jakob Richter. Author. Marc Becker. Author. Michel Lang. Author. Bernd Bischl. Author. Florian Pfisterer. Author. Martin Binder. Author. Sebastian Fischer. Author. Michael H. Buselli. Copyright holder. Wessel Dankers. Copyright holder. Carlos Fonseca. Copyright holder. Manuel Lopez-Ibanez. Copyright holder. Luis Paquete. Copyright holder.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Schneider L, Richter J, Becker M, Lang M, Bischl B, Pfisterer F, Binder M, Fischer S (2024). mlr3mbo: Flexible Bayesian Optimization. R package version 0.2.4.9000, https://github.com/mlr-org/mlr3mbo, https://mlr3mbo.mlr-org.com.","code":"@Manual{, title = {mlr3mbo: Flexible Bayesian Optimization}, author = {Lennart Schneider and Jakob Richter and Marc Becker and Michel Lang and Bernd Bischl and Florian Pfisterer and Martin Binder and Sebastian Fischer}, year = {2024}, note = {R package version 0.2.4.9000, https://github.com/mlr-org/mlr3mbo}, url = {https://mlr3mbo.mlr-org.com}, }"},{"path":"https://mlr3mbo.mlr-org.com/dev/index.html","id":"mlr3mbo","dir":"","previous_headings":"","what":"Flexible Bayesian Optimization","title":"Flexible Bayesian Optimization","text":"Package website: release | dev new R6 much modular implementation single- multi-objective Bayesian Optimization.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/index.html","id":"get-started","dir":"","previous_headings":"","what":"Get Started","title":"Flexible Bayesian Optimization","text":"overview gentle introduction given vignette.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/index.html","id":"design","dir":"","previous_headings":"","what":"Design","title":"Flexible Bayesian Optimization","text":"mlr3mbo built modular relying following R6 classes: Surrogate: Surrogate Model AcqFunction: Acquisition Function AcqOptimizer: Acquisition Function Optimizer Based , Bayesian Optimization loops can written, see, e.g., bayesopt_ego sequential single-objective BO. mlr3mbo also provides OptimizerMbo class behaving like Optimizer bbotk package well TunerMbo class behaving like Tuner mlr3tuning package. mlr3mbo uses sensible defaults Surrogate, AcqFunction, AcqOptimizer, even loop_function. See ?mbo_defaults details.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/index.html","id":"simple-optimization-example","dir":"","previous_headings":"","what":"Simple Optimization Example","title":"Flexible Bayesian Optimization","text":"Minimize f(x) = x^2 via sequential single-objective BO using GP surrogate EI optimized via random search acquisition function: Note can also use bb_optimize shorthand:","code":"library(bbotk) library(mlr3mbo) library(mlr3learners) set.seed(1) obfun = ObjectiveRFun$new( fun = function(xs) list(y1 = xs$x ^ 2), domain = ps(x = p_dbl(lower = -10, upper = 10)), codomain = ps(y1 = p_dbl(tags = \"minimize\"))) instance = oi( objective = obfun, terminator = trm(\"evals\", n_evals = 10)) surrogate = srlrn(lrn(\"regr.km\", control = list(trace = FALSE))) acqfun = acqf(\"ei\") acqopt = acqo(opt(\"random_search\", batch_size = 100), terminator = trm(\"evals\", n_evals = 100)) optimizer = opt(\"mbo\", loop_function = bayesopt_ego, surrogate = surrogate, acq_function = acqfun, acq_optimizer = acqopt) optimizer$optimize(instance) ## x x_domain y1 ## ## 1: 0.03897209 0.001518824 library(bbotk) library(mlr3mbo) library(mlr3learners) set.seed(1) fun = function(xs) list(y1 = xs$x ^ 2) surrogate = srlrn(lrn(\"regr.km\", control = list(trace = FALSE))) acqfun = acqf(\"ei\") acqopt = acqo(opt(\"random_search\", batch_size = 100), terminator = trm(\"evals\", n_evals = 100)) optimizer = opt(\"mbo\", loop_function = bayesopt_ego, surrogate = surrogate, acq_function = acqfun, acq_optimizer = acqopt) result = bb_optimize( fun, method = optimizer, lower = c(x = -10), upper = c(x = 10), max_evals = 10)"},{"path":"https://mlr3mbo.mlr-org.com/dev/index.html","id":"simple-tuning-example","dir":"","previous_headings":"","what":"Simple Tuning Example","title":"Flexible Bayesian Optimization","text":"","code":"library(mlr3) library(mlr3learners) library(mlr3tuning) library(mlr3mbo) set.seed(1) task = tsk(\"pima\") learner = lrn(\"classif.rpart\", cp = to_tune(lower = 1e-04, upper = 1, logscale = TRUE)) instance = tune( tuner = tnr(\"mbo\"), task = task, learner = learner, resampling = rsmp(\"holdout\"), measure = msr(\"classif.ce\"), term_evals = 10) instance$result ## cp learner_param_vals x_domain classif.ce ## ## 1: -4.381681 0.2070312"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqFunction.html","id":null,"dir":"Reference","previous_headings":"","what":"Acquisition Function Base Class — AcqFunction","title":"Acquisition Function Base Class — AcqFunction","text":"Abstract acquisition function class. Based predictions Surrogate, acquisition function encodes preference evaluate new point.","code":""},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqFunction.html","id":"super-class","dir":"Reference","previous_headings":"","what":"Super class","title":"Acquisition Function Base Class — AcqFunction","text":"bbotk::Objective -> AcqFunction","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqFunction.html","id":"active-bindings","dir":"Reference","previous_headings":"","what":"Active bindings","title":"Acquisition Function Base Class — AcqFunction","text":"direction (\"\" | \"minimize\" | \"maximize\") Optimization direction acquisition function relative direction objective function bbotk::OptimInstance. Must \"\", \"minimize\", \"maximize\". surrogate_max_to_min (-1 | 1) Multiplicative factor correct minimization maximization acquisition function. label (character(1)) Label object. man (character(1)) String format [pkg]::[topic] pointing manual page object. archive (bbotk::Archive) Points bbotk::Archive surrogate. fun (function) Points private acquisition function implemented subclasses. surrogate (Surrogate) Surrogate. requires_predict_type_se (logical(1)) Whether acquisition function requires surrogate \"se\" $predict_type. packages (character()) Set required packages.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqFunction.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Acquisition Function Base Class — AcqFunction","text":"bbotk::Objective$eval() bbotk::Objective$format() bbotk::Objective$help() bbotk::Objective$print()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqFunction.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Acquisition Function Base Class — AcqFunction","text":"AcqFunction$new() AcqFunction$update() AcqFunction$eval_many() AcqFunction$eval_dt() AcqFunction$clone()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqFunction.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Acquisition Function Base Class — AcqFunction","text":"Creates new instance R6 class. Note surrogate can initialized lazy can later set via active binding $surrogate.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqFunction.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function Base Class — AcqFunction","text":"","code":"AcqFunction$new( id, constants = ParamSet$new(), surrogate, requires_predict_type_se, direction, packages = NULL, label = NA_character_, man = NA_character_ )"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqFunction.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Acquisition Function Base Class — AcqFunction","text":"id (character(1)). constants (paradox::ParamSet). Changeable constants parameters. surrogate (NULL | Surrogate). Surrogate whose predictions used acquisition function. requires_predict_type_se (logical(1)) Whether acquisition function requires surrogate \"se\" $predict_type. direction (\"\" | \"minimize\" | \"maximize\"). Optimization direction acquisition function relative direction objective function bbotk::OptimInstance. Must \"\", \"minimize\", \"maximize\". packages (character()) Set required packages. warning signaled prior construction least one packages installed, loaded (attached) later -demand via requireNamespace(). label (character(1)) Label object. man (character(1)) String format [pkg]::[topic] pointing manual page object.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqFunction.html","id":"method-update-","dir":"Reference","previous_headings":"","what":"Method update()","title":"Acquisition Function Base Class — AcqFunction","text":"Update acquisition function. Can implemented subclasses.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqFunction.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function Base Class — AcqFunction","text":"","code":"AcqFunction$update()"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqFunction.html","id":"method-eval-many-","dir":"Reference","previous_headings":"","what":"Method eval_many()","title":"Acquisition Function Base Class — AcqFunction","text":"Evaluates multiple input values objective function.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqFunction.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function Base Class — AcqFunction","text":"","code":"AcqFunction$eval_many(xss)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqFunction.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"Acquisition Function Base Class — AcqFunction","text":"xss (list()) list lists contains multiple x values, e.g. list(list(x1 = 1, x2 = 2), list(x1 = 3, x2 = 4)).","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqFunction.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Acquisition Function Base Class — AcqFunction","text":"data.table::data.table() contains one y-column single-objective functions multiple y-columns multi-objective functions, e.g. data.table(y = 1:2) data.table(y1 = 1:2, y2 = 3:4).","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqFunction.html","id":"method-eval-dt-","dir":"Reference","previous_headings":"","what":"Method eval_dt()","title":"Acquisition Function Base Class — AcqFunction","text":"Evaluates multiple input values objective function","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqFunction.html","id":"usage-3","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function Base Class — AcqFunction","text":"","code":"AcqFunction$eval_dt(xdt)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqFunction.html","id":"arguments-2","dir":"Reference","previous_headings":"","what":"Arguments","title":"Acquisition Function Base Class — AcqFunction","text":"xdt (data.table::data.table()) One point per row, e.g. data.table(x1 = c(1, 3), x2 = c(2, 4)).","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqFunction.html","id":"returns-1","dir":"Reference","previous_headings":"","what":"Returns","title":"Acquisition Function Base Class — AcqFunction","text":"data.table::data.table() contains one y-column single-objective functions multiple y-columns multi-objective functions, e.g. data.table(y = 1:2) data.table(y1 = 1:2, y2 = 3:4).","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqFunction.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Acquisition Function Base Class — AcqFunction","text":"objects class cloneable method.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqFunction.html","id":"usage-4","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function Base Class — AcqFunction","text":"","code":"AcqFunction$clone(deep = FALSE)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqFunction.html","id":"arguments-3","dir":"Reference","previous_headings":"","what":"Arguments","title":"Acquisition Function Base Class — AcqFunction","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqOptimizer.html","id":null,"dir":"Reference","previous_headings":"","what":"Acquisition Function Optimizer — AcqOptimizer","title":"Acquisition Function Optimizer — AcqOptimizer","text":"Optimizer AcqFunctions performs acquisition function optimization. Wraps bbotk::Optimizer bbotk::Terminator.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqOptimizer.html","id":"parameters","dir":"Reference","previous_headings":"","what":"Parameters","title":"Acquisition Function Optimizer — AcqOptimizer","text":"n_candidates integer(1) Number candidate points propose. Note affect acquisition function calculated (e.g., setting n_candidates > 1 result computing q- multi-Expected Improvement) rather top n-candidates selected bbotk::Archive acquisition function bbotk::OptimInstance. Note setting n_candidates > 1 usually sensible idea still supported experimental reasons. Default 1. logging_level character(1) Logging level acquisition function optimization. Can \"fatal\", \"error\", \"warn\", \"info\", \"debug\" \"trace\". Default \"warn\", .e., warnings logged. warmstart logical(1) acquisition function optimization warm-started evaluating best point(s) present bbotk::Archive actual bbotk::OptimInstance? sensible using population based acquisition function optimizer, e.g., local search mutation. Default FALSE. warmstart_size integer(1) | \"\" Number best points selected bbotk::Archive used warm starting. Can also \"\" use available points. relevant warmstart = TRUE. Default 1. skip_already_evaluated logical(1) can happen candidate resulting acquisition function optimization already evaluated previous iteration. candidate proposal ignored next best point selected candidate? Default TRUE. catch_errors logical(1) errors acquisition function optimization caught propagated loop_function can handle failed acquisition function optimization appropriately , e.g., proposing randomly sampled point evaluation? Default TRUE.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqOptimizer.html","id":"public-fields","dir":"Reference","previous_headings":"","what":"Public fields","title":"Acquisition Function Optimizer — AcqOptimizer","text":"optimizer (bbotk::Optimizer). terminator (bbotk::Terminator). acq_function (AcqFunction).","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqOptimizer.html","id":"active-bindings","dir":"Reference","previous_headings":"","what":"Active bindings","title":"Acquisition Function Optimizer — AcqOptimizer","text":"print_id (character) Id used printing. param_set (paradox::ParamSet) Set hyperparameters.","code":""},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqOptimizer.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Acquisition Function Optimizer — AcqOptimizer","text":"AcqOptimizer$new() AcqOptimizer$format() AcqOptimizer$print() AcqOptimizer$optimize() AcqOptimizer$clone()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqOptimizer.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Acquisition Function Optimizer — AcqOptimizer","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqOptimizer.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function Optimizer — AcqOptimizer","text":"","code":"AcqOptimizer$new(optimizer, terminator, acq_function = NULL)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqOptimizer.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Acquisition Function Optimizer — AcqOptimizer","text":"optimizer (bbotk::Optimizer). terminator (bbotk::Terminator). acq_function (NULL | AcqFunction).","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqOptimizer.html","id":"method-format-","dir":"Reference","previous_headings":"","what":"Method format()","title":"Acquisition Function Optimizer — AcqOptimizer","text":"Helper print outputs.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqOptimizer.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function Optimizer — AcqOptimizer","text":"","code":"AcqOptimizer$format()"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqOptimizer.html","id":"method-print-","dir":"Reference","previous_headings":"","what":"Method print()","title":"Acquisition Function Optimizer — AcqOptimizer","text":"Print method.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqOptimizer.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function Optimizer — AcqOptimizer","text":"","code":"AcqOptimizer$print()"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqOptimizer.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Acquisition Function Optimizer — AcqOptimizer","text":"(character()).","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqOptimizer.html","id":"method-optimize-","dir":"Reference","previous_headings":"","what":"Method optimize()","title":"Acquisition Function Optimizer — AcqOptimizer","text":"Optimize acquisition function.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqOptimizer.html","id":"usage-3","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function Optimizer — AcqOptimizer","text":"","code":"AcqOptimizer$optimize()"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqOptimizer.html","id":"returns-1","dir":"Reference","previous_headings":"","what":"Returns","title":"Acquisition Function Optimizer — AcqOptimizer","text":"data.table::data.table() 1 row per optimum x columns.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqOptimizer.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Acquisition Function Optimizer — AcqOptimizer","text":"objects class cloneable method.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqOptimizer.html","id":"usage-4","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function Optimizer — AcqOptimizer","text":"","code":"AcqOptimizer$clone(deep = FALSE)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqOptimizer.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"Acquisition Function Optimizer — AcqOptimizer","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqOptimizer.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Acquisition Function Optimizer — AcqOptimizer","text":"","code":"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(\"ei\", surrogate = surrogate) acq_function$surrogate$update() acq_function$update() acq_optimizer = acqo( optimizer = opt(\"random_search\", batch_size = 1000), terminator = trm(\"evals\", n_evals = 1000), acq_function = acq_function) acq_optimizer$optimize() } #> Loading required namespace: DiceKriging #> Loading required namespace: rgenoud #> Loading required package: paradox #> Loading required package: mlr3 #> x x_domain acq_ei .already_evaluated #> #> 1: 1.187665 5.305171 FALSE"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/ResultAssigner.html","id":null,"dir":"Reference","previous_headings":"","what":"Result Assigner Base Class — ResultAssigner","title":"Result Assigner Base Class — ResultAssigner","text":"Abstract result assigner class. result assigner responsible assigning final optimization result bbotk::OptimInstance. Normally, used within OptimizerMbo.","code":""},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/ResultAssigner.html","id":"active-bindings","dir":"Reference","previous_headings":"","what":"Active bindings","title":"Result Assigner Base Class — ResultAssigner","text":"label (character(1)) Label object. man (character(1)) String format [pkg]::[topic] pointing manual page object. packages (character()) Set required packages. warning signaled least one packages installed, loaded (attached) later -demand via requireNamespace().","code":""},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/ResultAssigner.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Result Assigner Base Class — ResultAssigner","text":"ResultAssigner$new() ResultAssigner$assign_result() ResultAssigner$format() ResultAssigner$print() ResultAssigner$clone()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/ResultAssigner.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Result Assigner Base Class — ResultAssigner","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/ResultAssigner.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Result Assigner Base Class — ResultAssigner","text":"","code":"ResultAssigner$new(label = NA_character_, man = NA_character_)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/ResultAssigner.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Result Assigner Base Class — ResultAssigner","text":"label (character(1)) Label object. man (character(1)) String format [pkg]::[topic] pointing manual page object.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/ResultAssigner.html","id":"method-assign-result-","dir":"Reference","previous_headings":"","what":"Method assign_result()","title":"Result Assigner Base Class — ResultAssigner","text":"Assigns result, .e., final point(s) instance.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/ResultAssigner.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Result Assigner Base Class — ResultAssigner","text":"","code":"ResultAssigner$assign_result(instance)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/ResultAssigner.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"Result Assigner Base Class — ResultAssigner","text":"instance (bbotk::OptimInstanceBatchSingleCrit | bbotk::OptimInstanceBatchMultiCrit) bbotk::OptimInstance final result assigned .","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/ResultAssigner.html","id":"method-format-","dir":"Reference","previous_headings":"","what":"Method format()","title":"Result Assigner Base Class — ResultAssigner","text":"Helper print outputs.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/ResultAssigner.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Result Assigner Base Class — ResultAssigner","text":"","code":"ResultAssigner$format()"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/ResultAssigner.html","id":"method-print-","dir":"Reference","previous_headings":"","what":"Method print()","title":"Result Assigner Base Class — ResultAssigner","text":"Print method.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/ResultAssigner.html","id":"usage-3","dir":"Reference","previous_headings":"","what":"Usage","title":"Result Assigner Base Class — ResultAssigner","text":"","code":"ResultAssigner$print()"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/ResultAssigner.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Result Assigner Base Class — ResultAssigner","text":"(character()).","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/ResultAssigner.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Result Assigner Base Class — ResultAssigner","text":"objects class cloneable method.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/ResultAssigner.html","id":"usage-4","dir":"Reference","previous_headings":"","what":"Usage","title":"Result Assigner Base Class — ResultAssigner","text":"","code":"ResultAssigner$clone(deep = FALSE)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/ResultAssigner.html","id":"arguments-2","dir":"Reference","previous_headings":"","what":"Arguments","title":"Result Assigner Base Class — ResultAssigner","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/Surrogate.html","id":null,"dir":"Reference","previous_headings":"","what":"Surrogate Model — Surrogate","title":"Surrogate Model — Surrogate","text":"Abstract surrogate model class. surrogate model used model unknown objective function(s) based points evaluated far.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/Surrogate.html","id":"public-fields","dir":"Reference","previous_headings":"","what":"Public fields","title":"Surrogate Model — Surrogate","text":"learner (learner) Arbitrary learner object depending subclass.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/Surrogate.html","id":"active-bindings","dir":"Reference","previous_headings":"","what":"Active bindings","title":"Surrogate Model — Surrogate","text":"print_id (character) Id used printing. archive (bbotk::Archive | NULL)bbotk::Archive bbotk::OptimInstance. n_learner (integer(1)) Returns number surrogate models. cols_x (character() | NULL) Column id's variables used features. default, automatically inferred based archive. cols_y (character() | NULL) Column id's variables used targets. default, automatically inferred based archive. insample_perf (numeric()) Surrogate model's current insample performance. param_set (paradox::ParamSet) Set hyperparameters. assert_insample_perf (numeric()) Asserts whether current insample performance meets performance threshold. packages (character()) Set required packages. warning signaled least one packages installed, loaded (attached) later -demand via requireNamespace(). feature_types (character()) Stores feature types surrogate can handle, e.g. \"logical\", \"numeric\", \"factor\". complete list candidate feature types, grouped task type, stored mlr_reflections$task_feature_types. properties (character()) Stores set properties/capabilities surrogate . complete list candidate properties, grouped task type, stored mlr_reflections$learner_properties. predict_type (character(1)) Retrieves currently active predict type, e.g. \"response\".","code":""},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/Surrogate.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Surrogate Model — Surrogate","text":"Surrogate$new() Surrogate$update() Surrogate$predict() Surrogate$format() Surrogate$print() Surrogate$clone()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/Surrogate.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Surrogate Model — Surrogate","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/Surrogate.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Surrogate Model — Surrogate","text":"","code":"Surrogate$new(learner, archive, cols_x, cols_y, param_set)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/Surrogate.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Surrogate Model — Surrogate","text":"learner (learner) Arbitrary learner object depending subclass. archive (bbotk::Archive | NULL)bbotk::Archive bbotk::OptimInstance. cols_x (character() | NULL) Column id's variables used features. default, automatically inferred based archive. cols_y (character() | NULL) Column id's variables used targets. default, automatically inferred based archive. param_set (paradox::ParamSet) Parameter space description depending subclass.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/Surrogate.html","id":"method-update-","dir":"Reference","previous_headings":"","what":"Method update()","title":"Surrogate Model — Surrogate","text":"Train learner new data. Subclasses must implement $private.update().","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/Surrogate.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Surrogate Model — Surrogate","text":"","code":"Surrogate$update()"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/Surrogate.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Surrogate Model — Surrogate","text":"NULL.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/Surrogate.html","id":"method-predict-","dir":"Reference","previous_headings":"","what":"Method predict()","title":"Surrogate Model — Surrogate","text":"Predict mean response standard error. Must implemented subclasses.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/Surrogate.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Surrogate Model — Surrogate","text":"","code":"Surrogate$predict(xdt)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/Surrogate.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"Surrogate Model — Surrogate","text":"xdt (data.table::data.table()) New data. One row per observation.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/Surrogate.html","id":"returns-1","dir":"Reference","previous_headings":"","what":"Returns","title":"Surrogate Model — Surrogate","text":"Arbitrary prediction object.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/Surrogate.html","id":"method-format-","dir":"Reference","previous_headings":"","what":"Method format()","title":"Surrogate Model — Surrogate","text":"Helper print outputs.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/Surrogate.html","id":"usage-3","dir":"Reference","previous_headings":"","what":"Usage","title":"Surrogate Model — Surrogate","text":"","code":"Surrogate$format()"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/Surrogate.html","id":"method-print-","dir":"Reference","previous_headings":"","what":"Method print()","title":"Surrogate Model — Surrogate","text":"Print method.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/Surrogate.html","id":"usage-4","dir":"Reference","previous_headings":"","what":"Usage","title":"Surrogate Model — Surrogate","text":"","code":"Surrogate$print()"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/Surrogate.html","id":"returns-2","dir":"Reference","previous_headings":"","what":"Returns","title":"Surrogate Model — Surrogate","text":"(character()).","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/Surrogate.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Surrogate Model — Surrogate","text":"objects class cloneable method.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/Surrogate.html","id":"usage-5","dir":"Reference","previous_headings":"","what":"Usage","title":"Surrogate Model — Surrogate","text":"","code":"Surrogate$clone(deep = FALSE)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/Surrogate.html","id":"arguments-2","dir":"Reference","previous_headings":"","what":"Arguments","title":"Surrogate Model — Surrogate","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/SurrogateLearner.html","id":null,"dir":"Reference","previous_headings":"","what":"Surrogate Model Containing a Single Learner — SurrogateLearner","title":"Surrogate Model Containing a Single Learner — SurrogateLearner","text":"Surrogate model containing single mlr3::LearnerRegr.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/SurrogateLearner.html","id":"parameters","dir":"Reference","previous_headings":"","what":"Parameters","title":"Surrogate Model Containing a Single Learner — SurrogateLearner","text":"assert_insample_perf logical(1) insample performance mlr3::LearnerRegr asserted updating surrogate? assertion fails (.e., insample performance based perf_measure meet perf_threshold), error thrown. Default FALSE. perf_measure mlr3::MeasureRegr Performance measure use assert insample performance mlr3::LearnerRegr. relevant assert_insample_perf = TRUE. Default mlr3::mlr_measures_regr.rsq. perf_threshold numeric(1) Threshold insample performance mlr3::LearnerRegr asserted . relevant assert_insample_perf = TRUE. Default 0. catch_errors logical(1) errors updating surrogate caught propagated loop_function can handle failed acquisition function optimization (result failed surrogate) appropriately , e.g., proposing randomly sampled point evaluation? Default TRUE.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/SurrogateLearner.html","id":"super-class","dir":"Reference","previous_headings":"","what":"Super class","title":"Surrogate Model Containing a Single Learner — SurrogateLearner","text":"mlr3mbo::Surrogate -> SurrogateLearner","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/SurrogateLearner.html","id":"active-bindings","dir":"Reference","previous_headings":"","what":"Active bindings","title":"Surrogate Model Containing a Single Learner — SurrogateLearner","text":"print_id (character) Id used printing. n_learner (integer(1)) Returns number surrogate models. assert_insample_perf (numeric()) Asserts whether current insample performance meets performance threshold. packages (character()) Set required packages. warning signaled least one packages installed, loaded (attached) later -demand via requireNamespace(). feature_types (character()) Stores feature types surrogate can handle, e.g. \"logical\", \"numeric\", \"factor\". complete list candidate feature types, grouped task type, stored mlr_reflections$task_feature_types. properties (character()) Stores set properties/capabilities surrogate . complete list candidate properties, grouped task type, stored mlr_reflections$learner_properties. predict_type (character(1)) Retrieves currently active predict type, e.g. \"response\".","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/SurrogateLearner.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Surrogate Model Containing a Single Learner — SurrogateLearner","text":"mlr3mbo::Surrogate$format() mlr3mbo::Surrogate$print() mlr3mbo::Surrogate$update()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/SurrogateLearner.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Surrogate Model Containing a Single Learner — SurrogateLearner","text":"SurrogateLearner$new() SurrogateLearner$predict() SurrogateLearner$clone()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/SurrogateLearner.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Surrogate Model Containing a Single Learner — SurrogateLearner","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/SurrogateLearner.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Surrogate Model Containing a Single Learner — SurrogateLearner","text":"","code":"SurrogateLearner$new(learner, archive = NULL, cols_x = NULL, col_y = NULL)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/SurrogateLearner.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Surrogate Model Containing a Single Learner — SurrogateLearner","text":"learner (mlr3::LearnerRegr). archive (bbotk::Archive | NULL)bbotk::Archive bbotk::OptimInstance. cols_x (character() | NULL) Column id's variables used features. default, automatically inferred based archive. col_y (character(1) | NULL) Column id variable used target. default, automatically inferred based archive.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/SurrogateLearner.html","id":"method-predict-","dir":"Reference","previous_headings":"","what":"Method predict()","title":"Surrogate Model Containing a Single Learner — SurrogateLearner","text":"Predict mean response standard error.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/SurrogateLearner.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Surrogate Model Containing a Single Learner — SurrogateLearner","text":"","code":"SurrogateLearner$predict(xdt)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/SurrogateLearner.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"Surrogate Model Containing a Single Learner — SurrogateLearner","text":"xdt (data.table::data.table()) New data. One row per observation.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/SurrogateLearner.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Surrogate Model Containing a Single Learner — SurrogateLearner","text":"data.table::data.table() columns mean se.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/SurrogateLearner.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Surrogate Model Containing a Single Learner — SurrogateLearner","text":"objects class cloneable method.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/SurrogateLearner.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Surrogate Model Containing a Single Learner — SurrogateLearner","text":"","code":"SurrogateLearner$clone(deep = FALSE)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/SurrogateLearner.html","id":"arguments-2","dir":"Reference","previous_headings":"","what":"Arguments","title":"Surrogate Model Containing a Single Learner — SurrogateLearner","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/SurrogateLearner.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Surrogate Model Containing a Single Learner — SurrogateLearner","text":"","code":"if (requireNamespace(\"mlr3learners\") & requireNamespace(\"DiceKriging\") & requireNamespace(\"rgenoud\")) { library(bbotk) library(paradox) library(mlr3learners) 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)) xdt = generate_design_random(instance$search_space, n = 4)$data instance$eval_batch(xdt) learner = default_gp() surrogate = srlrn(learner, archive = instance$archive) surrogate$update() surrogate$learner$model } #> #> Call: #> DiceKriging::km(design = data, response = task$truth(), covtype = \"matern5_2\", #> nugget = 2.83305750865222e-07, optim.method = \"gen\", control = pv$control) #> #> Trend coeff.: #> Estimate #> (Intercept) 5.8590 #> #> Covar. type : matern5_2 #> Covar. coeff.: #> Estimate #> theta(x) 1.1710 #> #> Variance estimate: 21.95183 #> #> Nugget effect : 2.833058e-07 #>"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/SurrogateLearnerCollection.html","id":null,"dir":"Reference","previous_headings":"","what":"Surrogate Model Containing Multiple Learners — SurrogateLearnerCollection","title":"Surrogate Model Containing Multiple Learners — SurrogateLearnerCollection","text":"Surrogate model containing multiple mlr3::LearnerRegr. mlr3::LearnerRegr fit target variables indicated via cols_y. Note redundant mlr3::LearnerRegr must deep clones.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/SurrogateLearnerCollection.html","id":"parameters","dir":"Reference","previous_headings":"","what":"Parameters","title":"Surrogate Model Containing Multiple Learners — SurrogateLearnerCollection","text":"assert_insample_perf logical(1) insample performance mlr3::LearnerRegr asserted updating surrogate? assertion fails (.e., insample performance based perf_measure meet perf_threshold), error thrown. Default FALSE. perf_measure List mlr3::MeasureRegr Performance measures use assert insample performance mlr3::LearnerRegr. relevant assert_insample_perf = TRUE. Default mlr3::mlr_measures_regr.rsq learner. perf_threshold List numeric(1) Thresholds insample performance mlr3::LearnerRegr asserted . relevant assert_insample_perf = TRUE. Default 0 learner. catch_errors logical(1) errors updating surrogate caught propagated loop_function can handle failed acquisition function optimization (result failed surrogate) appropriately , e.g., proposing randomly sampled point evaluation? Default TRUE.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/SurrogateLearnerCollection.html","id":"super-class","dir":"Reference","previous_headings":"","what":"Super class","title":"Surrogate Model Containing Multiple Learners — SurrogateLearnerCollection","text":"mlr3mbo::Surrogate -> SurrogateLearnerCollection","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/SurrogateLearnerCollection.html","id":"active-bindings","dir":"Reference","previous_headings":"","what":"Active bindings","title":"Surrogate Model Containing Multiple Learners — SurrogateLearnerCollection","text":"print_id (character) Id used printing. n_learner (integer(1)) Returns number surrogate models. assert_insample_perf (numeric()) Asserts whether current insample performance meets performance threshold. packages (character()) Set required packages. warning signaled least one packages installed, loaded (attached) later -demand via requireNamespace(). feature_types (character()) Stores feature types surrogate can handle, e.g. \"logical\", \"numeric\", \"factor\". complete list candidate feature types, grouped task type, stored mlr_reflections$task_feature_types. properties (character()) Stores set properties/capabilities surrogate . complete list candidate properties, grouped task type, stored mlr_reflections$learner_properties. predict_type (character(1)) Retrieves currently active predict type, e.g. \"response\".","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/SurrogateLearnerCollection.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Surrogate Model Containing Multiple Learners — SurrogateLearnerCollection","text":"mlr3mbo::Surrogate$format() mlr3mbo::Surrogate$print() mlr3mbo::Surrogate$update()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/SurrogateLearnerCollection.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Surrogate Model Containing Multiple Learners — SurrogateLearnerCollection","text":"SurrogateLearnerCollection$new() SurrogateLearnerCollection$predict() SurrogateLearnerCollection$clone()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/SurrogateLearnerCollection.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Surrogate Model Containing Multiple Learners — SurrogateLearnerCollection","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/SurrogateLearnerCollection.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Surrogate Model Containing Multiple Learners — SurrogateLearnerCollection","text":"","code":"SurrogateLearnerCollection$new( learners, archive = NULL, cols_x = NULL, cols_y = NULL )"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/SurrogateLearnerCollection.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Surrogate Model Containing Multiple Learners — SurrogateLearnerCollection","text":"learners (list mlr3::LearnerRegr). archive (bbotk::Archive | NULL)bbotk::Archive bbotk::OptimInstance. cols_x (character() | NULL) Column id's variables used features. default, automatically inferred based archive. cols_y (character() | NULL) Column id's variables used targets. default, automatically inferred based archive.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/SurrogateLearnerCollection.html","id":"method-predict-","dir":"Reference","previous_headings":"","what":"Method predict()","title":"Surrogate Model Containing Multiple Learners — SurrogateLearnerCollection","text":"Predict mean response standard error. Returns named list data.tables. contains mean response standard error one col_y.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/SurrogateLearnerCollection.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Surrogate Model Containing Multiple Learners — SurrogateLearnerCollection","text":"","code":"SurrogateLearnerCollection$predict(xdt)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/SurrogateLearnerCollection.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"Surrogate Model Containing Multiple Learners — SurrogateLearnerCollection","text":"xdt (data.table::data.table()) New data. One row per observation.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/SurrogateLearnerCollection.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Surrogate Model Containing Multiple Learners — SurrogateLearnerCollection","text":"list data.table::data.table()s columns mean se.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/SurrogateLearnerCollection.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Surrogate Model Containing Multiple Learners — SurrogateLearnerCollection","text":"objects class cloneable method.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/SurrogateLearnerCollection.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Surrogate Model Containing Multiple Learners — SurrogateLearnerCollection","text":"","code":"SurrogateLearnerCollection$clone(deep = FALSE)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/SurrogateLearnerCollection.html","id":"arguments-2","dir":"Reference","previous_headings":"","what":"Arguments","title":"Surrogate Model Containing Multiple Learners — SurrogateLearnerCollection","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/SurrogateLearnerCollection.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Surrogate Model Containing Multiple Learners — SurrogateLearnerCollection","text":"","code":"if (requireNamespace(\"mlr3learners\") & requireNamespace(\"DiceKriging\") & requireNamespace(\"rgenoud\") & requireNamespace(\"ranger\")) { library(bbotk) library(paradox) library(mlr3learners) fun = function(xs) { list(y1 = xs$x^2, y2 = (xs$x - 2) ^ 2) } domain = ps(x = p_dbl(lower = -10, upper = 10)) codomain = ps(y1 = p_dbl(tags = \"minimize\"), y2 = p_dbl(tags = \"minimize\")) objective = ObjectiveRFun$new(fun = fun, domain = domain, codomain = codomain) instance = OptimInstanceBatchMultiCrit$new( objective = objective, terminator = trm(\"evals\", n_evals = 5)) xdt = generate_design_random(instance$search_space, n = 4)$data instance$eval_batch(xdt) learner1 = default_gp() learner2 = default_rf() surrogate = srlrn(list(learner1, learner2), archive = instance$archive) surrogate$update() surrogate$learner surrogate$learner[[\"y2\"]]$model } #> Loading required namespace: ranger #> Ranger result #> #> Call: #> ranger::ranger(dependent.variable.name = task$target_names, data = task$data(), case.weights = task$weights$weight, keep.inbag = TRUE, num.threads = 1L, num.trees = 100L) #> #> Type: Regression #> Number of trees: 100 #> Sample size: 4 #> Number of independent variables: 1 #> Mtry: 1 #> Target node size: 5 #> Variable importance mode: none #> Splitrule: variance #> OOB prediction error (MSE): 4791.712 #> R squared (OOB): -0.404484"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/acqf.html","id":null,"dir":"Reference","previous_headings":"","what":"Syntactic Sugar Acquisition Function Construction — acqf","title":"Syntactic Sugar Acquisition Function Construction — acqf","text":"function complements mlr_acqfunctions functions spirit mlr_sugar mlr3.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/acqf.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Syntactic Sugar Acquisition Function Construction — acqf","text":"","code":"acqf(.key, ...)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/acqf.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Syntactic Sugar Acquisition Function Construction — acqf","text":".key (character(1)) Key passed respective dictionary retrieve object. ... (named list()) Named arguments passed constructor, set parameters paradox::ParamSet, set public field. See mlr3misc::dictionary_sugar_get() details.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/acqf.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Syntactic Sugar Acquisition Function Construction — acqf","text":"AcqFunction","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/acqf.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Syntactic Sugar Acquisition Function Construction — acqf","text":"","code":"acqf(\"ei\") #> #> Domain: #> #> Empty. #> Codomain: #> #> Empty."},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/acqo.html","id":null,"dir":"Reference","previous_headings":"","what":"Syntactic Sugar Acquisition Function Optimizer Construction — acqo","title":"Syntactic Sugar Acquisition Function Optimizer Construction — acqo","text":"function allows construct AcqOptimizer spirit mlr_sugar mlr3.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/acqo.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Syntactic Sugar Acquisition Function Optimizer Construction — acqo","text":"","code":"acqo(optimizer, terminator, acq_function = NULL, ...)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/acqo.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Syntactic Sugar Acquisition Function Optimizer Construction — acqo","text":"optimizer (bbotk::Optimizer)bbotk::Optimizer used. terminator (bbotk::Terminator)bbotk::Terminator used. acq_function (NULL | AcqFunction)AcqFunction used. Can also NULL. ... (named list()) Named arguments passed constructor, set parameters paradox::ParamSet.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/acqo.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Syntactic Sugar Acquisition Function Optimizer Construction — acqo","text":"AcqOptimizer","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/acqo.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Syntactic Sugar Acquisition Function Optimizer Construction — acqo","text":"","code":"library(bbotk) acqo(opt(\"random_search\"), trm(\"evals\"), catch_errors = FALSE) #> : (OptimizerBatchRandomSearch | TerminatorEvals) #> * Parameters: n_candidates=1, logging_level=warn, warmstart=FALSE, #> skip_already_evaluated=TRUE, catch_errors=FALSE"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/default_acqfunction.html","id":null,"dir":"Reference","previous_headings":"","what":"Default Acquisition Function — default_acqfunction","title":"Default Acquisition Function — default_acqfunction","text":"Chooses default acquisition function, .e. criterion used propose future points. single-objective optimization, defaults mlr_acqfunctions_ei. multi-objective optimization, defaults mlr_acqfunctions_smsego.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/default_acqfunction.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Default Acquisition Function — default_acqfunction","text":"","code":"default_acqfunction(instance)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/default_acqfunction.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Default Acquisition Function — default_acqfunction","text":"instance (bbotk::OptimInstance).","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/default_acqfunction.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Default Acquisition Function — default_acqfunction","text":"AcqFunction","code":""},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/default_acqoptimizer.html","id":null,"dir":"Reference","previous_headings":"","what":"Default Acquisition Function Optimizer — default_acqoptimizer","title":"Default Acquisition Function Optimizer — default_acqoptimizer","text":"Chooses default acquisition function optimizer. Defaults wrapping bbotk::OptimizerBatchRandomSearch allowing 10000 function evaluations (batch size 1000) via bbotk::TerminatorEvals.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/default_acqoptimizer.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Default Acquisition Function Optimizer — default_acqoptimizer","text":"","code":"default_acqoptimizer(acq_function)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/default_acqoptimizer.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Default Acquisition Function Optimizer — default_acqoptimizer","text":"acq_function (AcqFunction).","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/default_acqoptimizer.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Default Acquisition Function Optimizer — default_acqoptimizer","text":"AcqOptimizer","code":""},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/default_gp.html","id":null,"dir":"Reference","previous_headings":"","what":"Default Gaussian Process — default_gp","title":"Default Gaussian Process — default_gp","text":"helper function constructs default Gaussian Process mlr3::LearnerRegr example used default_surrogate. Constructs Kriging learner “\"regr.km\"” kernel “\"matern5_2\"”. noisy = FALSE (default) small nugget effect added nugget.stability = 10^-8 increase numerical stability hopefully prevent crashes DiceKriging. noisy = TRUE nugget effect estimated nugget.estim = TRUE. noisy = TRUE jitter set TRUE circumvent problem DiceKriging already trained input values produce exact trained output. general, instead default \"BFGS\" optimization method use rgenoud (\"gen\"), hybrid algorithm, combine global search based genetic algorithms local search based gradients. may improve model fit less frequently produce constant model prediction.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/default_gp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Default Gaussian Process — default_gp","text":"","code":"default_gp(noisy = FALSE)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/default_gp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Default Gaussian Process — default_gp","text":"noisy (logical(1)) Whether learner used noisy objective function scenario. See .","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/default_gp.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Default Gaussian Process — default_gp","text":"mlr3::LearnerRegr","code":""},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/default_loop_function.html","id":null,"dir":"Reference","previous_headings":"","what":"Default Loop Function — default_loop_function","title":"Default Loop Function — default_loop_function","text":"Chooses default loop_function, .e. Bayesian Optimization flavor used optimization. single-objective optimization, defaults bayesopt_ego. multi-objective optimization, defaults bayesopt_smsego.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/default_loop_function.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Default Loop Function — default_loop_function","text":"","code":"default_loop_function(instance)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/default_loop_function.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Default Loop Function — default_loop_function","text":"instance (bbotk::OptimInstance) object inherits bbotk::OptimInstance.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/default_loop_function.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Default Loop Function — default_loop_function","text":"loop_function","code":""},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/default_result_assigner.html","id":null,"dir":"Reference","previous_headings":"","what":"Default Result Assigner — default_result_assigner","title":"Default Result Assigner — default_result_assigner","text":"Chooses default result assigner. Defaults ResultAssignerArchive.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/default_result_assigner.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Default Result Assigner — default_result_assigner","text":"","code":"default_result_assigner(instance)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/default_result_assigner.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Default Result Assigner — default_result_assigner","text":"instance (bbotk::OptimInstance) object inherits bbotk::OptimInstance.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/default_result_assigner.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Default Result Assigner — default_result_assigner","text":"ResultAssigner","code":""},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/default_rf.html","id":null,"dir":"Reference","previous_headings":"","what":"Default Random Forest — default_rf","title":"Default Random Forest — default_rf","text":"helper function constructs default random forest mlr3::LearnerRegr example used default_surrogate. Constructs ranger learner “\"regr.ranger\"” num.trees = 100, keep.inbag = TRUE se.method = \"jack\".","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/default_rf.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Default Random Forest — default_rf","text":"","code":"default_rf(noisy = FALSE)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/default_rf.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Default Random Forest — default_rf","text":"noisy (logical(1)) Whether learner used noisy objective function scenario. Currently effect.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/default_rf.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Default Random Forest — default_rf","text":"mlr3::LearnerRegr","code":""},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/default_surrogate.html","id":null,"dir":"Reference","previous_headings":"","what":"Default Surrogate — default_surrogate","title":"Default Surrogate — default_surrogate","text":"helper function constructs default Surrogate based properties bbotk::OptimInstance. numeric-(including integers) parameter spaces without dependencies Gaussian Process constricted via default_gp(). mixed numeric-categorical parameter spaces, spaces conditional parameters random forest constructed via default_rf(). case, learners encapsulated using “\"evaluate\"”, fallback learner set, cases surrogate learner errors. Currently, following learner used fallback: lrn(\"regr.ranger\", num.trees = 10L, keep.inbag = TRUE, se.method = \"jack\"). additionally dependencies present parameter space, inactive conditional parameters represented missing NA values training design data. simply handle imputation method, added random forest, concretely use po(\"imputesample\") (logicals) po(\"imputeoor\") (anything else) package mlr3pipelines. Characters always encoded factors via po(\"colapply\"). range imputation makes sense tree-based methods usually hard beat, see Ding et al. (2010). case dependencies, following learner used fallback: lrn(\"regr.featureless\"). instance class bbotk::OptimInstanceBatchSingleCrit learner wrapped SurrogateLearner. instance class bbotk::OptimInstanceBatchMultiCrit multiple deep clones learner wrapped SurrogateLearnerCollection.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/default_surrogate.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Default Surrogate — default_surrogate","text":"","code":"default_surrogate(instance, learner = NULL, n_learner = NULL)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/default_surrogate.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Default Surrogate — default_surrogate","text":"instance (bbotk::OptimInstance) object inherits bbotk::OptimInstance. learner (NULL | mlr3::Learner). specified, learner used instead defaults described . n_learner (NULL | integer(1)). Number learners considered construction SurrogateLearner SurrogateLearnerCollection. specified based number objectives stated instance.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/default_surrogate.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Default Surrogate — default_surrogate","text":"Surrogate","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/default_surrogate.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Default Surrogate — default_surrogate","text":"Ding, Yufeng, Simonoff, S J (2010). “Investigation Missing Data Methods Classification Trees Applied Binary Response Data.” Journal Machine Learning Research, 11(1), 131–170.","code":""},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/loop_function.html","id":null,"dir":"Reference","previous_headings":"","what":"Loop Functions for Bayesian Optimization — loop_function","title":"Loop Functions for Bayesian Optimization — loop_function","text":"Loop functions determine behavior Bayesian Optimization algorithm global level. overview readily available loop functions, see .data.table(mlr_loop_functions). general, loop function simply decorated member S3 class loop_function. Attributes must include: id (id loop function), label (brief description), instance (\"single-crit\" \"multi_crit\"), man (link manual page). example, see, e.g., bayesopt_ego.","code":""},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mbo_defaults.html","id":null,"dir":"Reference","previous_headings":"","what":"Defaults for OptimizerMbo — mbo_defaults","title":"Defaults for OptimizerMbo — mbo_defaults","text":"following defaults set OptimizerMbo optimization respective fields set initialization. Optimization Loop: default_loop_function Surrogate: default_surrogate Acquisition Function: default_acqfunction Acqfun Optimizer: default_acqoptimizer Result Assigner: default_result_assigner","code":""},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr3mbo-package.html","id":null,"dir":"Reference","previous_headings":"","what":"mlr3mbo: Flexible Bayesian Optimization — mlr3mbo-package","title":"mlr3mbo: Flexible Bayesian Optimization — mlr3mbo-package","text":"modern flexible approach Bayesian Optimization / Model Based Optimization building 'bbotk' package. 'mlr3mbo' toolbox providing ready--use optimization algorithms well fundamental building blocks allowing straightforward implementation custom algorithms. Single- multi-objective optimization supported well mixed continuous, categorical conditional search spaces. Moreover, using 'mlr3mbo' hyperparameter optimization machine learning models within 'mlr3' ecosystem straightforward via 'mlr3tuning'. Examples ready--use optimization algorithms include Efficient Global Optimization Jones et al. (1998) doi:10.1023/:1008306431147 , ParEGO Knowles (2006) doi:10.1109/TEVC.2005.851274 SMS-EGO Ponweiser et al. (2008) doi:10.1007/978-3-540-87700-4_78 .","code":""},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr3mbo-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"mlr3mbo: Flexible Bayesian Optimization — mlr3mbo-package","text":"Maintainer: Lennart Schneider lennart.sch@web.de (ORCID) Authors: Jakob Richter jakob1richter@gmail.com (ORCID) Marc Becker marcbecker@posteo.de (ORCID) Michel Lang michellang@gmail.com (ORCID) Bernd Bischl bernd_bischl@gmx.net (ORCID) Florian Pfisterer pfistererf@googlemail.com (ORCID) Martin Binder mlr.developer@mb706.com Sebastian Fischer sebf.fischer@gmail.com (ORCID) contributors: Michael H. Buselli [copyright holder] Wessel Dankers [copyright holder] Carlos Fonseca [copyright holder] Manuel Lopez-Ibanez [copyright holder] Luis Paquete [copyright holder]","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions.html","id":null,"dir":"Reference","previous_headings":"","what":"Dictionary of Acquisition Functions — mlr_acqfunctions","title":"Dictionary of Acquisition Functions — mlr_acqfunctions","text":"simple mlr3misc::Dictionary storing objects class AcqFunction. acquisition function associated help page, see mlr_acqfunctions_[id]. convenient way retrieve construct acquisition function, see acqf().","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Dictionary of Acquisition Functions — mlr_acqfunctions","text":"R6::R6Class object inheriting mlr3misc::Dictionary.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Dictionary of Acquisition Functions — mlr_acqfunctions","text":"See mlr3misc::Dictionary.","code":""},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Dictionary of Acquisition Functions — mlr_acqfunctions","text":"","code":"library(data.table) as.data.table(mlr_acqfunctions) #> Key: #> key label #> #> 1: aei Augmented Expected Improvement #> 2: cb Lower / Upper Confidence Bound #> 3: ehvi Expected Hypervolume Improvement #> 4: ehvigh Expected Hypervolume Improvement via GH Quadrature #> 5: ei Expected Improvement #> 6: eips Expected Improvement Per Second #> 7: mean Posterior Mean #> 8: pi Probability Of Improvement #> 9: sd Posterior Standard Deviation #> 10: smsego SMS-EGO #> man #> #> 1: mlr3mbo::mlr_acqfunctions_aei #> 2: mlr3mbo::mlr_acqfunctions_cb #> 3: mlr3mbo::mlr_acqfunctions_ehvi #> 4: mlr3mbo::mlr_acqfunctions_ehvigh #> 5: mlr3mbo::mlr_acqfunctions_ei #> 6: mlr3mbo::mlr_acqfunctions_eips #> 7: mlr3mbo::mlr_acqfunctions_mean #> 8: mlr3mbo::mlr_acqfunctions_pi #> 9: mlr3mbo::mlr_acqfunctions_sd #> 10: mlr3mbo::mlr_acqfunctions_smsego acqf(\"ei\") #> #> Domain: #> #> Empty. #> Codomain: #> #> Empty."},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_aei.html","id":null,"dir":"Reference","previous_headings":"","what":"Acquisition Function Augmented Expected Improvement — mlr_acqfunctions_aei","title":"Acquisition Function Augmented Expected Improvement — mlr_acqfunctions_aei","text":"Augmented Expected Improvement. Useful working noisy objectives. Currently works correctly \"regr.km\" surrogate model nugget.estim = TRUE given.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_aei.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Acquisition Function Augmented Expected Improvement — mlr_acqfunctions_aei","text":"AcqFunction can instantiated via dictionary mlr_acqfunctions associated sugar function acqf():","code":"mlr_acqfunctions$get(\"aei\") acqf(\"aei\")"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_aei.html","id":"parameters","dir":"Reference","previous_headings":"","what":"Parameters","title":"Acquisition Function Augmented Expected Improvement — mlr_acqfunctions_aei","text":"\"c\" (numeric(1)) Constant \\(c\\) used Formula (14) Huang (2012) reflect degree risk aversion. Defaults 1.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_aei.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Acquisition Function Augmented Expected Improvement — mlr_acqfunctions_aei","text":"Huang D, Allen TT, Notz WI, Zheng N (2012). “Erratum : Global Optimization Stochastic Black-box Systems via Sequential Kriging Meta-Models.” Journal Global Optimization, 54(2), 431–431.","code":""},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_aei.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Acquisition Function Augmented Expected Improvement — mlr_acqfunctions_aei","text":"bbotk::Objective -> mlr3mbo::AcqFunction -> AcqFunctionAEI","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_aei.html","id":"public-fields","dir":"Reference","previous_headings":"","what":"Public fields","title":"Acquisition Function Augmented Expected Improvement — mlr_acqfunctions_aei","text":"y_effective_best (numeric(1)) Best effective objective value observed far. case maximization, already includes necessary change sign. noise_var (numeric(1)) Estimate variance noise. corresponds nugget estimate using mlr3learners surrogate model.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_aei.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Acquisition Function Augmented Expected Improvement — mlr_acqfunctions_aei","text":"bbotk::Objective$eval() bbotk::Objective$format() bbotk::Objective$help() bbotk::Objective$print() mlr3mbo::AcqFunction$eval_dt() mlr3mbo::AcqFunction$eval_many()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_aei.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Acquisition Function Augmented Expected Improvement — mlr_acqfunctions_aei","text":"AcqFunctionAEI$new() AcqFunctionAEI$update() AcqFunctionAEI$clone()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_aei.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Acquisition Function Augmented Expected Improvement — mlr_acqfunctions_aei","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_aei.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function Augmented Expected Improvement — mlr_acqfunctions_aei","text":"","code":"AcqFunctionAEI$new(surrogate = NULL, c = 1)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_aei.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Acquisition Function Augmented Expected Improvement — mlr_acqfunctions_aei","text":"surrogate (NULL | SurrogateLearner). c (numeric(1)).","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_aei.html","id":"method-update-","dir":"Reference","previous_headings":"","what":"Method update()","title":"Acquisition Function Augmented Expected Improvement — mlr_acqfunctions_aei","text":"Updates acquisition function sets y_effective_best noise_var.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_aei.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function Augmented Expected Improvement — mlr_acqfunctions_aei","text":"","code":"AcqFunctionAEI$update()"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_aei.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Acquisition Function Augmented Expected Improvement — mlr_acqfunctions_aei","text":"objects class cloneable method.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_aei.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function Augmented Expected Improvement — mlr_acqfunctions_aei","text":"","code":"AcqFunctionAEI$clone(deep = FALSE)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_aei.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"Acquisition Function Augmented Expected Improvement — mlr_acqfunctions_aei","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_aei.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Acquisition Function Augmented Expected Improvement — mlr_acqfunctions_aei","text":"","code":"if (requireNamespace(\"mlr3learners\") & requireNamespace(\"DiceKriging\") & requireNamespace(\"rgenoud\")) { library(bbotk) library(paradox) library(mlr3learners) library(data.table) set.seed(2906) fun = function(xs) { list(y = xs$x ^ 2 + rnorm(length(xs$x), mean = 0, sd = 1)) } 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, properties = \"noisy\") instance = OptimInstanceBatchSingleCrit$new( objective = objective, terminator = trm(\"evals\", n_evals = 5)) instance$eval_batch(data.table(x = c(-6, -5, 3, 9))) learner = lrn(\"regr.km\", covtype = \"matern5_2\", optim.method = \"gen\", nugget.estim = TRUE, jitter = 1e-12, control = list(trace = FALSE)) surrogate = srlrn(learner, archive = instance$archive) acq_function = acqf(\"aei\", surrogate = surrogate) acq_function$surrogate$update() acq_function$update() acq_function$eval_dt(data.table(x = c(-1, 0, 1))) } #> acq_aei #> #> 1: 7.583607 #> 2: 7.583607 #> 3: 7.583607"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_cb.html","id":null,"dir":"Reference","previous_headings":"","what":"Acquisition Function Confidence Bound — mlr_acqfunctions_cb","title":"Acquisition Function Confidence Bound — mlr_acqfunctions_cb","text":"Lower / Upper Confidence Bound.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_cb.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Acquisition Function Confidence Bound — mlr_acqfunctions_cb","text":"AcqFunction can instantiated via dictionary mlr_acqfunctions associated sugar function acqf():","code":"mlr_acqfunctions$get(\"cb\") acqf(\"cb\")"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_cb.html","id":"parameters","dir":"Reference","previous_headings":"","what":"Parameters","title":"Acquisition Function Confidence Bound — mlr_acqfunctions_cb","text":"\"lambda\" (numeric(1)) \\(\\lambda\\) value used confidence bound. Defaults 2.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_cb.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Acquisition Function Confidence Bound — mlr_acqfunctions_cb","text":"Snoek, Jasper, Larochelle, Hugo, Adams, P R (2012). “Practical Bayesian Optimization Machine Learning Algorithms.” Pereira F, Burges CJC, Bottou L, Weinberger KQ (eds.), Advances Neural Information Processing Systems, volume 25, 2951–2959.","code":""},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_cb.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Acquisition Function Confidence Bound — mlr_acqfunctions_cb","text":"bbotk::Objective -> mlr3mbo::AcqFunction -> AcqFunctionCB","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_cb.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Acquisition Function Confidence Bound — mlr_acqfunctions_cb","text":"bbotk::Objective$eval() bbotk::Objective$format() bbotk::Objective$help() bbotk::Objective$print() mlr3mbo::AcqFunction$eval_dt() mlr3mbo::AcqFunction$eval_many() mlr3mbo::AcqFunction$update()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_cb.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Acquisition Function Confidence Bound — mlr_acqfunctions_cb","text":"AcqFunctionCB$new() AcqFunctionCB$clone()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_cb.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Acquisition Function Confidence Bound — mlr_acqfunctions_cb","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_cb.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function Confidence Bound — mlr_acqfunctions_cb","text":"","code":"AcqFunctionCB$new(surrogate = NULL, lambda = 2)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_cb.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Acquisition Function Confidence Bound — mlr_acqfunctions_cb","text":"surrogate (NULL | SurrogateLearner). lambda (numeric(1)).","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_cb.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Acquisition Function Confidence Bound — mlr_acqfunctions_cb","text":"objects class cloneable method.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_cb.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function Confidence Bound — mlr_acqfunctions_cb","text":"","code":"AcqFunctionCB$clone(deep = FALSE)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_cb.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"Acquisition Function Confidence Bound — mlr_acqfunctions_cb","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_cb.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Acquisition Function Confidence Bound — mlr_acqfunctions_cb","text":"","code":"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))) } #> acq_cb #> #> 1: -55.38831 #> 2: -55.57158 #> 3: -49.63773"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ehvi.html","id":null,"dir":"Reference","previous_headings":"","what":"Acquisition Function Expected Hypervolume Improvement — mlr_acqfunctions_ehvi","title":"Acquisition Function Expected Hypervolume Improvement — mlr_acqfunctions_ehvi","text":"Exact Expected Hypervolume Improvement. Calculates exact expected hypervolume improvement case two objectives. case optimizing two objective functions, AcqFunctionEHVIGH can used. See Emmerich et al. (2016) details.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ehvi.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Acquisition Function Expected Hypervolume Improvement — mlr_acqfunctions_ehvi","text":"Emmerich, Michael, Yang, Kaifeng, Deutz, André, Wang, Hao, Fonseca, M. C (2016). “Multicriteria Generalization Bayesian Global Optimization.” Pardalos, M. P, Zhigljavsky, Anatoly, Žilinskas, Julius (eds.), Advances Stochastic Deterministic Global Optimization, 229–242. Springer International Publishing, Cham.","code":""},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ehvi.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Acquisition Function Expected Hypervolume Improvement — mlr_acqfunctions_ehvi","text":"bbotk::Objective -> mlr3mbo::AcqFunction -> AcqFunctionEHVI","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ehvi.html","id":"public-fields","dir":"Reference","previous_headings":"","what":"Public fields","title":"Acquisition Function Expected Hypervolume Improvement — mlr_acqfunctions_ehvi","text":"ys_front (matrix()) Approximated Pareto front. Sorted first objective. Signs corrected respect assuming minimization objectives. ref_point (numeric()) Reference point. Signs corrected respect assuming minimization objectives. ys_front_augmented (matrix()) Augmented approximated Pareto front. Sorted first objective. Signs corrected respect assuming minimization objectives.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ehvi.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Acquisition Function Expected Hypervolume Improvement — mlr_acqfunctions_ehvi","text":"bbotk::Objective$eval() bbotk::Objective$format() bbotk::Objective$help() bbotk::Objective$print() mlr3mbo::AcqFunction$eval_dt() mlr3mbo::AcqFunction$eval_many()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ehvi.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Acquisition Function Expected Hypervolume Improvement — mlr_acqfunctions_ehvi","text":"AcqFunctionEHVI$new() AcqFunctionEHVI$update() AcqFunctionEHVI$clone()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ehvi.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Acquisition Function Expected Hypervolume Improvement — mlr_acqfunctions_ehvi","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ehvi.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function Expected Hypervolume Improvement — mlr_acqfunctions_ehvi","text":"","code":"AcqFunctionEHVI$new(surrogate = NULL)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ehvi.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Acquisition Function Expected Hypervolume Improvement — mlr_acqfunctions_ehvi","text":"surrogate (NULL | SurrogateLearnerCollection).","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ehvi.html","id":"method-update-","dir":"Reference","previous_headings":"","what":"Method update()","title":"Acquisition Function Expected Hypervolume Improvement — mlr_acqfunctions_ehvi","text":"Updates acquisition function sets ys_front, ref_point.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ehvi.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function Expected Hypervolume Improvement — mlr_acqfunctions_ehvi","text":"","code":"AcqFunctionEHVI$update()"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ehvi.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Acquisition Function Expected Hypervolume Improvement — mlr_acqfunctions_ehvi","text":"objects class cloneable method.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ehvi.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function Expected Hypervolume Improvement — mlr_acqfunctions_ehvi","text":"","code":"AcqFunctionEHVI$clone(deep = FALSE)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ehvi.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"Acquisition Function Expected Hypervolume Improvement — mlr_acqfunctions_ehvi","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ehvi.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Acquisition Function Expected Hypervolume Improvement — mlr_acqfunctions_ehvi","text":"","code":"if (requireNamespace(\"mlr3learners\") & requireNamespace(\"DiceKriging\") & requireNamespace(\"rgenoud\")) { library(bbotk) library(paradox) library(mlr3learners) library(data.table) fun = function(xs) { list(y1 = xs$x^2, y2 = (xs$x - 2) ^ 2) } domain = ps(x = p_dbl(lower = -10, upper = 10)) codomain = ps(y1 = p_dbl(tags = \"minimize\"), y2 = p_dbl(tags = \"minimize\")) objective = ObjectiveRFun$new(fun = fun, domain = domain, codomain = codomain) instance = OptimInstanceBatchMultiCrit$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) acq_function = acqf(\"ehvi\", surrogate = surrogate) acq_function$surrogate$update() acq_function$update() acq_function$eval_dt(data.table(x = c(-1, 0, 1))) } #> acq_ehvi #> #> 1: 206.4260 #> 2: 264.3261 #> 3: 376.3486"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ehvigh.html","id":null,"dir":"Reference","previous_headings":"","what":"Acquisition Function Expected Hypervolume Improvement via Gauss-Hermite Quadrature — mlr_acqfunctions_ehvigh","title":"Acquisition Function Expected Hypervolume Improvement via Gauss-Hermite Quadrature — mlr_acqfunctions_ehvigh","text":"Expected Hypervolume Improvement. Computed via Gauss-Hermite quadrature. case optimizing two objective functions AcqFunctionEHVI preferred.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ehvigh.html","id":"parameters","dir":"Reference","previous_headings":"","what":"Parameters","title":"Acquisition Function Expected Hypervolume Improvement via Gauss-Hermite Quadrature — mlr_acqfunctions_ehvigh","text":"\"k\" (integer(1)) Number nodes per objective used numerical integration via Gauss-Hermite quadrature. Defaults 15. example, two objectives optimized, total number nodes therefore 225 per default. Changing value construction requires call $update() update $gh_data field. \"r\" (numeric(1)) Pruning rate 0 1 determines fraction nodes Gauss-Hermite quadrature rule ignored based weight value (nodes lowest weights ignored). Default 0.2. Changing value construction require call $update().","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ehvigh.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Acquisition Function Expected Hypervolume Improvement via Gauss-Hermite Quadrature — mlr_acqfunctions_ehvigh","text":"Rahat, Alma, Chugh, Tinkle, Fieldsend, Jonathan, Allmendinger, Richard, Miettinen, Kaisa (2022). “Efficient Approximation Expected Hypervolume Improvement using Gauss-Hermit Quadrature.” Rudolph, Günter, Kononova, V. , Aguirre, Hernán, Kerschke, Pascal, Ochoa, Gabriela, Tušar, Tea (eds.), Parallel Problem Solving Nature – PPSN XVII, 90–103.","code":""},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ehvigh.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Acquisition Function Expected Hypervolume Improvement via Gauss-Hermite Quadrature — mlr_acqfunctions_ehvigh","text":"bbotk::Objective -> mlr3mbo::AcqFunction -> AcqFunctionEHVIGH","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ehvigh.html","id":"public-fields","dir":"Reference","previous_headings":"","what":"Public fields","title":"Acquisition Function Expected Hypervolume Improvement via Gauss-Hermite Quadrature — mlr_acqfunctions_ehvigh","text":"ys_front (matrix()) Approximated Pareto front. Signs corrected respect assuming minimization objectives. ref_point (numeric()) Reference point. Signs corrected respect assuming minimization objectives. hypervolume (numeric(1)). Current hypervolume approximated Pareto front respect reference point. gh_data (matrix()) Data required Gauss-Hermite quadrature rule form matrix dimension (k x 2). row corresponds one Gauss-Hermite node (column \"x\") corresponding weight (column \"w\"). Computed via fastGHQuad::gaussHermiteData. Nodes scaled factor sqrt(2) weights normalized sum one constraint.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ehvigh.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Acquisition Function Expected Hypervolume Improvement via Gauss-Hermite Quadrature — mlr_acqfunctions_ehvigh","text":"bbotk::Objective$eval() bbotk::Objective$format() bbotk::Objective$help() bbotk::Objective$print() mlr3mbo::AcqFunction$eval_dt() mlr3mbo::AcqFunction$eval_many()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ehvigh.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Acquisition Function Expected Hypervolume Improvement via Gauss-Hermite Quadrature — mlr_acqfunctions_ehvigh","text":"AcqFunctionEHVIGH$new() AcqFunctionEHVIGH$update() AcqFunctionEHVIGH$clone()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ehvigh.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Acquisition Function Expected Hypervolume Improvement via Gauss-Hermite Quadrature — mlr_acqfunctions_ehvigh","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ehvigh.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function Expected Hypervolume Improvement via Gauss-Hermite Quadrature — mlr_acqfunctions_ehvigh","text":"","code":"AcqFunctionEHVIGH$new(surrogate = NULL, k = 15L, r = 0.2)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ehvigh.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Acquisition Function Expected Hypervolume Improvement via Gauss-Hermite Quadrature — mlr_acqfunctions_ehvigh","text":"surrogate (NULL | SurrogateLearnerCollection). k (integer(1)). r (numeric(1)).","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ehvigh.html","id":"method-update-","dir":"Reference","previous_headings":"","what":"Method update()","title":"Acquisition Function Expected Hypervolume Improvement via Gauss-Hermite Quadrature — mlr_acqfunctions_ehvigh","text":"Updates acquisition function sets ys_front, ref_point, hypervolume, gh_data.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ehvigh.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function Expected Hypervolume Improvement via Gauss-Hermite Quadrature — mlr_acqfunctions_ehvigh","text":"","code":"AcqFunctionEHVIGH$update()"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ehvigh.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Acquisition Function Expected Hypervolume Improvement via Gauss-Hermite Quadrature — mlr_acqfunctions_ehvigh","text":"objects class cloneable method.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ehvigh.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function Expected Hypervolume Improvement via Gauss-Hermite Quadrature — mlr_acqfunctions_ehvigh","text":"","code":"AcqFunctionEHVIGH$clone(deep = FALSE)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ehvigh.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"Acquisition Function Expected Hypervolume Improvement via Gauss-Hermite Quadrature — mlr_acqfunctions_ehvigh","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ehvigh.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Acquisition Function Expected Hypervolume Improvement via Gauss-Hermite Quadrature — mlr_acqfunctions_ehvigh","text":"","code":"if (requireNamespace(\"mlr3learners\") & requireNamespace(\"DiceKriging\") & requireNamespace(\"rgenoud\")) { library(bbotk) library(paradox) library(mlr3learners) library(data.table) fun = function(xs) { list(y1 = xs$x^2, y2 = (xs$x - 2) ^ 2) } domain = ps(x = p_dbl(lower = -10, upper = 10)) codomain = ps(y1 = p_dbl(tags = \"minimize\"), y2 = p_dbl(tags = \"minimize\")) objective = ObjectiveRFun$new(fun = fun, domain = domain, codomain = codomain) instance = OptimInstanceBatchMultiCrit$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) acq_function = acqf(\"ehvigh\", surrogate = surrogate) acq_function$surrogate$update() acq_function$update() acq_function$eval_dt(data.table(x = c(-1, 0, 1))) } #> acq_ehvigh #> #> 1: 136.3082 #> 2: 152.4999 #> 3: 166.7487"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ei.html","id":null,"dir":"Reference","previous_headings":"","what":"Acquisition Function Expected Improvement — mlr_acqfunctions_ei","title":"Acquisition Function Expected Improvement — mlr_acqfunctions_ei","text":"Expected Improvement.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ei.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Acquisition Function Expected Improvement — mlr_acqfunctions_ei","text":"AcqFunction can instantiated via dictionary mlr_acqfunctions associated sugar function acqf():","code":"mlr_acqfunctions$get(\"ei\") acqf(\"ei\")"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ei.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Acquisition Function Expected Improvement — mlr_acqfunctions_ei","text":"Jones, R. D, Schonlau, Matthias, Welch, J. W (1998). “Efficient Global Optimization Expensive Black-Box Functions.” Journal Global optimization, 13(4), 455–492.","code":""},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ei.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Acquisition Function Expected Improvement — mlr_acqfunctions_ei","text":"bbotk::Objective -> mlr3mbo::AcqFunction -> AcqFunctionEI","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ei.html","id":"public-fields","dir":"Reference","previous_headings":"","what":"Public fields","title":"Acquisition Function Expected Improvement — mlr_acqfunctions_ei","text":"y_best (numeric(1)) Best objective function value observed far. case maximization, already includes necessary change sign.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ei.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Acquisition Function Expected Improvement — mlr_acqfunctions_ei","text":"bbotk::Objective$eval() bbotk::Objective$format() bbotk::Objective$help() bbotk::Objective$print() mlr3mbo::AcqFunction$eval_dt() mlr3mbo::AcqFunction$eval_many()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ei.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Acquisition Function Expected Improvement — mlr_acqfunctions_ei","text":"AcqFunctionEI$new() AcqFunctionEI$update() AcqFunctionEI$clone()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ei.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Acquisition Function Expected Improvement — mlr_acqfunctions_ei","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ei.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function Expected Improvement — mlr_acqfunctions_ei","text":"","code":"AcqFunctionEI$new(surrogate = NULL)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ei.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Acquisition Function Expected Improvement — mlr_acqfunctions_ei","text":"surrogate (NULL | SurrogateLearner).","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ei.html","id":"method-update-","dir":"Reference","previous_headings":"","what":"Method update()","title":"Acquisition Function Expected Improvement — mlr_acqfunctions_ei","text":"Updates acquisition function sets y_best.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ei.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function Expected Improvement — mlr_acqfunctions_ei","text":"","code":"AcqFunctionEI$update()"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ei.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Acquisition Function Expected Improvement — mlr_acqfunctions_ei","text":"objects class cloneable method.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ei.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function Expected Improvement — mlr_acqfunctions_ei","text":"","code":"AcqFunctionEI$clone(deep = FALSE)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ei.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"Acquisition Function Expected Improvement — mlr_acqfunctions_ei","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ei.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Acquisition Function Expected Improvement — mlr_acqfunctions_ei","text":"","code":"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(\"ei\", surrogate = surrogate) acq_function$surrogate$update() acq_function$update() acq_function$eval_dt(data.table(x = c(-1, 0, 1))) } #> acq_ei #> #> 1: 4.092188 #> 2: 4.549039 #> 3: 5.037109"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_eips.html","id":null,"dir":"Reference","previous_headings":"","what":"Acquisition Function Expected Improvement Per Second — mlr_acqfunctions_eips","title":"Acquisition Function Expected Improvement Per Second — mlr_acqfunctions_eips","text":"Expected Improvement per Second. assumed calculations performed bbotk::OptimInstanceBatchSingleCrit. Additionally target values codomain minimized maximized, bbotk::Objective bbotk::OptimInstanceBatchSingleCrit return time values. column names target variable time variable must passed cols_y order (target, time) constructing SurrogateLearnerCollection used surrogate.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_eips.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Acquisition Function Expected Improvement Per Second — mlr_acqfunctions_eips","text":"AcqFunction can instantiated via dictionary mlr_acqfunctions associated sugar function acqf():","code":"mlr_acqfunctions$get(\"eips\") acqf(\"eips\")"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_eips.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Acquisition Function Expected Improvement Per Second — mlr_acqfunctions_eips","text":"Snoek, Jasper, Larochelle, Hugo, Adams, P R (2012). “Practical Bayesian Optimization Machine Learning Algorithms.” Pereira F, Burges CJC, Bottou L, Weinberger KQ (eds.), Advances Neural Information Processing Systems, volume 25, 2951–2959.","code":""},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_eips.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Acquisition Function Expected Improvement Per Second — mlr_acqfunctions_eips","text":"bbotk::Objective -> mlr3mbo::AcqFunction -> AcqFunctionEIPS","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_eips.html","id":"public-fields","dir":"Reference","previous_headings":"","what":"Public fields","title":"Acquisition Function Expected Improvement Per Second — mlr_acqfunctions_eips","text":"y_best (numeric(1)) Best objective function value observed far. case maximization, already includes necessary change sign.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_eips.html","id":"active-bindings","dir":"Reference","previous_headings":"","what":"Active bindings","title":"Acquisition Function Expected Improvement Per Second — mlr_acqfunctions_eips","text":"col_y (character(1)). col_time (character(1)).","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_eips.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Acquisition Function Expected Improvement Per Second — mlr_acqfunctions_eips","text":"bbotk::Objective$eval() bbotk::Objective$format() bbotk::Objective$help() bbotk::Objective$print() mlr3mbo::AcqFunction$eval_dt() mlr3mbo::AcqFunction$eval_many()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_eips.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Acquisition Function Expected Improvement Per Second — mlr_acqfunctions_eips","text":"AcqFunctionEIPS$new() AcqFunctionEIPS$update() AcqFunctionEIPS$clone()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_eips.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Acquisition Function Expected Improvement Per Second — mlr_acqfunctions_eips","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_eips.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function Expected Improvement Per Second — mlr_acqfunctions_eips","text":"","code":"AcqFunctionEIPS$new(surrogate = NULL)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_eips.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Acquisition Function Expected Improvement Per Second — mlr_acqfunctions_eips","text":"surrogate (NULL | SurrogateLearnerCollection).","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_eips.html","id":"method-update-","dir":"Reference","previous_headings":"","what":"Method update()","title":"Acquisition Function Expected Improvement Per Second — mlr_acqfunctions_eips","text":"Updates acquisition function sets y_best.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_eips.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function Expected Improvement Per Second — mlr_acqfunctions_eips","text":"","code":"AcqFunctionEIPS$update()"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_eips.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Acquisition Function Expected Improvement Per Second — mlr_acqfunctions_eips","text":"objects class cloneable method.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_eips.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function Expected Improvement Per Second — mlr_acqfunctions_eips","text":"","code":"AcqFunctionEIPS$clone(deep = FALSE)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_eips.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"Acquisition Function Expected Improvement Per Second — mlr_acqfunctions_eips","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_eips.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Acquisition Function Expected Improvement Per Second — mlr_acqfunctions_eips","text":"","code":"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 #> #> 1: 4.401246 #> 2: 4.864655 #> 3: 5.297142"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_mean.html","id":null,"dir":"Reference","previous_headings":"","what":"Acquisition Function Mean — mlr_acqfunctions_mean","title":"Acquisition Function Mean — mlr_acqfunctions_mean","text":"Posterior Mean.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_mean.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Acquisition Function Mean — mlr_acqfunctions_mean","text":"AcqFunction can instantiated via dictionary mlr_acqfunctions associated sugar function acqf():","code":"mlr_acqfunctions$get(\"mean\") acqf(\"mean\")"},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_mean.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Acquisition Function Mean — mlr_acqfunctions_mean","text":"bbotk::Objective -> mlr3mbo::AcqFunction -> AcqFunctionMean","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_mean.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Acquisition Function Mean — mlr_acqfunctions_mean","text":"bbotk::Objective$eval() bbotk::Objective$format() bbotk::Objective$help() bbotk::Objective$print() mlr3mbo::AcqFunction$eval_dt() mlr3mbo::AcqFunction$eval_many() mlr3mbo::AcqFunction$update()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_mean.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Acquisition Function Mean — mlr_acqfunctions_mean","text":"AcqFunctionMean$new() AcqFunctionMean$clone()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_mean.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Acquisition Function Mean — mlr_acqfunctions_mean","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_mean.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function Mean — mlr_acqfunctions_mean","text":"","code":"AcqFunctionMean$new(surrogate = NULL)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_mean.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Acquisition Function Mean — mlr_acqfunctions_mean","text":"surrogate (NULL | SurrogateLearner).","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_mean.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Acquisition Function Mean — mlr_acqfunctions_mean","text":"objects class cloneable method.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_mean.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function Mean — mlr_acqfunctions_mean","text":"","code":"AcqFunctionMean$clone(deep = FALSE)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_mean.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"Acquisition Function Mean — mlr_acqfunctions_mean","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_mean.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Acquisition Function Mean — mlr_acqfunctions_mean","text":"","code":"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(\"mean\", surrogate = surrogate) acq_function$surrogate$update() acq_function$update() acq_function$eval_dt(data.table(x = c(-1, 0, 1))) } #> acq_mean #> #> 1: 25.87163 #> 2: 23.23378 #> 3: 17.57580"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_pi.html","id":null,"dir":"Reference","previous_headings":"","what":"Acquisition Function Probability of Improvement — mlr_acqfunctions_pi","title":"Acquisition Function Probability of Improvement — mlr_acqfunctions_pi","text":"Probability Improvement.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_pi.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Acquisition Function Probability of Improvement — mlr_acqfunctions_pi","text":"AcqFunction can instantiated via dictionary mlr_acqfunctions associated sugar function acqf():","code":"mlr_acqfunctions$get(\"pi\") acqf(\"pi\")"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_pi.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Acquisition Function Probability of Improvement — mlr_acqfunctions_pi","text":"Kushner, J. H (1964). “New Method Locating Maximum Point Arbitrary Multipeak Curve Presence Noise.” Journal Basic Engineering, 86(1), 97–106.","code":""},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_pi.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Acquisition Function Probability of Improvement — mlr_acqfunctions_pi","text":"bbotk::Objective -> mlr3mbo::AcqFunction -> AcqFunctionPI","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_pi.html","id":"public-fields","dir":"Reference","previous_headings":"","what":"Public fields","title":"Acquisition Function Probability of Improvement — mlr_acqfunctions_pi","text":"y_best (numeric(1)) Best objective function value observed far. case maximization, already includes necessary change sign.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_pi.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Acquisition Function Probability of Improvement — mlr_acqfunctions_pi","text":"bbotk::Objective$eval() bbotk::Objective$format() bbotk::Objective$help() bbotk::Objective$print() mlr3mbo::AcqFunction$eval_dt() mlr3mbo::AcqFunction$eval_many()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_pi.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Acquisition Function Probability of Improvement — mlr_acqfunctions_pi","text":"AcqFunctionPI$new() AcqFunctionPI$update() AcqFunctionPI$clone()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_pi.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Acquisition Function Probability of Improvement — mlr_acqfunctions_pi","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_pi.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function Probability of Improvement — mlr_acqfunctions_pi","text":"","code":"AcqFunctionPI$new(surrogate = NULL)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_pi.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Acquisition Function Probability of Improvement — mlr_acqfunctions_pi","text":"surrogate (NULL | SurrogateLearner).","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_pi.html","id":"method-update-","dir":"Reference","previous_headings":"","what":"Method update()","title":"Acquisition Function Probability of Improvement — mlr_acqfunctions_pi","text":"Updates acquisition function sets y_best.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_pi.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function Probability of Improvement — mlr_acqfunctions_pi","text":"","code":"AcqFunctionPI$update()"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_pi.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Acquisition Function Probability of Improvement — mlr_acqfunctions_pi","text":"objects class cloneable method.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_pi.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function Probability of Improvement — mlr_acqfunctions_pi","text":"","code":"AcqFunctionPI$clone(deep = FALSE)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_pi.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"Acquisition Function Probability of Improvement — mlr_acqfunctions_pi","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_pi.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Acquisition Function Probability of Improvement — mlr_acqfunctions_pi","text":"","code":"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 #> #> 1: 0.2666736 #> 2: 0.2939486 #> 3: 0.3509359"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_sd.html","id":null,"dir":"Reference","previous_headings":"","what":"Acquisition Function Standard Deviation — mlr_acqfunctions_sd","title":"Acquisition Function Standard Deviation — mlr_acqfunctions_sd","text":"Posterior Standard Deviation.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_sd.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Acquisition Function Standard Deviation — mlr_acqfunctions_sd","text":"AcqFunction can instantiated via dictionary mlr_acqfunctions associated sugar function acqf():","code":"mlr_acqfunctions$get(\"sd\") acqf(\"sd\")"},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_sd.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Acquisition Function Standard Deviation — mlr_acqfunctions_sd","text":"bbotk::Objective -> mlr3mbo::AcqFunction -> AcqFunctionSD","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_sd.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Acquisition Function Standard Deviation — mlr_acqfunctions_sd","text":"bbotk::Objective$eval() bbotk::Objective$format() bbotk::Objective$help() bbotk::Objective$print() mlr3mbo::AcqFunction$eval_dt() mlr3mbo::AcqFunction$eval_many() mlr3mbo::AcqFunction$update()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_sd.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Acquisition Function Standard Deviation — mlr_acqfunctions_sd","text":"AcqFunctionSD$new() AcqFunctionSD$clone()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_sd.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Acquisition Function Standard Deviation — mlr_acqfunctions_sd","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_sd.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function Standard Deviation — mlr_acqfunctions_sd","text":"","code":"AcqFunctionSD$new(surrogate = NULL)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_sd.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Acquisition Function Standard Deviation — mlr_acqfunctions_sd","text":"surrogate (NULL | SurrogateLearner).","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_sd.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Acquisition Function Standard Deviation — mlr_acqfunctions_sd","text":"objects class cloneable method.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_sd.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function Standard Deviation — mlr_acqfunctions_sd","text":"","code":"AcqFunctionSD$clone(deep = FALSE)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_sd.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"Acquisition Function Standard Deviation — mlr_acqfunctions_sd","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_sd.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Acquisition Function Standard Deviation — mlr_acqfunctions_sd","text":"","code":"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(\"sd\", surrogate = surrogate) acq_function$surrogate$update() acq_function$update() acq_function$eval_dt(data.table(x = c(-1, 0, 1))) } #> acq_sd #> #> 1: 27.08680 #> 2: 26.26861 #> 3: 22.40464"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_smsego.html","id":null,"dir":"Reference","previous_headings":"","what":"Acquisition Function SMS-EGO — mlr_acqfunctions_smsego","title":"Acquisition Function SMS-EGO — mlr_acqfunctions_smsego","text":"S-Metric Selection Evolutionary Multi-Objective Optimization Algorithm Acquisition Function.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_smsego.html","id":"parameters","dir":"Reference","previous_headings":"","what":"Parameters","title":"Acquisition Function SMS-EGO — mlr_acqfunctions_smsego","text":"\"lambda\" (numeric(1)) \\(\\lambda\\) value used confidence bound. Defaults 1. Based confidence = (1 - 2 * dnorm(lambda)) ^ m can calculate lambda given confidence level, see Ponweiser et al. (2008). \"epsilon\" (numeric(1)) \\(\\epsilon\\) used additive epsilon dominance. Can either single numeric value > 0 NULL (default). case NULL, epsilon vector maintained dynamically described Horn et al. (2015).","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_smsego.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Acquisition Function SMS-EGO — mlr_acqfunctions_smsego","text":"Ponweiser, Wolfgang, Wagner, Tobias, Biermann, Dirk, Vincze, Markus (2008). “Multiobjective Optimization Limited Budget Evaluations Using Model-Assisted S-Metric Selection.” Proceedings 10th International Conference Parallel Problem Solving Nature, 784–794. Horn, Daniel, Wagner, Tobias, Biermann, Dirk, Weihs, Claus, Bischl, Bernd (2015). “Model-Based Multi-objective Optimization: Taxonomy, Multi-Point Proposal, Toolbox Benchmark.” International Conference Evolutionary Multi-Criterion Optimization, 64–78.","code":""},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_smsego.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Acquisition Function SMS-EGO — mlr_acqfunctions_smsego","text":"bbotk::Objective -> mlr3mbo::AcqFunction -> AcqFunctionSmsEgo","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_smsego.html","id":"public-fields","dir":"Reference","previous_headings":"","what":"Public fields","title":"Acquisition Function SMS-EGO — mlr_acqfunctions_smsego","text":"ys_front (matrix()) Approximated Pareto front. Signs corrected respect assuming minimization objectives. ref_point (numeric()) Reference point. Signs corrected respect assuming minimization objectives. epsilon (numeric()) Epsilon used additive epsilon dominance. progress (numeric(1)) Optimization progress (typically, number function evaluations left). Note requires bbotk::OptimInstance terminated via bbotk::TerminatorEvals.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_smsego.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Acquisition Function SMS-EGO — mlr_acqfunctions_smsego","text":"bbotk::Objective$eval() bbotk::Objective$format() bbotk::Objective$help() bbotk::Objective$print() mlr3mbo::AcqFunction$eval_dt() mlr3mbo::AcqFunction$eval_many()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_smsego.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Acquisition Function SMS-EGO — mlr_acqfunctions_smsego","text":"AcqFunctionSmsEgo$new() AcqFunctionSmsEgo$update() AcqFunctionSmsEgo$clone()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_smsego.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Acquisition Function SMS-EGO — mlr_acqfunctions_smsego","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_smsego.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function SMS-EGO — mlr_acqfunctions_smsego","text":"","code":"AcqFunctionSmsEgo$new(surrogate = NULL, lambda = 1, epsilon = NULL)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_smsego.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Acquisition Function SMS-EGO — mlr_acqfunctions_smsego","text":"surrogate (NULL | SurrogateLearnerCollection). lambda (numeric(1)). epsilon (NULL | numeric(1)).","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_smsego.html","id":"method-update-","dir":"Reference","previous_headings":"","what":"Method update()","title":"Acquisition Function SMS-EGO — mlr_acqfunctions_smsego","text":"Updates acquisition function sets ys_front, ref_point, epsilon.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_smsego.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function SMS-EGO — mlr_acqfunctions_smsego","text":"","code":"AcqFunctionSmsEgo$update()"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_smsego.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Acquisition Function SMS-EGO — mlr_acqfunctions_smsego","text":"objects class cloneable method.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_smsego.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function SMS-EGO — mlr_acqfunctions_smsego","text":"","code":"AcqFunctionSmsEgo$clone(deep = FALSE)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_smsego.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"Acquisition Function SMS-EGO — mlr_acqfunctions_smsego","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_smsego.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Acquisition Function SMS-EGO — mlr_acqfunctions_smsego","text":"","code":"if (requireNamespace(\"mlr3learners\") & requireNamespace(\"DiceKriging\") & requireNamespace(\"rgenoud\")) { library(bbotk) library(paradox) library(mlr3learners) library(data.table) fun = function(xs) { list(y1 = xs$x^2, y2 = (xs$x - 2) ^ 2) } domain = ps(x = p_dbl(lower = -10, upper = 10)) codomain = ps(y1 = p_dbl(tags = \"minimize\"), y2 = p_dbl(tags = \"minimize\")) objective = ObjectiveRFun$new(fun = fun, domain = domain, codomain = codomain) instance = OptimInstanceBatchMultiCrit$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) acq_function = acqf(\"smsego\", surrogate = surrogate) acq_function$surrogate$update() acq_function$progress = 5 - 4 # n_evals = 5 and 4 points already evaluated acq_function$update() acq_function$eval_dt(data.table(x = c(-1, 0, 1))) } #> acq_smsego #> #> 1: -581.3215 #> 2: -730.5539 #> 3: -1132.2505"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions.html","id":null,"dir":"Reference","previous_headings":"","what":"Dictionary of Loop Functions — mlr_loop_functions","title":"Dictionary of Loop Functions — mlr_loop_functions","text":"simple mlr3misc::Dictionary storing objects class loop_function. loop function associated help page, see mlr_loop_functions_[id]. Retrieves object key key dictionary. Additional arguments must named passed constructor stored object.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Dictionary of Loop Functions — mlr_loop_functions","text":"R6::R6Class object inheriting mlr3misc::Dictionary.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Dictionary of Loop Functions — mlr_loop_functions","text":"key (character(1)). ... () Passed constructor.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Dictionary of Loop Functions — mlr_loop_functions","text":"Object corresponding key.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Dictionary of Loop Functions — mlr_loop_functions","text":"See mlr3misc::Dictionary.","code":""},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Dictionary of Loop Functions — mlr_loop_functions","text":"","code":"library(data.table) as.data.table(mlr_loop_functions) #> Key: #> key label instance #> #> 1: bayesopt_ego Efficient Global Optimization single-crit #> 2: bayesopt_emo Multi-Objective EGO multi-crit #> 3: bayesopt_mpcl Multipoint Constant Liar single-crit #> 4: bayesopt_parego ParEGO multi-crit #> 5: bayesopt_smsego SMS-EGO multi-crit #> man #> #> 1: mlr3mbo::mlr_loop_functions_ego #> 2: mlr3mbo::mlr_loop_functions_emo #> 3: mlr3mbo::mlr_loop_functions_mpcl #> 4: mlr3mbo::mlr_loop_functions_parego #> 5: mlr3mbo::mlr_loop_functions_smsego"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions_ego.html","id":null,"dir":"Reference","previous_headings":"","what":"Sequential Single-Objective Bayesian Optimization — mlr_loop_functions_ego","title":"Sequential Single-Objective Bayesian Optimization — mlr_loop_functions_ego","text":"Loop function sequential single-objective Bayesian Optimization. Normally used inside OptimizerMbo. iteration initial design, surrogate acquisition function updated next candidate chosen based optimizing acquisition function.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions_ego.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sequential Single-Objective Bayesian Optimization — mlr_loop_functions_ego","text":"","code":"bayesopt_ego( instance, surrogate, acq_function, acq_optimizer, init_design_size = NULL, random_interleave_iter = 0L )"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions_ego.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sequential Single-Objective Bayesian Optimization — mlr_loop_functions_ego","text":"instance (bbotk::OptimInstanceBatchSingleCrit) bbotk::OptimInstanceBatchSingleCrit optimized. surrogate (Surrogate)Surrogate used surrogate. Typically SurrogateLearner. acq_function (AcqFunction)AcqFunction used acquisition function. acq_optimizer (AcqOptimizer)AcqOptimizer used acquisition function optimizer. init_design_size (NULL | integer(1)) Size initial design. NULL bbotk::Archive contains evaluations, 4 * d used d dimensionality search space. Points generated via Sobol sequence. random_interleave_iter (integer(1)) Every random_interleave_iter iteration (starting initial design), point sampled uniformly random evaluated (instead model based proposal). example, random_interleave_iter = 2, random interleaving performed second, fourth, sixth, ... iteration. Default 0, .e., random interleaving performed .","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions_ego.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sequential Single-Objective Bayesian Optimization — mlr_loop_functions_ego","text":"invisible(instance) original instance modified -place returned invisible.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions_ego.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Sequential Single-Objective Bayesian Optimization — mlr_loop_functions_ego","text":"acq_function$surrogate, even already populated, always overwritten surrogate. acq_optimizer$acq_function, even already populated, always overwritten acq_function. surrogate$archive, even already populated, always overwritten bbotk::Archive bbotk::OptimInstanceBatchSingleCrit.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions_ego.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Sequential Single-Objective Bayesian Optimization — mlr_loop_functions_ego","text":"Jones, R. D, Schonlau, Matthias, Welch, J. W (1998). “Efficient Global Optimization Expensive Black-Box Functions.” Journal Global optimization, 13(4), 455–492. Snoek, Jasper, Larochelle, Hugo, Adams, P R (2012). “Practical Bayesian Optimization Machine Learning Algorithms.” Pereira F, Burges CJC, Bottou L, Weinberger KQ (eds.), Advances Neural Information Processing Systems, volume 25, 2951–2959.","code":""},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions_ego.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sequential Single-Objective Bayesian Optimization — mlr_loop_functions_ego","text":"","code":"# \\donttest{ if (requireNamespace(\"mlr3learners\") & requireNamespace(\"DiceKriging\") & requireNamespace(\"rgenoud\")) { library(bbotk) library(paradox) library(mlr3learners) 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)) surrogate = default_surrogate(instance) acq_function = acqf(\"ei\") acq_optimizer = acqo( optimizer = opt(\"random_search\", batch_size = 100), terminator = trm(\"evals\", n_evals = 100)) optimizer = opt(\"mbo\", loop_function = bayesopt_ego, surrogate = surrogate, acq_function = acq_function, acq_optimizer = acq_optimizer) optimizer$optimize(instance) # expected improvement per second example 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)) surrogate = default_surrogate(instance, n_learner = 2) surrogate$cols_y = c(\"y\", \"time\") optimizer = opt(\"mbo\", loop_function = bayesopt_ego, surrogate = surrogate, acq_function = acqf(\"eips\"), acq_optimizer = acq_optimizer) optimizer$optimize(instance) } #> x x_domain y #> #> 1: 0.5609628 0.3146792 # }"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions_emo.html","id":null,"dir":"Reference","previous_headings":"","what":"Sequential Multi-Objective Bayesian Optimization — mlr_loop_functions_emo","title":"Sequential Multi-Objective Bayesian Optimization — mlr_loop_functions_emo","text":"Loop function sequential multi-objective Bayesian Optimization. Normally used inside OptimizerMbo. conceptual counterpart mlr_loop_functions_ego. iteration initial design, surrogate acquisition function updated next candidate chosen based optimizing acquisition function.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions_emo.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sequential Multi-Objective Bayesian Optimization — mlr_loop_functions_emo","text":"","code":"bayesopt_emo( instance, surrogate, acq_function, acq_optimizer, init_design_size = NULL, random_interleave_iter = 0L )"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions_emo.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sequential Multi-Objective Bayesian Optimization — mlr_loop_functions_emo","text":"instance (bbotk::OptimInstanceBatchMultiCrit) bbotk::OptimInstanceBatchMultiCrit optimized. surrogate (SurrogateLearnerCollection)SurrogateLearnerCollection used surrogate. acq_function (AcqFunction)AcqFunction used acquisition function. acq_optimizer (AcqOptimizer)AcqOptimizer used acquisition function optimizer. init_design_size (NULL | integer(1)) Size initial design. NULL bbotk::Archive contains evaluations, 4 * d used d dimensionality search space. Points generated via Sobol sequence. random_interleave_iter (integer(1)) Every random_interleave_iter iteration (starting initial design), point sampled uniformly random evaluated (instead model based proposal). example, random_interleave_iter = 2, random interleaving performed second, fourth, sixth, ... iteration. Default 0, .e., random interleaving performed .","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions_emo.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sequential Multi-Objective Bayesian Optimization — mlr_loop_functions_emo","text":"invisible(instance) original instance modified -place returned invisible.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions_emo.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Sequential Multi-Objective Bayesian Optimization — mlr_loop_functions_emo","text":"acq_function$surrogate, even already populated, always overwritten surrogate. acq_optimizer$acq_function, even already populated, always overwritten acq_function. surrogate$archive, even already populated, always overwritten bbotk::Archive bbotk::OptimInstanceBatchMultiCrit.","code":""},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions_emo.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sequential Multi-Objective Bayesian Optimization — mlr_loop_functions_emo","text":"","code":"# \\donttest{ if (requireNamespace(\"mlr3learners\") & requireNamespace(\"DiceKriging\") & requireNamespace(\"rgenoud\")) { library(bbotk) library(paradox) library(mlr3learners) fun = function(xs) { list(y1 = xs$x^2, y2 = (xs$x - 2) ^ 2) } domain = ps(x = p_dbl(lower = -10, upper = 10)) codomain = ps(y1 = p_dbl(tags = \"minimize\"), y2 = p_dbl(tags = \"minimize\")) objective = ObjectiveRFun$new(fun = fun, domain = domain, codomain = codomain) instance = OptimInstanceBatchMultiCrit$new( objective = objective, terminator = trm(\"evals\", n_evals = 5)) surrogate = default_surrogate(instance) acq_function = acqf(\"ehvi\") acq_optimizer = acqo( optimizer = opt(\"random_search\", batch_size = 100), terminator = trm(\"evals\", n_evals = 100)) optimizer = opt(\"mbo\", loop_function = bayesopt_emo, surrogate = surrogate, acq_function = acq_function, acq_optimizer = acq_optimizer) optimizer$optimize(instance) } #> x x_domain y1 y2 #> #> 1: 1.8995202 3.60817683 0.0100962 #> 2: 0.2245765 0.05043458 3.1521288 # }"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions_mpcl.html","id":null,"dir":"Reference","previous_headings":"","what":"Single-Objective Bayesian Optimization via Multipoint Constant Liar — mlr_loop_functions_mpcl","title":"Single-Objective Bayesian Optimization via Multipoint Constant Liar — mlr_loop_functions_mpcl","text":"Loop function single-objective Bayesian Optimization via multipoint constant liar. Normally used inside OptimizerMbo. iteration initial design, surrogate acquisition function updated. acquisition function optimized, find candidate instead evaluating candidate, objective function value obtained applying liar function previously obtained objective function values. repeated q - 1 times obtain total q candidates evaluated single batch.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions_mpcl.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Single-Objective Bayesian Optimization via Multipoint Constant Liar — mlr_loop_functions_mpcl","text":"","code":"bayesopt_mpcl( instance, surrogate, acq_function, acq_optimizer, init_design_size = NULL, q = 2L, liar = mean, random_interleave_iter = 0L )"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions_mpcl.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Single-Objective Bayesian Optimization via Multipoint Constant Liar — mlr_loop_functions_mpcl","text":"instance (bbotk::OptimInstanceBatchSingleCrit) bbotk::OptimInstanceBatchSingleCrit optimized. surrogate (Surrogate)Surrogate used surrogate. Typically SurrogateLearner. acq_function (AcqFunction)AcqFunction used acquisition function. acq_optimizer (AcqOptimizer)AcqOptimizer used acquisition function optimizer. init_design_size (NULL | integer(1)) Size initial design. NULL bbotk::Archive contains evaluations, 4 * d used d dimensionality search space. Points generated via Sobol sequence. q (integer(1)) Batch size > 1. Default 2. liar (function) function accepting numeric vector input returning single numeric output. Default mean. sensible functions include min (max, depending optimization direction). random_interleave_iter (integer(1)) Every random_interleave_iter iteration (starting initial design), point sampled uniformly random evaluated (instead model based proposal). example, random_interleave_iter = 2, random interleaving performed second, fourth, sixth, ... iteration. Default 0, .e., random interleaving performed .","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions_mpcl.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Single-Objective Bayesian Optimization via Multipoint Constant Liar — mlr_loop_functions_mpcl","text":"invisible(instance) original instance modified -place returned invisible.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions_mpcl.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Single-Objective Bayesian Optimization via Multipoint Constant Liar — mlr_loop_functions_mpcl","text":"acq_function$surrogate, even already populated, always overwritten surrogate. acq_optimizer$acq_function, even already populated, always overwritten acq_function. surrogate$archive, even already populated, always overwritten bbotk::Archive bbotk::OptimInstanceBatchSingleCrit. make use parallel evaluations case `q > 1, objective function bbotk::OptimInstanceBatchSingleCrit must implemented accordingly.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions_mpcl.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Single-Objective Bayesian Optimization via Multipoint Constant Liar — mlr_loop_functions_mpcl","text":"Ginsbourger, David, Le Riche, Rodolphe, Carraro, Laurent (2008). “Multi-Points Criterion Deterministic Parallel Global Optimization Based Gaussian Processes.” Wang, Jialei, Clark, C. S, Liu, Eric, Frazier, . P (2020). “Parallel Bayesian Global Optimization Expensive Functions.” Operations Research, 68(6), 1850–1865.","code":""},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions_mpcl.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Single-Objective Bayesian Optimization via Multipoint Constant Liar — mlr_loop_functions_mpcl","text":"","code":"# \\donttest{ if (requireNamespace(\"mlr3learners\") & requireNamespace(\"DiceKriging\") & requireNamespace(\"rgenoud\")) { library(bbotk) library(paradox) library(mlr3learners) 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 = 7)) surrogate = default_surrogate(instance) acq_function = acqf(\"ei\") acq_optimizer = acqo( optimizer = opt(\"random_search\", batch_size = 100), terminator = trm(\"evals\", n_evals = 100)) optimizer = opt(\"mbo\", loop_function = bayesopt_mpcl, surrogate = surrogate, acq_function = acq_function, acq_optimizer = acq_optimizer, args = list(q = 3)) optimizer$optimize(instance) } #> x x_domain y #> #> 1: 0.1046131 0.01094391 # }"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions_parego.html","id":null,"dir":"Reference","previous_headings":"","what":"Multi-Objective Bayesian Optimization via ParEGO — mlr_loop_functions_parego","title":"Multi-Objective Bayesian Optimization via ParEGO — mlr_loop_functions_parego","text":"Loop function multi-objective Bayesian Optimization via ParEGO. Normally used inside OptimizerMbo. iteration initial design, observed objective function values normalized q candidates obtained scalarizing values via augmented Tchebycheff function, updating surrogate respect scalarized values optimizing acquisition function.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions_parego.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Multi-Objective Bayesian Optimization via ParEGO — mlr_loop_functions_parego","text":"","code":"bayesopt_parego( instance, surrogate, acq_function, acq_optimizer, init_design_size = NULL, q = 1L, s = 100L, rho = 0.05, random_interleave_iter = 0L )"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions_parego.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Multi-Objective Bayesian Optimization via ParEGO — mlr_loop_functions_parego","text":"instance (bbotk::OptimInstanceBatchMultiCrit) bbotk::OptimInstanceBatchMultiCrit optimized. surrogate (SurrogateLearner)SurrogateLearner used surrogate. acq_function (AcqFunction)AcqFunction used acquisition function. acq_optimizer (AcqOptimizer)AcqOptimizer used acquisition function optimizer. init_design_size (NULL | integer(1)) Size initial design. NULL bbotk::Archive contains evaluations, 4 * d used d dimensionality search space. Points generated via Sobol sequence. q (integer(1)) Batch size, .e., number candidates obtained single batch. Default 1. s (integer(1)) \\(s\\) Equation 1 Knowles (2006). Determines total number possible random weight vectors. Default 100. rho (numeric(1)) \\(\\rho\\) Equation 2 Knowles (2006) scaling linear part augmented Tchebycheff function. Default 0.05 random_interleave_iter (integer(1)) Every random_interleave_iter iteration (starting initial design), point sampled uniformly random evaluated (instead model based proposal). example, random_interleave_iter = 2, random interleaving performed second, fourth, sixth, ... iteration. Default 0, .e., random interleaving performed .","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions_parego.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Multi-Objective Bayesian Optimization via ParEGO — mlr_loop_functions_parego","text":"invisible(instance) original instance modified -place returned invisible.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions_parego.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Multi-Objective Bayesian Optimization via ParEGO — mlr_loop_functions_parego","text":"acq_function$surrogate, even already populated, always overwritten surrogate. acq_optimizer$acq_function, even already populated, always overwritten acq_function. surrogate$archive, even already populated, always overwritten bbotk::Archive bbotk::OptimInstanceBatchMultiCrit. scalarizations objective function values stored y_scal column bbotk::Archive bbotk::OptimInstanceBatchMultiCrit. make use parallel evaluations case `q > 1, objective function bbotk::OptimInstanceBatchMultiCrit must implemented accordingly.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions_parego.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Multi-Objective Bayesian Optimization via ParEGO — mlr_loop_functions_parego","text":"Knowles, Joshua (2006). “ParEGO: Hybrid Algorithm -Line Landscape Approximation Expensive Multiobjective Optimization Problems.” IEEE Transactions Evolutionary Computation, 10(1), 50–66.","code":""},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions_parego.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Multi-Objective Bayesian Optimization via ParEGO — mlr_loop_functions_parego","text":"","code":"# \\donttest{ if (requireNamespace(\"mlr3learners\") & requireNamespace(\"DiceKriging\") & requireNamespace(\"rgenoud\")) { library(bbotk) library(paradox) library(mlr3learners) fun = function(xs) { list(y1 = xs$x^2, y2 = (xs$x - 2) ^ 2) } domain = ps(x = p_dbl(lower = -10, upper = 10)) codomain = ps(y1 = p_dbl(tags = \"minimize\"), y2 = p_dbl(tags = \"minimize\")) objective = ObjectiveRFun$new(fun = fun, domain = domain, codomain = codomain) instance = OptimInstanceBatchMultiCrit$new( objective = objective, terminator = trm(\"evals\", n_evals = 5)) surrogate = default_surrogate(instance, n_learner = 1) acq_function = acqf(\"ei\") acq_optimizer = acqo( optimizer = opt(\"random_search\", batch_size = 100), terminator = trm(\"evals\", n_evals = 100)) optimizer = opt(\"mbo\", loop_function = bayesopt_parego, surrogate = surrogate, acq_function = acq_function, acq_optimizer = acq_optimizer) optimizer$optimize(instance) } #> WARN [16:36:54.027] [bbotk] Task 'surrogate_task' has missing values in column(s) 'y_scal', but learner 'regr.km' does not support this #> WARN [16:36:54.055] [bbotk] Could not update the surrogate a final time after the optimization process has terminated. #> x x_domain y1 y2 #> #> 1: 1.134356 1.286764 0.7493391 #> 2: 1.467836 2.154544 0.2831980 # }"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions_smsego.html","id":null,"dir":"Reference","previous_headings":"","what":"Sequential Multi-Objective Bayesian Optimization via SMS-EGO — mlr_loop_functions_smsego","title":"Sequential Multi-Objective Bayesian Optimization via SMS-EGO — mlr_loop_functions_smsego","text":"Loop function sequential multi-objective Bayesian Optimization via SMS-EGO. Normally used inside OptimizerMbo. iteration initial design, surrogate acquisition function (mlr_acqfunctions_smsego) updated next candidate chosen based optimizing acquisition function.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions_smsego.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sequential Multi-Objective Bayesian Optimization via SMS-EGO — mlr_loop_functions_smsego","text":"","code":"bayesopt_smsego( instance, surrogate, acq_function, acq_optimizer, init_design_size = NULL, random_interleave_iter = 0L )"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions_smsego.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sequential Multi-Objective Bayesian Optimization via SMS-EGO — mlr_loop_functions_smsego","text":"instance (bbotk::OptimInstanceBatchMultiCrit) bbotk::OptimInstanceBatchMultiCrit optimized. surrogate (SurrogateLearnerCollection)SurrogateLearnerCollection used surrogate. acq_function (mlr_acqfunctions_smsego)mlr_acqfunctions_smsego used acquisition function. acq_optimizer (AcqOptimizer)AcqOptimizer used acquisition function optimizer. init_design_size (NULL | integer(1)) Size initial design. NULL bbotk::Archive contains evaluations, 4 * d used d dimensionality search space. Points generated via Sobol sequence. random_interleave_iter (integer(1)) Every random_interleave_iter iteration (starting initial design), point sampled uniformly random evaluated (instead model based proposal). example, random_interleave_iter = 2, random interleaving performed second, fourth, sixth, ... iteration. Default 0, .e., random interleaving performed .","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions_smsego.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sequential Multi-Objective Bayesian Optimization via SMS-EGO — mlr_loop_functions_smsego","text":"invisible(instance) original instance modified -place returned invisible.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions_smsego.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Sequential Multi-Objective Bayesian Optimization via SMS-EGO — mlr_loop_functions_smsego","text":"acq_function$surrogate, even already populated, always overwritten surrogate. acq_optimizer$acq_function, even already populated, always overwritten acq_function. surrogate$archive, even already populated, always overwritten bbotk::Archive bbotk::OptimInstanceBatchMultiCrit. Due iterative computation epsilon within mlr_acqfunctions_smsego, requires bbotk::Terminator bbotk::OptimInstanceBatchMultiCrit bbotk::TerminatorEvals.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions_smsego.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Sequential Multi-Objective Bayesian Optimization via SMS-EGO — mlr_loop_functions_smsego","text":"Beume N, Naujoks B, Emmerich M (2007). “SMS-EMOA: Multiobjective selection based dominated hypervolume.” European Journal Operational Research, 181(3), 1653–1669. Ponweiser, Wolfgang, Wagner, Tobias, Biermann, Dirk, Vincze, Markus (2008). “Multiobjective Optimization Limited Budget Evaluations Using Model-Assisted S-Metric Selection.” Proceedings 10th International Conference Parallel Problem Solving Nature, 784–794.","code":""},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions_smsego.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sequential Multi-Objective Bayesian Optimization via SMS-EGO — mlr_loop_functions_smsego","text":"","code":"# \\donttest{ if (requireNamespace(\"mlr3learners\") & requireNamespace(\"DiceKriging\") & requireNamespace(\"rgenoud\")) { library(bbotk) library(paradox) library(mlr3learners) fun = function(xs) { list(y1 = xs$x^2, y2 = (xs$x - 2) ^ 2) } domain = ps(x = p_dbl(lower = -10, upper = 10)) codomain = ps(y1 = p_dbl(tags = \"minimize\"), y2 = p_dbl(tags = \"minimize\")) objective = ObjectiveRFun$new(fun = fun, domain = domain, codomain = codomain) instance = OptimInstanceBatchMultiCrit$new( objective = objective, terminator = trm(\"evals\", n_evals = 5)) surrogate = default_surrogate(instance) acq_function = acqf(\"smsego\") acq_optimizer = acqo( optimizer = opt(\"random_search\", batch_size = 100), terminator = trm(\"evals\", n_evals = 100)) optimizer = opt(\"mbo\", loop_function = bayesopt_smsego, surrogate = surrogate, acq_function = acq_function, acq_optimizer = acq_optimizer) optimizer$optimize(instance) } #> x x_domain y1 y2 #> #> 1: 0.03751159 0.001407119 3.851361 # }"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_optimizers_mbo.html","id":null,"dir":"Reference","previous_headings":"","what":"Model Based Optimization — mlr_optimizers_mbo","title":"Model Based Optimization — mlr_optimizers_mbo","text":"OptimizerMbo class implements Model Based Optimization (MBO). implementation follows modular layout relying loop_function determining MBO flavor used, e.g., bayesopt_ego sequential single-objective Bayesian Optimization, Surrogate, AcqFunction, e.g., mlr_acqfunctions_ei Expected Improvement AcqOptimizer. MBO algorithms iterative optimization algorithms make use continuously updated surrogate model built objective function. optimizing comparably cheap evaluate acquisition function defined surrogate prediction, next candidate chosen evaluation. Detailed descriptions different MBO flavors provided documentation respective loop_function. Termination handled via bbotk::Terminator part bbotk::OptimInstance optimized. Note general Surrogate updated one final time available data optimization process terminated. However, certain scenarios always possible meaningful, e.g., using bayesopt_parego() multi-objective optimization uses surrogate relies scalarization objectives. therefore recommended manually inspect Surrogate optimization used, e.g., visualization purposes make sure properly updated available data. final update Surrogate performed successfully, warning logged.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_optimizers_mbo.html","id":"archive","dir":"Reference","previous_headings":"","what":"Archive","title":"Model Based Optimization — mlr_optimizers_mbo","text":"bbotk::Archive holds following additional columns specific MBO algorithms: [acq_function$id] (numeric(1)) value acquisition function. .already_evaluated (logical(1)) Whether point already evaluated. Depends skip_already_evaluated parameter AcqOptimizer.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_optimizers_mbo.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Model Based Optimization — mlr_optimizers_mbo","text":"bbotk::Optimizer -> bbotk::OptimizerBatch -> OptimizerMbo","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_optimizers_mbo.html","id":"active-bindings","dir":"Reference","previous_headings":"","what":"Active bindings","title":"Model Based Optimization — mlr_optimizers_mbo","text":"loop_function (loop_function | NULL) Loop function determining MBO flavor. surrogate (Surrogate | NULL) surrogate. acq_function (AcqFunction | NULL) acquisition function. acq_optimizer (AcqOptimizer | NULL) acquisition function optimizer. args (named list()) arguments passed loop_function. example, random_interleave_iter. result_assigner (ResultAssigner | NULL) result assigner. param_classes (character()) Supported parameter classes optimizer can optimize. Determined based surrogate acq_optimizer. corresponds values given paradox::ParamSet's $class field. properties (character()) Set properties optimizer. Must subset bbotk_reflections$optimizer_properties. MBO principle flexible default assume optimizer properties. fully initialized, properties determined based loop_function surrogate. packages (character()) Set required packages. warning signaled prior optimization least one packages installed, loaded (attached) later -demand via requireNamespace(). Required packages determined based acq_function, surrogate acq_optimizer.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_optimizers_mbo.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Model Based Optimization — mlr_optimizers_mbo","text":"bbotk::Optimizer$format() bbotk::Optimizer$help() bbotk::OptimizerBatch$optimize()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_optimizers_mbo.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Model Based Optimization — mlr_optimizers_mbo","text":"OptimizerMbo$new() OptimizerMbo$print() OptimizerMbo$reset() OptimizerMbo$clone()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_optimizers_mbo.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Model Based Optimization — mlr_optimizers_mbo","text":"Creates new instance R6 class. surrogate NULL acq_function$surrogate field populated, Surrogate used. Otherwise, default_surrogate(instance) used. acq_function NULL acq_optimizer$acq_function field populated, AcqFunction used (therefore $surrogate populated; see ). Otherwise default_acqfunction(instance) used. acq_optimizer NULL, default_acqoptimizer(instance) used. Even already initialized, surrogate$archive field always overwritten bbotk::Archive current bbotk::OptimInstance optimized. information default values loop_function, surrogate, acq_function acq_optimizer, see ?mbo_defaults.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_optimizers_mbo.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Model Based Optimization — mlr_optimizers_mbo","text":"","code":"OptimizerMbo$new( loop_function = NULL, surrogate = NULL, acq_function = NULL, acq_optimizer = NULL, args = NULL, result_assigner = NULL )"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_optimizers_mbo.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Model Based Optimization — mlr_optimizers_mbo","text":"loop_function (loop_function | NULL) Loop function determining MBO flavor. surrogate (Surrogate | NULL) surrogate. acq_function (AcqFunction | NULL) acquisition function. acq_optimizer (AcqOptimizer | NULL) acquisition function optimizer. args (named list()) arguments passed loop_function. example, random_interleave_iter. result_assigner (ResultAssigner | NULL) result assigner.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_optimizers_mbo.html","id":"method-print-","dir":"Reference","previous_headings":"","what":"Method print()","title":"Model Based Optimization — mlr_optimizers_mbo","text":"Print method.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_optimizers_mbo.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Model Based Optimization — mlr_optimizers_mbo","text":"","code":"OptimizerMbo$print()"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_optimizers_mbo.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Model Based Optimization — mlr_optimizers_mbo","text":"(character()).","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_optimizers_mbo.html","id":"method-reset-","dir":"Reference","previous_headings":"","what":"Method reset()","title":"Model Based Optimization — mlr_optimizers_mbo","text":"Reset optimizer. Sets following fields NULL: loop_function, surrogate, acq_function, acq_optimizer, args, result_assigner","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_optimizers_mbo.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Model Based Optimization — mlr_optimizers_mbo","text":"","code":"OptimizerMbo$reset()"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_optimizers_mbo.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Model Based Optimization — mlr_optimizers_mbo","text":"objects class cloneable method.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_optimizers_mbo.html","id":"usage-3","dir":"Reference","previous_headings":"","what":"Usage","title":"Model Based Optimization — mlr_optimizers_mbo","text":"","code":"OptimizerMbo$clone(deep = FALSE)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_optimizers_mbo.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"Model Based Optimization — mlr_optimizers_mbo","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_optimizers_mbo.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Model Based Optimization — mlr_optimizers_mbo","text":"","code":"# \\donttest{ if (requireNamespace(\"mlr3learners\") & requireNamespace(\"DiceKriging\") & requireNamespace(\"rgenoud\")) { library(bbotk) library(paradox) library(mlr3learners) # single-objective EGO 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)) surrogate = default_surrogate(instance) acq_function = acqf(\"ei\") acq_optimizer = acqo( optimizer = opt(\"random_search\", batch_size = 100), terminator = trm(\"evals\", n_evals = 100)) optimizer = opt(\"mbo\", loop_function = bayesopt_ego, surrogate = surrogate, acq_function = acq_function, acq_optimizer = acq_optimizer) optimizer$optimize(instance) # multi-objective ParEGO fun = function(xs) { list(y1 = xs$x^2, y2 = (xs$x - 2) ^ 2) } domain = ps(x = p_dbl(lower = -10, upper = 10)) codomain = ps(y1 = p_dbl(tags = \"minimize\"), y2 = p_dbl(tags = \"minimize\")) objective = ObjectiveRFun$new(fun = fun, domain = domain, codomain = codomain) instance = OptimInstanceBatchMultiCrit$new( objective = objective, terminator = trm(\"evals\", n_evals = 5)) optimizer = opt(\"mbo\", loop_function = bayesopt_parego, surrogate = surrogate, acq_function = acq_function, acq_optimizer = acq_optimizer) optimizer$optimize(instance) } #> WARN [16:36:55.948] [bbotk] Task 'surrogate_task' has missing values in column(s) 'y_scal', but learner 'regr.km' does not support this #> WARN [16:36:55.949] [bbotk] Could not update the surrogate a final time after the optimization process has terminated. #> x x_domain y1 y2 #> #> 1: 1.816490 3.299635 0.03367603 #> 2: 1.364403 1.861596 0.40398355 # }"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_result_assigners.html","id":null,"dir":"Reference","previous_headings":"","what":"Dictionary of Result Assigners — mlr_result_assigners","title":"Dictionary of Result Assigners — mlr_result_assigners","text":"simple mlr3misc::Dictionary storing objects class ResultAssigner. acquisition function associated help page, see mlr_result_assigners_[id]. convenient way retrieve construct acquisition function, see ras().","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_result_assigners.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Dictionary of Result Assigners — mlr_result_assigners","text":"R6::R6Class object inheriting mlr3misc::Dictionary.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_result_assigners.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Dictionary of Result Assigners — mlr_result_assigners","text":"See mlr3misc::Dictionary.","code":""},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_result_assigners.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Dictionary of Result Assigners — mlr_result_assigners","text":"","code":"library(data.table) as.data.table(mlr_result_assigners) #> Key: #> key label man #> #> 1: archive Archive mlr3mbo::mlr_result_assigners_archive #> 2: surrogate Mean Surrogate Prediction mlr3mbo::mlr_result_assigners_surrogate ras(\"archive\") #> "},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_result_assigners_archive.html","id":null,"dir":"Reference","previous_headings":"","what":"Result Assigner Based on the Archive — mlr_result_assigners_archive","title":"Result Assigner Based on the Archive — mlr_result_assigners_archive","text":"Result assigner chooses final point(s) based evaluations bbotk::Archive. mimics default behavior bbotk::Optimizer.","code":""},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_result_assigners_archive.html","id":"super-class","dir":"Reference","previous_headings":"","what":"Super class","title":"Result Assigner Based on the Archive — mlr_result_assigners_archive","text":"mlr3mbo::ResultAssigner -> ResultAssignerArchive","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_result_assigners_archive.html","id":"active-bindings","dir":"Reference","previous_headings":"","what":"Active bindings","title":"Result Assigner Based on the Archive — mlr_result_assigners_archive","text":"packages (character()) Set required packages. warning signaled least one packages installed, loaded (attached) later -demand via requireNamespace().","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_result_assigners_archive.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Result Assigner Based on the Archive — mlr_result_assigners_archive","text":"mlr3mbo::ResultAssigner$format() mlr3mbo::ResultAssigner$print()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_result_assigners_archive.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Result Assigner Based on the Archive — mlr_result_assigners_archive","text":"ResultAssignerArchive$new() ResultAssignerArchive$assign_result() ResultAssignerArchive$clone()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_result_assigners_archive.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Result Assigner Based on the Archive — mlr_result_assigners_archive","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_result_assigners_archive.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Result Assigner Based on the Archive — mlr_result_assigners_archive","text":"","code":"ResultAssignerArchive$new()"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_result_assigners_archive.html","id":"method-assign-result-","dir":"Reference","previous_headings":"","what":"Method assign_result()","title":"Result Assigner Based on the Archive — mlr_result_assigners_archive","text":"Assigns result, .e., final point(s) instance.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_result_assigners_archive.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Result Assigner Based on the Archive — mlr_result_assigners_archive","text":"","code":"ResultAssignerArchive$assign_result(instance)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_result_assigners_archive.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Result Assigner Based on the Archive — mlr_result_assigners_archive","text":"instance (bbotk::OptimInstanceBatchSingleCrit | bbotk::OptimInstanceBatchMultiCrit) bbotk::OptimInstance final result assigned .","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_result_assigners_archive.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Result Assigner Based on the Archive — mlr_result_assigners_archive","text":"objects class cloneable method.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_result_assigners_archive.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Result Assigner Based on the Archive — mlr_result_assigners_archive","text":"","code":"ResultAssignerArchive$clone(deep = FALSE)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_result_assigners_archive.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"Result Assigner Based on the Archive — mlr_result_assigners_archive","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_result_assigners_archive.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Result Assigner Based on the Archive — mlr_result_assigners_archive","text":"","code":"result_assigner = ras(\"archive\")"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_result_assigners_surrogate.html","id":null,"dir":"Reference","previous_headings":"","what":"Result Assigner Based on a Surrogate Mean Prediction — mlr_result_assigners_surrogate","title":"Result Assigner Based on a Surrogate Mean Prediction — mlr_result_assigners_surrogate","text":"Result assigner chooses final point(s) based surrogate mean prediction evaluated points bbotk::Archive. especially useful case noisy objective functions. case operating bbotk::OptimInstanceBatchMultiCrit SurrogateLearnerCollection must use many learners objective functions.","code":""},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_result_assigners_surrogate.html","id":"super-class","dir":"Reference","previous_headings":"","what":"Super class","title":"Result Assigner Based on a Surrogate Mean Prediction — mlr_result_assigners_surrogate","text":"mlr3mbo::ResultAssigner -> ResultAssignerSurrogate","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_result_assigners_surrogate.html","id":"active-bindings","dir":"Reference","previous_headings":"","what":"Active bindings","title":"Result Assigner Based on a Surrogate Mean Prediction — mlr_result_assigners_surrogate","text":"surrogate (Surrogate | NULL) surrogate. packages (character()) Set required packages. warning signaled least one packages installed, loaded (attached) later -demand via requireNamespace().","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_result_assigners_surrogate.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Result Assigner Based on a Surrogate Mean Prediction — mlr_result_assigners_surrogate","text":"mlr3mbo::ResultAssigner$format() mlr3mbo::ResultAssigner$print()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_result_assigners_surrogate.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Result Assigner Based on a Surrogate Mean Prediction — mlr_result_assigners_surrogate","text":"ResultAssignerSurrogate$new() ResultAssignerSurrogate$assign_result() ResultAssignerSurrogate$clone()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_result_assigners_surrogate.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Result Assigner Based on a Surrogate Mean Prediction — mlr_result_assigners_surrogate","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_result_assigners_surrogate.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Result Assigner Based on a Surrogate Mean Prediction — mlr_result_assigners_surrogate","text":"","code":"ResultAssignerSurrogate$new(surrogate = NULL)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_result_assigners_surrogate.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Result Assigner Based on a Surrogate Mean Prediction — mlr_result_assigners_surrogate","text":"surrogate (Surrogate | NULL) surrogate used predict mean evaluated points.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_result_assigners_surrogate.html","id":"method-assign-result-","dir":"Reference","previous_headings":"","what":"Method assign_result()","title":"Result Assigner Based on a Surrogate Mean Prediction — mlr_result_assigners_surrogate","text":"Assigns result, .e., final point(s) instance. $surrogate NULL, default_surrogate(instance) used also assigned $surrogate.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_result_assigners_surrogate.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Result Assigner Based on a Surrogate Mean Prediction — mlr_result_assigners_surrogate","text":"","code":"ResultAssignerSurrogate$assign_result(instance)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_result_assigners_surrogate.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"Result Assigner Based on a Surrogate Mean Prediction — mlr_result_assigners_surrogate","text":"instance (bbotk::OptimInstanceBatchSingleCrit | bbotk::OptimInstanceBatchMultiCrit) bbotk::OptimInstance final result assigned .","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_result_assigners_surrogate.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Result Assigner Based on a Surrogate Mean Prediction — mlr_result_assigners_surrogate","text":"objects class cloneable method.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_result_assigners_surrogate.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Result Assigner Based on a Surrogate Mean Prediction — mlr_result_assigners_surrogate","text":"","code":"ResultAssignerSurrogate$clone(deep = FALSE)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_result_assigners_surrogate.html","id":"arguments-2","dir":"Reference","previous_headings":"","what":"Arguments","title":"Result Assigner Based on a Surrogate Mean Prediction — mlr_result_assigners_surrogate","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_result_assigners_surrogate.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Result Assigner Based on a Surrogate Mean Prediction — mlr_result_assigners_surrogate","text":"","code":"result_assigner = ras(\"surrogate\")"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_tuners_mbo.html","id":null,"dir":"Reference","previous_headings":"","what":"TunerBatch using Model Based Optimization — mlr_tuners_mbo","title":"TunerBatch using Model Based Optimization — mlr_tuners_mbo","text":"TunerMbo class implements Model Based Optimization (MBO). minimal interface internally passing OptimizerMbo. additional information documentation see OptimizerMbo.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_tuners_mbo.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"TunerBatch using Model Based Optimization — mlr_tuners_mbo","text":"mlr3tuning::Tuner -> mlr3tuning::TunerBatch -> mlr3tuning::TunerBatchFromOptimizerBatch -> TunerMbo","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_tuners_mbo.html","id":"active-bindings","dir":"Reference","previous_headings":"","what":"Active bindings","title":"TunerBatch using Model Based Optimization — mlr_tuners_mbo","text":"loop_function (loop_function | NULL) Loop function determining MBO flavor. surrogate (Surrogate | NULL) surrogate. acq_function (AcqFunction | NULL) acquisition function. acq_optimizer (AcqOptimizer | NULL) acquisition function optimizer. args (named list()) arguments passed loop_function. example, random_interleave_iter. result_assigner (ResultAssigner | NULL) result assigner. param_classes (character()) Supported parameter classes optimizer can optimize. Determined based surrogate acq_optimizer. corresponds values given paradox::ParamSet's $class field. properties (character()) Set properties optimizer. Must subset bbotk_reflections$optimizer_properties. MBO principle flexible default assume optimizer properties. fully initialized, properties determined based loop_function surrogate. packages (character()) Set required packages. warning signaled prior optimization least one packages installed, loaded (attached) later -demand via requireNamespace(). Required packages determined based acq_function, surrogate acq_optimizer.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_tuners_mbo.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"TunerBatch using Model Based Optimization — mlr_tuners_mbo","text":"mlr3tuning::Tuner$format() mlr3tuning::Tuner$help() mlr3tuning::TunerBatchFromOptimizerBatch$optimize()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_tuners_mbo.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"TunerBatch using Model Based Optimization — mlr_tuners_mbo","text":"TunerMbo$new() TunerMbo$print() TunerMbo$reset() TunerMbo$clone()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_tuners_mbo.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"TunerBatch using Model Based Optimization — mlr_tuners_mbo","text":"Creates new instance R6 class. information default values loop_function, surrogate, acq_function acq_optimizer, see ?mbo_defaults. Note parameters simply passed OptimizerMbo respective fields simply (settable) active bindings fields OptimizerMbo.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_tuners_mbo.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"TunerBatch using Model Based Optimization — mlr_tuners_mbo","text":"","code":"TunerMbo$new( loop_function = NULL, surrogate = NULL, acq_function = NULL, acq_optimizer = NULL, args = NULL, result_assigner = NULL )"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_tuners_mbo.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"TunerBatch using Model Based Optimization — mlr_tuners_mbo","text":"loop_function (loop_function | NULL) Loop function determining MBO flavor. surrogate (Surrogate | NULL) surrogate. acq_function (AcqFunction | NULL) acquisition function. acq_optimizer (AcqOptimizer | NULL) acquisition function optimizer. args (named list()) arguments passed loop_function. example, random_interleave_iter. result_assigner (ResultAssigner | NULL) result assigner.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_tuners_mbo.html","id":"method-print-","dir":"Reference","previous_headings":"","what":"Method print()","title":"TunerBatch using Model Based Optimization — mlr_tuners_mbo","text":"Print method.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_tuners_mbo.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"TunerBatch using Model Based Optimization — mlr_tuners_mbo","text":"","code":"TunerMbo$print()"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_tuners_mbo.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"TunerBatch using Model Based Optimization — mlr_tuners_mbo","text":"(character()).","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_tuners_mbo.html","id":"method-reset-","dir":"Reference","previous_headings":"","what":"Method reset()","title":"TunerBatch using Model Based Optimization — mlr_tuners_mbo","text":"Reset tuner. Sets following fields NULL: loop_function, surrogate, acq_function, acq_optimizer, args, result_assigner","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_tuners_mbo.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"TunerBatch using Model Based Optimization — mlr_tuners_mbo","text":"","code":"TunerMbo$reset()"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_tuners_mbo.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"TunerBatch using Model Based Optimization — mlr_tuners_mbo","text":"objects class cloneable method.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_tuners_mbo.html","id":"usage-3","dir":"Reference","previous_headings":"","what":"Usage","title":"TunerBatch using Model Based Optimization — mlr_tuners_mbo","text":"","code":"TunerMbo$clone(deep = FALSE)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_tuners_mbo.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"TunerBatch using Model Based Optimization — mlr_tuners_mbo","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_tuners_mbo.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"TunerBatch using Model Based Optimization — mlr_tuners_mbo","text":"","code":"# \\donttest{ if (requireNamespace(\"mlr3learners\") & requireNamespace(\"DiceKriging\") & requireNamespace(\"rgenoud\")) { library(mlr3) library(mlr3tuning) # single-objective task = tsk(\"wine\") learner = lrn(\"classif.rpart\", cp = to_tune(lower = 1e-4, upper = 1, logscale = TRUE)) resampling = rsmp(\"cv\", folds = 3) measure = msr(\"classif.acc\") instance = TuningInstanceBatchSingleCrit$new( task = task, learner = learner, resampling = resampling, measure = measure, terminator = trm(\"evals\", n_evals = 5)) tnr(\"mbo\")$optimize(instance) # multi-objective task = tsk(\"wine\") learner = lrn(\"classif.rpart\", cp = to_tune(lower = 1e-4, upper = 1, logscale = TRUE)) resampling = rsmp(\"cv\", folds = 3) measures = msrs(c(\"classif.acc\", \"selected_features\")) instance = TuningInstanceBatchMultiCrit$new( task = task, learner = learner, resampling = resampling, measures = measures, terminator = trm(\"evals\", n_evals = 5), store_models = TRUE) # required due to selected features tnr(\"mbo\")$optimize(instance) } #> cp learner_param_vals x_domain classif.acc selected_features #> #> 1: -1.319327902 0.8313559 2.000000 #> 2: -3.621912995 0.8370056 2.666667 #> 3: -0.000381697 0.3987759 0.000000 # }"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/ras.html","id":null,"dir":"Reference","previous_headings":"","what":"Syntactic Sugar Result Assigner Construction — ras","title":"Syntactic Sugar Result Assigner Construction — ras","text":"function complements mlr_result_assigners functions spirit mlr_sugar mlr3.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/ras.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Syntactic Sugar Result Assigner Construction — ras","text":"","code":"ras(.key, ...)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/ras.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Syntactic Sugar Result Assigner Construction — ras","text":".key (character(1)) Key passed respective dictionary retrieve object. ... (named list()) Named arguments passed constructor, set parameters paradox::ParamSet, set public field. See mlr3misc::dictionary_sugar_get() details.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/ras.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Syntactic Sugar Result Assigner Construction — ras","text":"ResultAssigner","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/ras.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Syntactic Sugar Result Assigner Construction — ras","text":"","code":"ras(\"archive\") #> "},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/srlrn.html","id":null,"dir":"Reference","previous_headings":"","what":"Syntactic Sugar Surrogate Construction — srlrn","title":"Syntactic Sugar Surrogate Construction — srlrn","text":"function allows construct SurrogateLearner SurrogateLearnerCollection spirit mlr_sugar mlr3. archive references one target variable cols_y contains one target variable single learner specified, learner replicated many times needed build SurrogateLearnerCollection.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/srlrn.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Syntactic Sugar Surrogate Construction — srlrn","text":"","code":"srlrn(learner, archive = NULL, cols_x = NULL, cols_y = NULL, ...)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/srlrn.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Syntactic Sugar Surrogate Construction — srlrn","text":"learner (mlr3::LearnerRegr | List mlr3::LearnerRegr)mlr3::LearnerRegr used within SurrogateLearner list mlr3::LearnerRegr used within SurrogateLearnerCollection. archive (NULL | bbotk::Archive)bbotk::Archive bbotk::OptimInstance used. Can also NULL. cols_x (NULL | character()) Column ids bbotk::Archive used features. Can also NULL case automatically inferred based archive. cols_y (NULL | character()) Column id(s) bbotk::Archive used target. list mlr3::LearnerRegr provided learner argument cols_y specified well, many column names learners must provided. Can also NULL case automatically inferred based archive. ... (named list()) Named arguments passed constructor, set parameters paradox::ParamSet.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/srlrn.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Syntactic Sugar Surrogate Construction — srlrn","text":"SurrogateLearner | SurrogateLearnerCollection","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/srlrn.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Syntactic Sugar Surrogate Construction — srlrn","text":"","code":"library(mlr3) srlrn(lrn(\"regr.featureless\"), catch_errors = FALSE) #> : LearnerRegrFeatureless #> * Parameters: assert_insample_perf=FALSE, catch_errors=FALSE srlrn(list(lrn(\"regr.featureless\"), lrn(\"regr.featureless\"))) #> : (LearnerRegrFeatureless | LearnerRegrFeatureless) #> * Parameters: assert_insample_perf=FALSE, catch_errors=TRUE"},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/news/index.html","id":"mlr3mbo-024","dir":"Changelog","previous_headings":"","what":"mlr3mbo 0.2.4","title":"mlr3mbo 0.2.4","text":"CRAN release: 2024-07-06 fix: Improve runtime AcqOptimizer setting check_values = FALSE.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/news/index.html","id":"mlr3mbo-023","dir":"Changelog","previous_headings":"","what":"mlr3mbo 0.2.3","title":"mlr3mbo 0.2.3","text":"CRAN release: 2024-07-01 compatibility: Work new bbotk mlr3tuning version 1.0.0.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/news/index.html","id":"mlr3mbo-022","dir":"Changelog","previous_headings":"","what":"mlr3mbo 0.2.2","title":"mlr3mbo 0.2.2","text":"CRAN release: 2024-03-01 refactor: compatibility upcoming paradox upgrade. feat: OptimizerMbo TunerMbo now update Surrogate final time optimization process finished ensure Surrogate correctly reflects state trained data seen optimization. fix: AcqFunction domain construction now respects Surrogate cols_x field. feat: support one candidate point result acquisition function optimization even non-batch acquisition functions. feat: added default_gp default_rf helpers allow construction default Gaussian Process random forest example used within default_surrogate. refactor: changed Gaussian Process random forest defaults (default_gp default_rf therefore also default_surrogate). Gaussian Process now uses \"matern5_2\" kernel. Random forest now uses 100 trees. number trees used fallback random forest reduced 10.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/news/index.html","id":"mlr3mbo-021","dir":"Changelog","previous_headings":"","what":"mlr3mbo 0.2.1","title":"mlr3mbo 0.2.1","text":"CRAN release: 2023-06-05 docs: updated references vignette. refactor: minor clean internal structure loop functions. perf: default initial design constructed based Sobol sequence loop functions. refactor: longer depend mlr3tuning import instead. refactor: srlrn sugar function now can construct SurrogateLearner SurrogateLearnerCollection; dropped srlrnc. feat: added AcqFunctionSD, AcqFunctionEHVI AcqFunctionEHVIGH, introduced bayesopt_emo loop function. feat: AcqFunctions now include $packages field stating required packages checked whether namespace can loaded prior optimization. fix: fixed bug fix_xdt_missing() helper function. BREAKING CHANGE: renaming default_loopfun -> default_loop_function, default_acqfun -> default_acqfunction, default_acqopt -> default_acqoptimizer. BREAKING CHANGE: result_functions now replaced ResultAssigners. BREAKING CHANGE: renamed $model field Surrogate classes $learner. BREAKING CHANGE: Surrogate AcquisitionFunction classes fields *_cols renamed cols_* (e.g., x_cols cols_x).","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/news/index.html","id":"mlr3mbo-012","dir":"Changelog","previous_headings":"","what":"mlr3mbo 0.1.2","title":"mlr3mbo 0.1.2","text":"CRAN release: 2023-03-02 refactor: adapt mlr3tuning 0.18.0. feat: Acquisition functions now assert whether surrogates match required predict type. fix: Unloading mlr3mbo removes optimizers tuners dictionaries. docs: faster examples. feat: characters surrogate regression tasks longer automatically converted factors. default_surrogate now respects gained appropriate pipeline step. feat: AcqFunctionAEI added. docs: fix docs, README bibentries.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/news/index.html","id":"mlr3mbo-011","dir":"Changelog","previous_headings":"","what":"mlr3mbo 0.1.1","title":"mlr3mbo 0.1.1","text":"CRAN release: 2022-11-18 Initial upload CRAN.","code":""}] +[{"path":"https://mlr3mbo.mlr-org.com/dev/articles/mlr3mbo.html","id":"intro","dir":"Articles","previous_headings":"","what":"Intro","title":"mlr3mbo","text":"mlr3mbo makes Bayesian Optimization (BO) available within mlr3 ecosystem. BO can used optimizing black box function, suitable hyperparameter optimization machine learning models. mlr3mbo allows building custom BO algorithms relying building blocks modular fashion, also provides variety standard single- multi-objective BO algorithms can used straightforward manner. assume reader somewhat familiar black box optimization bbotk, hyperparameter optimization mlr3tuning knows basics BO. Background material , example, given Garnett (2022), Bischl, Binder, et al. (2023), Bischl, Sonabend, et al. (2023).","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/articles/mlr3mbo.html","id":"building-blocks","dir":"Articles","previous_headings":"","what":"Building Blocks","title":"mlr3mbo","text":"BO iterative optimization algorithm makes use -called surrogate model unknown black box function. observed initial design observations, surrogate model trained data points observed far acquisition function used determine points search space promising candidates evaluated next. acquisition function relies prediction surrogate model requires evaluation true black box function therefore comparably cheap optimize. evaluated next candidate, process repeats given termination criteria met. BO flavors therefore follow simple loop: Fit surrogate observations made far. Optimize acquisition function find next candidate evaluated. Evaluate next candidate. following, basic building blocks BO implementation mlr3mbo introduced detail.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/articles/mlr3mbo.html","id":"loop-function","dir":"Articles","previous_headings":"Building Blocks","what":"Loop Function","title":"mlr3mbo","text":"loop_function determines behavior BO algorithm global level, .e., subroutine look like performed iteration. get overview readily available loop_functions, following dictionary can inspected: dictionary shows key, .e., ID loop_function, brief description, optimization instance resulting BO flavor can used, well documentation can accessed. Technically, loop_functions members S3 class loop_function, simply decorated functions (using R6Class class top - may change future). write loop_function, users can get inspiration readily available ones, e.g., bayesopt_ego performs sequential single-objective optimization: made assertions safety checks, evaluated initial design, bayesopt_ego essentially performs following steps: acq_function$surrogate$update() # update surrogate model acq_function$update() # update acquisition function (e.g., update best value observed far) acq_optimizer$optimize() # optimize acquisition function yield new candidate","code":"library(mlr3mbo) library(data.table) as.data.table(mlr_loop_functions) #> Key: #> key label instance #> #> 1: bayesopt_ego Efficient Global Optimization single-crit #> 2: bayesopt_emo Multi-Objective EGO multi-crit #> 3: bayesopt_mpcl Multipoint Constant Liar single-crit #> 4: bayesopt_parego ParEGO multi-crit #> 5: bayesopt_smsego SMS-EGO multi-crit #> man #> #> 1: mlr3mbo::mlr_loop_functions_ego #> 2: mlr3mbo::mlr_loop_functions_emo #> 3: mlr3mbo::mlr_loop_functions_mpcl #> 4: mlr3mbo::mlr_loop_functions_parego #> 5: mlr3mbo::mlr_loop_functions_smsego"},{"path":"https://mlr3mbo.mlr-org.com/dev/articles/mlr3mbo.html","id":"surrogate","dir":"Articles","previous_headings":"Building Blocks","what":"Surrogate","title":"mlr3mbo","text":"surrogate encapsulates regression learner models unknown black box function based observed data. mlr3mbo, SurrogateLearner SurrogateLearnerCollection higher-level R6 classes used construct surrogate, inheriting base Surrogate class. learner, LearnerRegr mlr3 can used, however, acquisition functions require mean variance prediction (therefore learners suitable scenarios). Typical choices include: Gaussian Process low dimensional numeric search spaces Random Forest higher dimensional mixed (/ hierarchical) search spaces SurrogateLearner can constructed via: using syntactic sugar: Note default_gp default_rf allow construction Gaussian Process random forest sensible hyperparamter values already specified. encapsulated learner can accessed via $learner field: surrogate following hyperparameters: assert_insample_perf = TRUE results insample performance learner calculated asserted performance threshold $update(). requires specification perf_measure (regression measure, e.g., R squared) perf_threshold. threshold met, error thrown (caught within optimization loop - unless catch_errors = FALSE results , e.g., proposing next candidate uniformly random). details error handling, see Safety Nets section. Note insample performance assertion always meaningful, e.g., case using Gaussian Process nugget, insample performance always perfect. Internally, learner fitted regression task constructed Archive OptimInstance optimized features target variable determined automatically can also specified via $cols_x $cols_y active bindings. Ideally, archive already passed construction, however, lazy initialization also possible (.e., $archive field automatically populated within optimization routine OptimizerMbo). Important methods $update() $predict() former one typically used within loop_function latter one used within implementation acquisition function. Depending choice loop_function, multiple targets must modelled (currently independent) surrogates, case SurrogateLearnerCollection used. Construction hyperparameters analogous single target scenario described . get overview available regression learners within mlr3 ecosystem, use: use custom learner included mlr3, mlr3learners, mlr3extralearners, can inherit LearnerRegr use custom learner within surrogate.","code":"library(mlr3learners) #> Loading required package: mlr3 surrogate = SurrogateLearner$new(lrn(\"regr.km\")) surrogate = srlrn(lrn(\"regr.km\")) surrogate$learner #> : Kriging #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, DiceKriging #> * Predict Types: response, [se] #> * Feature Types: logical, integer, numeric #> * Properties: - surrogate$param_set #> #> Key: #> id class lower upper nlevels default #> #> 1: assert_insample_perf ParamLgl NA NA 2 #> 2: catch_errors ParamLgl NA NA 2 #> 3: perf_measure ParamUty NA NA Inf #> 4: perf_threshold ParamDbl -Inf Inf Inf #> parents value #> #> 1: FALSE #> 2: TRUE #> 3: assert_insample_perf #> 4: assert_insample_perf library(mlr3) library(mlr3learners) # there are plenty of more in mlr3extralearners # library(mlr3extralearners) learners = as.data.table(mlr_learners) learners[task_type == \"regr\"]"},{"path":"https://mlr3mbo.mlr-org.com/dev/articles/mlr3mbo.html","id":"acquisition-function","dir":"Articles","previous_headings":"Building Blocks","what":"Acquisition Function","title":"mlr3mbo","text":"Based surrogate, acquisition function quantifies attractiveness point search space evaluated next iteration. popular example given Expected Improvement (Jones, Schonlau, Welch 1998): \\[ \\mathbb{E} \\left[ \\max \\left( f_{\\mathrm{min}} - Y(\\mathbf{x}), 0 \\right) \\right] \\] , \\(Y(\\mathbf{x})\\) surrogate prediction (random variable) given point \\(\\mathbf{x}\\) (using Gaussian Process follows normal distribution) \\(f_{\\mathrm{min}}\\) currently best function value observed far (assuming minimization). get overview available acquisition functions, following dictionary can inspected: dictionary shows key, .e., ID acquisition function, brief description, documentation can accessed. Technically, acquisition functions inherit R6 class AcqFunction simply inherits base Objective class. Construction straightforward via: using syntactic sugar: Internally, domain codomain constructed based Archive referenced Surrogate therefore surrogate passed argument already construction. However, lazy initialization also possible. case acquisition function parameterized, hyperparameters passed constants, e.g.: use custom acquisition function implement new R6 class inheriting AcqFunction.","code":"as.data.table(mlr_acqfunctions) #> Key: #> key label #> #> 1: aei Augmented Expected Improvement #> 2: cb Lower / Upper Confidence Bound #> 3: ehvi Expected Hypervolume Improvement #> 4: ehvigh Expected Hypervolume Improvement via GH Quadrature #> 5: ei Expected Improvement #> 6: eips Expected Improvement Per Second #> 7: mean Posterior Mean #> 8: pi Probability Of Improvement #> 9: sd Posterior Standard Deviation #> 10: smsego SMS-EGO #> man #> #> 1: mlr3mbo::mlr_acqfunctions_aei #> 2: mlr3mbo::mlr_acqfunctions_cb #> 3: mlr3mbo::mlr_acqfunctions_ehvi #> 4: mlr3mbo::mlr_acqfunctions_ehvigh #> 5: mlr3mbo::mlr_acqfunctions_ei #> 6: mlr3mbo::mlr_acqfunctions_eips #> 7: mlr3mbo::mlr_acqfunctions_mean #> 8: mlr3mbo::mlr_acqfunctions_pi #> 9: mlr3mbo::mlr_acqfunctions_sd #> 10: mlr3mbo::mlr_acqfunctions_smsego acq_function = AcqFunctionEI$new() acq_function = acqf(\"ei\") acqf(\"cb\") # lower / upper confidence bound with lambda hyperparameter #> #> Domain: #> #> Empty. #> Codomain: #> #> Empty. #> Constants: #> #> id class lower upper nlevels default value #> #> 1: lambda ParamDbl 0 Inf Inf 2 2"},{"path":"https://mlr3mbo.mlr-org.com/dev/articles/mlr3mbo.html","id":"acquisition-function-optimizer","dir":"Articles","previous_headings":"Building Blocks","what":"Acquisition Function Optimizer","title":"mlr3mbo","text":"find promising candidate evaluation, acquisition function must optimized. Internally, OptimInstance constructed using acquisition function Objective. acquisition function optimizer used solve optimization problem. Technically, optimizer member AcqOptimizer R6 class. Construction requires specifying Optimizer well Terminator: Syntactic sugar: optimizer terminator can accessed via $optimizer $terminator fields: Internally, acquisition function optimizer also requires acquisition function therefore acq_function argument specified construction. However, lazy initialization also possible. AcqOptimizer following hyperparameters: catch_errors = TRUE results catching errors can happen acquisition function optimization allows , e.g., proposing next candidate uniformly random within loop_function. details mechanism, see Safety Nets section. logging_level specifies logging level acquisition function optimization. Often useful log progress BO loop therefore logging_level set \"warn\" default. debugging purposes, set \"info\". skip_already_evaluated = TRUE result proposing candidates evaluation already evaluated previous iterations. warmstart = TRUE results best warmstart_size points present archive OptimInstance also evaluated acquisition function OptimInstance prior running actual acquisition function optimization. especially useful context using evolutionary algorithms variants local search acquisition function optimizer (current best points usually part initial population optimize local optima). get overview Optimizers implemented bbotk can use: similarly Terminators: , can also use custom Optimizers Terminators implementing new R6 classes inheriting Optimizer Terminator respectively.","code":"library(bbotk) #> Loading required package: paradox acq_optimizer = AcqOptimizer$new(opt(\"random_search\"), terminator = trm(\"evals\")) acq_optimizer = acqo(opt(\"random_search\"), terminator = trm(\"evals\")) acq_optimizer$optimizer #> : Random Search #> * Parameters: batch_size=1 #> * Parameter classes: ParamLgl, ParamInt, ParamDbl, ParamFct #> * Properties: dependencies, single-crit, multi-crit #> * Packages: bbotk acq_optimizer$terminator #> : Number of Evaluation #> * Parameters: n_evals=100, k=0 acq_optimizer$param_set #> #> Key: #> id class lower upper nlevels default parents #> #> 1: catch_errors ParamLgl NA NA 2 TRUE #> 2: logging_level ParamFct NA NA 6 warn #> 3: n_candidates ParamInt 1 Inf Inf 1 #> 4: skip_already_evaluated ParamLgl NA NA 2 TRUE #> 5: warmstart ParamLgl NA NA 2 FALSE #> 6: warmstart_size ParamInt 1 Inf Inf warmstart #> value #> #> 1: TRUE #> 2: warn #> 3: 1 #> 4: TRUE #> 5: FALSE #> 6: as.data.table(mlr_optimizers) as.data.table(mlr_terminators)"},{"path":"https://mlr3mbo.mlr-org.com/dev/articles/mlr3mbo.html","id":"putting-it-together","dir":"Articles","previous_headings":"","what":"Putting it Together","title":"mlr3mbo","text":"introduced building blocks now ready put everything together form OptimizerMbo TunerMbo. OptimizerMbo inherits Optimizer requires loop_function, surrogate, acq_function acq_optimizer. Construction performed via: using syntactic sugar: Additional arguments, .e., arguments loop_function can passed via args argument construction $args active binding. Finally, mechanism final result obtained optimization process (.e., best point case single-objective Pareto set case multi-objective optimization) can changed via result_assigner argument construction $result_assigner active binding. example, ResultAssignerSurrogate choose final solution based prediction surrogate instead evaluations logged archive sensible case noisy objective functions. default, however, use ResultAssignerArchive directly choose final solution based evaluations logged archive. get overview available result assigners, following dictionary can inspected: dictionary shows key, .e., ID result assigner, brief description, documentation can accessed. Construction result assigners straightforward: Syntactic sugar: Note important fields OptimizerMbo $param_classes, $packages, $properties automatically determined based choice loop_function, surrogate, acq_function, acq_optimizer, result_assigner. arguments surrogate, acq_function, acq_optimizer result_assigner fully initialized construction, e.g., surrogate missing archive, acq_function missing surrogate, lazy initialization completed prior optimizer used optimization. object class OptimizerMbo can used optimize object class OptimInstanceBatchSingleCrit OptimInstanceBatchMultiCrit. hyperparameter optimization, TunerMbo used (simply relies OptimizerMbo constructed internally):","code":"optimizer = OptimizerMbo$new(bayesopt_ego, surrogate = surrogate, acq_function = acq_function, acq_optimizer = acq_optimizer) optimizer = opt(\"mbo\", loop_function = bayesopt_ego, surrogate = surrogate, acq_function = acq_function, acq_optimizer = acq_optimizer) optimizer #> : Model Based Optimization #> * Parameter classes: ParamLgl, ParamInt, ParamDbl #> * Properties: single-crit #> * Packages: mlr3mbo, mlr3, mlr3learners, DiceKriging, bbotk #> * Loop function: bayesopt_ego #> * Surrogate: LearnerRegrKM #> * Acquisition Function: AcqFunctionEI #> * Acquisition Function Optimizer: (OptimizerBatchRandomSearch | #> TerminatorEvals) as.data.table(mlr_result_assigners) #> Key: #> key label man #> #> 1: archive Archive mlr3mbo::mlr_result_assigners_archive #> 2: surrogate Mean Surrogate Prediction mlr3mbo::mlr_result_assigners_surrogate result_assigner = ResultAssignerArchive$new() result_assigner = ras(\"archive\") tuner = TunerMbo$new(bayesopt_ego, surrogate = surrogate, acq_function = acq_function, acq_optimizer = acq_optimizer) mlr3misc::get_private(tuner)[[\".optimizer\"]] #> : Model Based Optimization #> * Parameter classes: ParamLgl, ParamInt, ParamDbl #> * Properties: single-crit #> * Packages: mlr3mbo, mlr3, mlr3learners, DiceKriging, bbotk #> * Loop function: bayesopt_ego #> * Surrogate: LearnerRegrKM #> * Acquisition Function: AcqFunctionEI #> * Acquisition Function Optimizer: (OptimizerBatchRandomSearch | #> TerminatorEvals)"},{"path":"https://mlr3mbo.mlr-org.com/dev/articles/mlr3mbo.html","id":"the-initial-design","dir":"Articles","previous_headings":"Putting it Together","what":"The Initial Design","title":"mlr3mbo","text":"mlr3mbo offers two different ways specifying initial design: One can simply evaluate points OptimInstance optimized prior using OptimizerMbo. case, loop_function skip construction evaluation initial design. points already evaluated OptimInstance, loop_function construct initial design evaluate , e.g., bayesopt_ego constructs initial design size \\(4D\\) \\(D\\) dimensionality search space sampling points uniformly random. Functions creating different initial designs part paradox package, e.g.: generate_design_random: uniformly random generate_design_grid: uniform sized grid generate_design_lhs: Latin hypercube sampling generate_design_sobol: Sobol sequence","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/articles/mlr3mbo.html","id":"defaults","dir":"Articles","previous_headings":"","what":"Defaults","title":"mlr3mbo","text":"mlr3mbo tries use intelligent defaults loop_function, surrogate, acq_function, acq_optimizer within OptimizerMbo TunerMbo. details, see mbo_defaults.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/articles/mlr3mbo.html","id":"safety-nets","dir":"Articles","previous_headings":"","what":"Safety Nets","title":"mlr3mbo","text":"mlr3mbo quite stable sense - desired - kinds errors can caught handled appropriately within loop_function. example, let’s look inner workings bayesopt_ego: iteration, new candidate chosen based updating surrogate acquisition function, optimizing acquisition function. error happens steps, errors upgraded errors class \"mbo_error\" (\"surrogate_update_error\" surrogate related errors well \"acq_optimizer_error\" acquisition function optimization related errors). errors caught fallback triggered: Evaluating next candidate chosen uniformly random. Note mechanism actually also used handle random interleaving. illustrate error handling mechanism, consider following scenario: try minimize \\(f: [-1, 1] \\rightarrow \\mathbb{R}, x \\mapsto x^2\\), however, Gaussian Process fails due data points close : log tells us error happened caught: \"surrogate_update_error / mbo_error / error / condition\". also see archive first candidate initial design (fifth point) proposed based optimizing acquisition function (\"acq_ei\" column NA ): Nevertheless, due safety net, BO loop eventually worked just fine simply throw error. set catch_errors = FALSE within surrogate, see error indeed caused surrogate: case error belonging acq_optimizer_error class, helpful increase logging level acquisition function optimizer (e.g., acq_optimizer$param_set$values$logging_level = \"info\") also set acq_optimizer$param_set$values$catch_errors = FALSE. allows straightforward debugging. make sure BO loop behaved expected, always inspect log optimization process inspect archive check whether acquisition function column populated expected.","code":"repeat { xdt = tryCatch({ . . . acq_function$surrogate$update() acq_function$update() acq_optimizer$optimize() }, mbo_error = function(mbo_error_condition) { lg$info(paste0(class(mbo_error_condition), collapse = \" / \")) lg$info(\"Proposing a randomly sampled point\") SamplerUnif$new(domain)$sample(1L)$data }) . . . } set.seed(2906) domain = ps(x = p_dbl(lower = -1, upper = 1)) codomain = ps(y = p_dbl(tags = \"minimize\")) objective_function = function(xs) { list(y = xs$x ^ 2) } objective = ObjectiveRFun$new( fun = objective_function, domain = domain, codomain = codomain) instance = OptimInstanceBatchSingleCrit$new( objective = objective, terminator = trm(\"evals\", n_evals = 10)) initial_design = data.table(x = rep(1, 4)) instance$eval_batch(initial_design) surrogate = srlrn(default_gp()) acq_function = acqf(\"ei\") acq_optimizer = acqo(opt(\"random_search\", batch_size = 1000), terminator = trm(\"evals\", n_evals = 1000)) optimizer = opt(\"mbo\", loop_function = bayesopt_ego, surrogate = surrogate, acq_function = acq_function, acq_optimizer = acq_optimizer) optimizer$optimize(instance) #> WARN [09:25:57.818] [bbotk] missing value where TRUE/FALSE needed #> x x_domain y #> #> 1: -0.01951836 0.0003809664 instance$archive$data #> x y x_domain timestamp batch_nr acq_ei #> #> 1: 1.00000000 1.0000000000 2024-08-13 09:25:57 1 NA #> 2: 1.00000000 1.0000000000 2024-08-13 09:25:57 1 NA #> 3: 1.00000000 1.0000000000 2024-08-13 09:25:57 1 NA #> 4: 1.00000000 1.0000000000 2024-08-13 09:25:57 1 NA #> 5: 0.67422986 0.4545859064 2024-08-13 09:25:57 2 NA #> 6: 0.66865060 0.4470936288 2024-08-13 09:25:58 3 0.043581438 #> 7: 0.38834314 0.1508103944 2024-08-13 09:25:58 4 0.126450234 #> 8: -0.53253872 0.2835974922 2024-08-13 09:25:58 5 0.223167948 #> 9: 0.04818857 0.0023221379 2024-08-13 09:25:58 6 0.125654545 #> 10: -0.01951836 0.0003809664 2024-08-13 09:25:58 7 0.002040261 #> .already_evaluated #> #> 1: NA #> 2: NA #> 3: NA #> 4: NA #> 5: NA #> 6: FALSE #> 7: FALSE #> 8: FALSE #> 9: FALSE #> 10: FALSE instance$archive$clear() instance$eval_batch(initial_design) optimizer$surrogate$param_set$values$catch_errors = FALSE optimizer$optimize(instance) #> Error in if (varinit.vario <= 1e-20) varinit.vario <- 1/2 * varinit.vario.total: missing value where TRUE/FALSE needed"},{"path":"https://mlr3mbo.mlr-org.com/dev/articles/mlr3mbo.html","id":"writing-your-own-loop-function","dir":"Articles","previous_headings":"","what":"Writing Your Own Loop Function","title":"mlr3mbo","text":"Writing custom loop_function straightforward. loop_function must object S3 class loop_function (simply standard R function requirements regarding arguments attributes). Arguments function must include instance, surrogate, acq_function, acq_optimizer attributes must include id (id loop function), label (brief description), instance (“single-crit” “multi_crit”), man (link manual page). Technically, loop_function therefore looks like following: inspiration write actual meaningful loop_functions, see, e.g., bayesopt_ego.","code":"bayesopt_custom = function(instance, surrogate, acq_function, acq_optimizer) { # typically some assertions # initial design handling # actual loop function } class(bayesopt_custom) = \"loop_function\" attr(bayesopt_custom, \"id\") = \"bayesopt_custom\" attr(bayesopt_custom, \"label\") = \"My custom BO loop\" attr(bayesopt_custom, \"instance\") = \"single-crit\" attr(bayesopt_custom, \"man\") = \"\" # no man page # if you want to add it to the dictionary: mlr_loop_functions$add(\"bayesopt_custom\", bayesopt_custom) bayesopt_custom #> Loop function: bayesopt_custom #> * Description: My custom BO loop #> * Supported Instance: single-crit"},{"path":"https://mlr3mbo.mlr-org.com/dev/articles/mlr3mbo.html","id":"examples","dir":"Articles","previous_headings":"","what":"Examples","title":"mlr3mbo","text":"final section, standard examples provided.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/articles/mlr3mbo.html","id":"single-objective-2d-schwefel-function","dir":"Articles","previous_headings":"Examples","what":"Single-Objective: 2D Schwefel Function","title":"mlr3mbo","text":"","code":"objective_function = function(xs) { list(y = 418.9829 * 2 - (sum(unlist(xs) * sin(sqrt(abs(unlist(xs))))))) } domain = ps(x1 = p_dbl(lower = -500, upper = 500), x2 = p_dbl(lower = -500, upper = 500)) codomain = ps(y = p_dbl(tags = \"minimize\")) objective = ObjectiveRFun$new( fun = objective_function, domain = domain, codomain = codomain) instance = OptimInstanceBatchSingleCrit$new( objective = objective, search_space = domain, terminator = trm(\"evals\", n_evals = 60)) # Gaussian Process, EI, DIRECT surrogate = srlrn(default_gp()) acq_function = acqf(\"ei\") acq_optimizer = acqo(opt(\"nloptr\", algorithm = \"NLOPT_GN_DIRECT_L\"), terminator = trm(\"stagnation\", threshold = 1e-8)) optimizer = opt(\"mbo\", loop_function = bayesopt_ego, surrogate = surrogate, acq_function = acq_function, acq_optimizer = acq_optimizer) set.seed(2906) optimizer$optimize(instance) library(ggplot2) ggplot(aes(x = batch_nr, y = cummin(y)), data = instance$archive$data) + geom_point() + geom_step() + labs(x = \"Batch Nr.\", y = \"Best y\") + theme_minimal() xdt = generate_design_grid(instance$search_space, resolution = 101)$data ydt = objective$eval_dt(xdt) ggplot(aes(x = x1, y = x2, z = y), data = cbind(xdt, ydt)) + geom_contour_filled() + geom_point(aes(color = batch_nr), size = 2, data = instance$archive$data) + scale_color_gradient(low = \"lightgrey\", high = \"red\") + theme_minimal()"},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/articles/mlr3mbo.html","id":"parego","dir":"Articles","previous_headings":"Examples > Multi-Objective: Schaffer Function N. 1","what":"ParEGO","title":"mlr3mbo","text":"","code":"objective_function = function(xs) { list(y1 = xs$x^2, y2 = (xs$x - 2)^2) } domain = ps(x = p_dbl(lower = -10, upper = 10)) codomain = ps(y1 = p_dbl(tags = \"minimize\"), y2 = p_dbl(tags = \"minimize\")) objective = ObjectiveRFun$new( fun = objective_function, domain = domain, codomain = codomain) instance = OptimInstanceBatchMultiCrit$new( objective = objective, search_space = domain, terminator = trm(\"evals\", n_evals = 30)) # Gaussian Process, EI, DIRECT surrogate = srlrn(default_gp()) acq_function = acqf(\"ei\") acq_optimizer = acqo(opt(\"nloptr\", algorithm = \"NLOPT_GN_DIRECT_L\"), terminator = trm(\"stagnation\", threshold = 1e-8)) optimizer = opt(\"mbo\", loop_function = bayesopt_parego, surrogate = surrogate, acq_function = acq_function, acq_optimizer = acq_optimizer) set.seed(2906) optimizer$optimize(instance) ggplot(aes(x = y1, y = y2), data = instance$archive$best()) + geom_point() + theme_minimal() library(emoa) library(mlr3misc) library(data.table) anytime_hypervolume = map_dtr(unique(instance$archive$data$batch_nr), function(bnr) { pareto = instance$archive$best(batch = 1:bnr)[, instance$archive$cols_y, with = FALSE] dhv = dominated_hypervolume(t(pareto), ref = t(t(c(100, 144)))) data.table(batch_nr = bnr, dhv = dhv) }) ggplot(aes(x = batch_nr, y = dhv), data = anytime_hypervolume[batch_nr > 1]) + geom_point() + geom_step(direction = \"vh\") + labs(x = \"Batch Nr.\", y = \"Dominated Hypervolume\") + theme_minimal()"},{"path":"https://mlr3mbo.mlr-org.com/dev/articles/mlr3mbo.html","id":"sms-ego","dir":"Articles","previous_headings":"Examples > Multi-Objective: Schaffer Function N. 1","what":"SMS-EGO","title":"mlr3mbo","text":"","code":"objective_function = function(xs) { list(y1 = xs$x^2, y2 = (xs$x - 2)^2) } domain = ps(x = p_dbl(lower = -10, upper = 10)) codomain = ps(y1 = p_dbl(tags = \"minimize\"), y2 = p_dbl(tags = \"minimize\")) objective = ObjectiveRFun$new( fun = objective_function, domain = domain, codomain = codomain) instance = OptimInstanceBatchMultiCrit$new( objective = objective, search_space = domain, terminator = trm(\"evals\", n_evals = 30)) # Gaussian Processes, SMS-EGO, DIRECT learner_y1 = default_gp() learner_y2 = learner_y1$clone(deep = TRUE) surrogate = srlrn(list(learner_y1, learner_y2)) acq_function = acqf(\"smsego\") acq_optimizer = acqo(opt(\"nloptr\", algorithm = \"NLOPT_GN_DIRECT_L\"), terminator = trm(\"stagnation\", threshold = 1e-8)) optimizer = opt(\"mbo\", loop_function = bayesopt_smsego, surrogate = surrogate, acq_function = acq_function, acq_optimizer = acq_optimizer) set.seed(2906) optimizer$optimize(instance) ggplot(aes(x = y1, y = y2), data = instance$archive$best()) + geom_point() + theme_minimal() anytime_hypervolume = map_dtr(unique(instance$archive$data$batch_nr), function(bnr) { pareto = instance$archive$best(batch = 1:bnr)[, instance$archive$cols_y, with = FALSE] dhv = dominated_hypervolume(t(pareto), ref = t(t(c(100, 144)))) data.table(batch_nr = bnr, dhv = dhv) }) ggplot(aes(x = batch_nr, y = dhv), data = anytime_hypervolume[batch_nr > 1]) + geom_point() + geom_step(direction = \"vh\") + labs(x = \"Batch Nr.\", y = \"Dominated Hypervolume\") + theme_minimal()"},{"path":"https://mlr3mbo.mlr-org.com/dev/articles/mlr3mbo.html","id":"single-objective-hpo","dir":"Articles","previous_headings":"Examples","what":"Single-Objective HPO","title":"mlr3mbo","text":"","code":"library(mlr3) task = tsk(\"wine\") learner = lrn(\"classif.rpart\", cp = to_tune(lower = 1e-4, upper = 1, logscale = TRUE), maxdepth = to_tune(lower = 1, upper = 10), minbucket = to_tune(lower = 1, upper = 10), minsplit = to_tune(lower = 1, upper = 10)) resampling = rsmp(\"cv\", folds = 3) measure = msr(\"classif.acc\") instance = TuningInstanceBatchSingleCrit$new( task = task, learner = learner, resampling = resampling, measure = measure, terminator = trm(\"evals\", n_evals = 30)) # Gaussian Process, EI, FocusSearch surrogate = srlrn(default_gp(noisy = TRUE)) acq_function = acqf(\"ei\") acq_optimizer = acqo(opt(\"focus_search\", n_points = 100L, maxit = 9), terminator = trm(\"evals\", n_evals = 3000)) tuner = tnr(\"mbo\", loop_function = bayesopt_ego, surrogate = surrogate, acq_function = acq_function, acq_optimizer = acq_optimizer) set.seed(2906) tuner$optimize(instance) instance$result"},{"path":"https://mlr3mbo.mlr-org.com/dev/articles/mlr3mbo.html","id":"multi-objective-hpo","dir":"Articles","previous_headings":"Examples","what":"Multi-Objective HPO","title":"mlr3mbo","text":"","code":"task = tsk(\"wine\") learner = lrn(\"classif.rpart\", cp = to_tune(lower = 1e-4, upper = 1, logscale = TRUE), maxdepth = to_tune(lower = 1, upper = 10), minbucket = to_tune(lower = 1, upper = 10), minsplit = to_tune(lower = 1, upper = 10)) resampling = rsmp(\"cv\", folds = 3) measures = msrs(c(\"classif.acc\", \"selected_features\")) instance = TuningInstanceBatchMultiCrit$new( task = task, learner = learner, resampling = resampling, measures = measures, terminator = trm(\"evals\", n_evals = 30), store_models = TRUE) # required due to selected features # Gaussian Process, EI, FocusSearch surrogate = srlrn(default_gp(noisy = TRUE)) acq_function = acqf(\"ei\") acq_optimizer = acqo(opt(\"focus_search\", n_points = 100L, maxit = 9), terminator = trm(\"evals\", n_evals = 3000)) tuner = tnr(\"mbo\", loop_function = bayesopt_parego, surrogate = surrogate, acq_function = acq_function, acq_optimizer = acq_optimizer) set.seed(2906) tuner$optimize(instance) instance$result"},{"path":"https://mlr3mbo.mlr-org.com/dev/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Lennart Schneider. Maintainer, author. Jakob Richter. Author. Marc Becker. Author. Michel Lang. Author. Bernd Bischl. Author. Florian Pfisterer. Author. Martin Binder. Author. Sebastian Fischer. Author. Michael H. Buselli. Copyright holder. Wessel Dankers. Copyright holder. Carlos Fonseca. Copyright holder. Manuel Lopez-Ibanez. Copyright holder. Luis Paquete. Copyright holder.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Schneider L, Richter J, Becker M, Lang M, Bischl B, Pfisterer F, Binder M, Fischer S (2024). mlr3mbo: Flexible Bayesian Optimization. R package version 0.2.4.9000, https://github.com/mlr-org/mlr3mbo, https://mlr3mbo.mlr-org.com.","code":"@Manual{, title = {mlr3mbo: Flexible Bayesian Optimization}, author = {Lennart Schneider and Jakob Richter and Marc Becker and Michel Lang and Bernd Bischl and Florian Pfisterer and Martin Binder and Sebastian Fischer}, year = {2024}, note = {R package version 0.2.4.9000, https://github.com/mlr-org/mlr3mbo}, url = {https://mlr3mbo.mlr-org.com}, }"},{"path":"https://mlr3mbo.mlr-org.com/dev/index.html","id":"mlr3mbo","dir":"","previous_headings":"","what":"Flexible Bayesian Optimization","title":"Flexible Bayesian Optimization","text":"Package website: release | dev new R6 much modular implementation single- multi-objective Bayesian Optimization.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/index.html","id":"get-started","dir":"","previous_headings":"","what":"Get Started","title":"Flexible Bayesian Optimization","text":"overview gentle introduction given vignette.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/index.html","id":"design","dir":"","previous_headings":"","what":"Design","title":"Flexible Bayesian Optimization","text":"mlr3mbo built modular relying following R6 classes: Surrogate: Surrogate Model AcqFunction: Acquisition Function AcqOptimizer: Acquisition Function Optimizer Based , Bayesian Optimization loops can written, see, e.g., bayesopt_ego sequential single-objective BO. mlr3mbo also provides OptimizerMbo class behaving like Optimizer bbotk package well TunerMbo class behaving like Tuner mlr3tuning package. mlr3mbo uses sensible defaults Surrogate, AcqFunction, AcqOptimizer, even loop_function. See ?mbo_defaults details.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/index.html","id":"simple-optimization-example","dir":"","previous_headings":"","what":"Simple Optimization Example","title":"Flexible Bayesian Optimization","text":"Minimize f(x) = x^2 via sequential single-objective BO using GP surrogate EI optimized via random search acquisition function: Note can also use bb_optimize shorthand:","code":"library(bbotk) library(mlr3mbo) library(mlr3learners) set.seed(1) obfun = ObjectiveRFun$new( fun = function(xs) list(y1 = xs$x ^ 2), domain = ps(x = p_dbl(lower = -10, upper = 10)), codomain = ps(y1 = p_dbl(tags = \"minimize\"))) instance = oi( objective = obfun, terminator = trm(\"evals\", n_evals = 10)) surrogate = srlrn(lrn(\"regr.km\", control = list(trace = FALSE))) acqfun = acqf(\"ei\") acqopt = acqo(opt(\"random_search\", batch_size = 100), terminator = trm(\"evals\", n_evals = 100)) optimizer = opt(\"mbo\", loop_function = bayesopt_ego, surrogate = surrogate, acq_function = acqfun, acq_optimizer = acqopt) optimizer$optimize(instance) ## x x_domain y1 ## ## 1: 0.03897209 0.001518824 library(bbotk) library(mlr3mbo) library(mlr3learners) set.seed(1) fun = function(xs) list(y1 = xs$x ^ 2) surrogate = srlrn(lrn(\"regr.km\", control = list(trace = FALSE))) acqfun = acqf(\"ei\") acqopt = acqo(opt(\"random_search\", batch_size = 100), terminator = trm(\"evals\", n_evals = 100)) optimizer = opt(\"mbo\", loop_function = bayesopt_ego, surrogate = surrogate, acq_function = acqfun, acq_optimizer = acqopt) result = bb_optimize( fun, method = optimizer, lower = c(x = -10), upper = c(x = 10), max_evals = 10)"},{"path":"https://mlr3mbo.mlr-org.com/dev/index.html","id":"simple-tuning-example","dir":"","previous_headings":"","what":"Simple Tuning Example","title":"Flexible Bayesian Optimization","text":"","code":"library(mlr3) library(mlr3learners) library(mlr3tuning) library(mlr3mbo) set.seed(1) task = tsk(\"pima\") learner = lrn(\"classif.rpart\", cp = to_tune(lower = 1e-04, upper = 1, logscale = TRUE)) instance = tune( tuner = tnr(\"mbo\"), task = task, learner = learner, resampling = rsmp(\"holdout\"), measure = msr(\"classif.ce\"), term_evals = 10) instance$result ## cp learner_param_vals x_domain classif.ce ## ## 1: -4.381681 0.2070312"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqFunction.html","id":null,"dir":"Reference","previous_headings":"","what":"Acquisition Function Base Class — AcqFunction","title":"Acquisition Function Base Class — AcqFunction","text":"Abstract acquisition function class. Based predictions Surrogate, acquisition function encodes preference evaluate new point.","code":""},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqFunction.html","id":"super-class","dir":"Reference","previous_headings":"","what":"Super class","title":"Acquisition Function Base Class — AcqFunction","text":"bbotk::Objective -> AcqFunction","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqFunction.html","id":"active-bindings","dir":"Reference","previous_headings":"","what":"Active bindings","title":"Acquisition Function Base Class — AcqFunction","text":"direction (\"\" | \"minimize\" | \"maximize\") Optimization direction acquisition function relative direction objective function bbotk::OptimInstance. Must \"\", \"minimize\", \"maximize\". surrogate_max_to_min (-1 | 1) Multiplicative factor correct minimization maximization acquisition function. label (character(1)) Label object. man (character(1)) String format [pkg]::[topic] pointing manual page object. archive (bbotk::Archive) Points bbotk::Archive surrogate. fun (function) Points private acquisition function implemented subclasses. surrogate (Surrogate) Surrogate. requires_predict_type_se (logical(1)) Whether acquisition function requires surrogate \"se\" $predict_type. packages (character()) Set required packages.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqFunction.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Acquisition Function Base Class — AcqFunction","text":"bbotk::Objective$eval() bbotk::Objective$format() bbotk::Objective$help() bbotk::Objective$print()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqFunction.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Acquisition Function Base Class — AcqFunction","text":"AcqFunction$new() AcqFunction$update() AcqFunction$eval_many() AcqFunction$eval_dt() AcqFunction$clone()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqFunction.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Acquisition Function Base Class — AcqFunction","text":"Creates new instance R6 class. Note surrogate can initialized lazy can later set via active binding $surrogate.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqFunction.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function Base Class — AcqFunction","text":"","code":"AcqFunction$new( id, constants = ParamSet$new(), surrogate, requires_predict_type_se, direction, packages = NULL, label = NA_character_, man = NA_character_ )"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqFunction.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Acquisition Function Base Class — AcqFunction","text":"id (character(1)). constants (paradox::ParamSet). Changeable constants parameters. surrogate (NULL | Surrogate). Surrogate whose predictions used acquisition function. requires_predict_type_se (logical(1)) Whether acquisition function requires surrogate \"se\" $predict_type. direction (\"\" | \"minimize\" | \"maximize\"). Optimization direction acquisition function relative direction objective function bbotk::OptimInstance. Must \"\", \"minimize\", \"maximize\". packages (character()) Set required packages. warning signaled prior construction least one packages installed, loaded (attached) later -demand via requireNamespace(). label (character(1)) Label object. man (character(1)) String format [pkg]::[topic] pointing manual page object.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqFunction.html","id":"method-update-","dir":"Reference","previous_headings":"","what":"Method update()","title":"Acquisition Function Base Class — AcqFunction","text":"Update acquisition function. Can implemented subclasses.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqFunction.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function Base Class — AcqFunction","text":"","code":"AcqFunction$update()"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqFunction.html","id":"method-eval-many-","dir":"Reference","previous_headings":"","what":"Method eval_many()","title":"Acquisition Function Base Class — AcqFunction","text":"Evaluates multiple input values objective function.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqFunction.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function Base Class — AcqFunction","text":"","code":"AcqFunction$eval_many(xss)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqFunction.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"Acquisition Function Base Class — AcqFunction","text":"xss (list()) list lists contains multiple x values, e.g. list(list(x1 = 1, x2 = 2), list(x1 = 3, x2 = 4)).","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqFunction.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Acquisition Function Base Class — AcqFunction","text":"data.table::data.table() contains one y-column single-objective functions multiple y-columns multi-objective functions, e.g. data.table(y = 1:2) data.table(y1 = 1:2, y2 = 3:4).","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqFunction.html","id":"method-eval-dt-","dir":"Reference","previous_headings":"","what":"Method eval_dt()","title":"Acquisition Function Base Class — AcqFunction","text":"Evaluates multiple input values objective function","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqFunction.html","id":"usage-3","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function Base Class — AcqFunction","text":"","code":"AcqFunction$eval_dt(xdt)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqFunction.html","id":"arguments-2","dir":"Reference","previous_headings":"","what":"Arguments","title":"Acquisition Function Base Class — AcqFunction","text":"xdt (data.table::data.table()) One point per row, e.g. data.table(x1 = c(1, 3), x2 = c(2, 4)).","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqFunction.html","id":"returns-1","dir":"Reference","previous_headings":"","what":"Returns","title":"Acquisition Function Base Class — AcqFunction","text":"data.table::data.table() contains one y-column single-objective functions multiple y-columns multi-objective functions, e.g. data.table(y = 1:2) data.table(y1 = 1:2, y2 = 3:4).","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqFunction.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Acquisition Function Base Class — AcqFunction","text":"objects class cloneable method.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqFunction.html","id":"usage-4","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function Base Class — AcqFunction","text":"","code":"AcqFunction$clone(deep = FALSE)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqFunction.html","id":"arguments-3","dir":"Reference","previous_headings":"","what":"Arguments","title":"Acquisition Function Base Class — AcqFunction","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqOptimizer.html","id":null,"dir":"Reference","previous_headings":"","what":"Acquisition Function Optimizer — AcqOptimizer","title":"Acquisition Function Optimizer — AcqOptimizer","text":"Optimizer AcqFunctions performs acquisition function optimization. Wraps bbotk::Optimizer bbotk::Terminator.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqOptimizer.html","id":"parameters","dir":"Reference","previous_headings":"","what":"Parameters","title":"Acquisition Function Optimizer — AcqOptimizer","text":"n_candidates integer(1) Number candidate points propose. Note affect acquisition function calculated (e.g., setting n_candidates > 1 result computing q- multi-Expected Improvement) rather top n-candidates selected bbotk::Archive acquisition function bbotk::OptimInstance. Note setting n_candidates > 1 usually sensible idea still supported experimental reasons. Default 1. logging_level character(1) Logging level acquisition function optimization. Can \"fatal\", \"error\", \"warn\", \"info\", \"debug\" \"trace\". Default \"warn\", .e., warnings logged. warmstart logical(1) acquisition function optimization warm-started evaluating best point(s) present bbotk::Archive actual bbotk::OptimInstance? sensible using population based acquisition function optimizer, e.g., local search mutation. Default FALSE. warmstart_size integer(1) | \"\" Number best points selected bbotk::Archive used warm starting. Can also \"\" use available points. relevant warmstart = TRUE. Default 1. skip_already_evaluated logical(1) can happen candidate resulting acquisition function optimization already evaluated previous iteration. candidate proposal ignored next best point selected candidate? Default TRUE. catch_errors logical(1) errors acquisition function optimization caught propagated loop_function can handle failed acquisition function optimization appropriately , e.g., proposing randomly sampled point evaluation? Default TRUE.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqOptimizer.html","id":"public-fields","dir":"Reference","previous_headings":"","what":"Public fields","title":"Acquisition Function Optimizer — AcqOptimizer","text":"optimizer (bbotk::Optimizer). terminator (bbotk::Terminator). acq_function (AcqFunction).","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqOptimizer.html","id":"active-bindings","dir":"Reference","previous_headings":"","what":"Active bindings","title":"Acquisition Function Optimizer — AcqOptimizer","text":"print_id (character) Id used printing. param_set (paradox::ParamSet) Set hyperparameters.","code":""},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqOptimizer.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Acquisition Function Optimizer — AcqOptimizer","text":"AcqOptimizer$new() AcqOptimizer$format() AcqOptimizer$print() AcqOptimizer$optimize() AcqOptimizer$clone()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqOptimizer.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Acquisition Function Optimizer — AcqOptimizer","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqOptimizer.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function Optimizer — AcqOptimizer","text":"","code":"AcqOptimizer$new(optimizer, terminator, acq_function = NULL)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqOptimizer.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Acquisition Function Optimizer — AcqOptimizer","text":"optimizer (bbotk::Optimizer). terminator (bbotk::Terminator). acq_function (NULL | AcqFunction).","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqOptimizer.html","id":"method-format-","dir":"Reference","previous_headings":"","what":"Method format()","title":"Acquisition Function Optimizer — AcqOptimizer","text":"Helper print outputs.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqOptimizer.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function Optimizer — AcqOptimizer","text":"","code":"AcqOptimizer$format()"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqOptimizer.html","id":"method-print-","dir":"Reference","previous_headings":"","what":"Method print()","title":"Acquisition Function Optimizer — AcqOptimizer","text":"Print method.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqOptimizer.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function Optimizer — AcqOptimizer","text":"","code":"AcqOptimizer$print()"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqOptimizer.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Acquisition Function Optimizer — AcqOptimizer","text":"(character()).","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqOptimizer.html","id":"method-optimize-","dir":"Reference","previous_headings":"","what":"Method optimize()","title":"Acquisition Function Optimizer — AcqOptimizer","text":"Optimize acquisition function.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqOptimizer.html","id":"usage-3","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function Optimizer — AcqOptimizer","text":"","code":"AcqOptimizer$optimize()"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqOptimizer.html","id":"returns-1","dir":"Reference","previous_headings":"","what":"Returns","title":"Acquisition Function Optimizer — AcqOptimizer","text":"data.table::data.table() 1 row per optimum x columns.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqOptimizer.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Acquisition Function Optimizer — AcqOptimizer","text":"objects class cloneable method.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqOptimizer.html","id":"usage-4","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function Optimizer — AcqOptimizer","text":"","code":"AcqOptimizer$clone(deep = FALSE)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqOptimizer.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"Acquisition Function Optimizer — AcqOptimizer","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/AcqOptimizer.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Acquisition Function Optimizer — AcqOptimizer","text":"","code":"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(\"ei\", surrogate = surrogate) acq_function$surrogate$update() acq_function$update() acq_optimizer = acqo( optimizer = opt(\"random_search\", batch_size = 1000), terminator = trm(\"evals\", n_evals = 1000), acq_function = acq_function) acq_optimizer$optimize() } #> Loading required namespace: DiceKriging #> Loading required namespace: rgenoud #> Loading required package: paradox #> Loading required package: mlr3 #> x x_domain acq_ei .already_evaluated #> #> 1: 1.187665 5.305171 FALSE"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/ResultAssigner.html","id":null,"dir":"Reference","previous_headings":"","what":"Result Assigner Base Class — ResultAssigner","title":"Result Assigner Base Class — ResultAssigner","text":"Abstract result assigner class. result assigner responsible assigning final optimization result bbotk::OptimInstance. Normally, used within OptimizerMbo.","code":""},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/ResultAssigner.html","id":"active-bindings","dir":"Reference","previous_headings":"","what":"Active bindings","title":"Result Assigner Base Class — ResultAssigner","text":"label (character(1)) Label object. man (character(1)) String format [pkg]::[topic] pointing manual page object. packages (character()) Set required packages. warning signaled least one packages installed, loaded (attached) later -demand via requireNamespace().","code":""},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/ResultAssigner.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Result Assigner Base Class — ResultAssigner","text":"ResultAssigner$new() ResultAssigner$assign_result() ResultAssigner$format() ResultAssigner$print() ResultAssigner$clone()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/ResultAssigner.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Result Assigner Base Class — ResultAssigner","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/ResultAssigner.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Result Assigner Base Class — ResultAssigner","text":"","code":"ResultAssigner$new(label = NA_character_, man = NA_character_)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/ResultAssigner.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Result Assigner Base Class — ResultAssigner","text":"label (character(1)) Label object. man (character(1)) String format [pkg]::[topic] pointing manual page object.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/ResultAssigner.html","id":"method-assign-result-","dir":"Reference","previous_headings":"","what":"Method assign_result()","title":"Result Assigner Base Class — ResultAssigner","text":"Assigns result, .e., final point(s) instance.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/ResultAssigner.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Result Assigner Base Class — ResultAssigner","text":"","code":"ResultAssigner$assign_result(instance)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/ResultAssigner.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"Result Assigner Base Class — ResultAssigner","text":"instance (bbotk::OptimInstanceBatchSingleCrit | bbotk::OptimInstanceBatchMultiCrit) bbotk::OptimInstance final result assigned .","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/ResultAssigner.html","id":"method-format-","dir":"Reference","previous_headings":"","what":"Method format()","title":"Result Assigner Base Class — ResultAssigner","text":"Helper print outputs.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/ResultAssigner.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Result Assigner Base Class — ResultAssigner","text":"","code":"ResultAssigner$format()"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/ResultAssigner.html","id":"method-print-","dir":"Reference","previous_headings":"","what":"Method print()","title":"Result Assigner Base Class — ResultAssigner","text":"Print method.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/ResultAssigner.html","id":"usage-3","dir":"Reference","previous_headings":"","what":"Usage","title":"Result Assigner Base Class — ResultAssigner","text":"","code":"ResultAssigner$print()"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/ResultAssigner.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Result Assigner Base Class — ResultAssigner","text":"(character()).","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/ResultAssigner.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Result Assigner Base Class — ResultAssigner","text":"objects class cloneable method.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/ResultAssigner.html","id":"usage-4","dir":"Reference","previous_headings":"","what":"Usage","title":"Result Assigner Base Class — ResultAssigner","text":"","code":"ResultAssigner$clone(deep = FALSE)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/ResultAssigner.html","id":"arguments-2","dir":"Reference","previous_headings":"","what":"Arguments","title":"Result Assigner Base Class — ResultAssigner","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/Surrogate.html","id":null,"dir":"Reference","previous_headings":"","what":"Surrogate Model — Surrogate","title":"Surrogate Model — Surrogate","text":"Abstract surrogate model class. surrogate model used model unknown objective function(s) based points evaluated far.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/Surrogate.html","id":"public-fields","dir":"Reference","previous_headings":"","what":"Public fields","title":"Surrogate Model — Surrogate","text":"learner (learner) Arbitrary learner object depending subclass.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/Surrogate.html","id":"active-bindings","dir":"Reference","previous_headings":"","what":"Active bindings","title":"Surrogate Model — Surrogate","text":"print_id (character) Id used printing. archive (bbotk::Archive | NULL)bbotk::Archive bbotk::OptimInstance. n_learner (integer(1)) Returns number surrogate models. cols_x (character() | NULL) Column id's variables used features. default, automatically inferred based archive. cols_y (character() | NULL) Column id's variables used targets. default, automatically inferred based archive. insample_perf (numeric()) Surrogate model's current insample performance. param_set (paradox::ParamSet) Set hyperparameters. assert_insample_perf (numeric()) Asserts whether current insample performance meets performance threshold. packages (character()) Set required packages. warning signaled least one packages installed, loaded (attached) later -demand via requireNamespace(). feature_types (character()) Stores feature types surrogate can handle, e.g. \"logical\", \"numeric\", \"factor\". complete list candidate feature types, grouped task type, stored mlr_reflections$task_feature_types. properties (character()) Stores set properties/capabilities surrogate . complete list candidate properties, grouped task type, stored mlr_reflections$learner_properties. predict_type (character(1)) Retrieves currently active predict type, e.g. \"response\".","code":""},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/Surrogate.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Surrogate Model — Surrogate","text":"Surrogate$new() Surrogate$update() Surrogate$predict() Surrogate$format() Surrogate$print() Surrogate$clone()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/Surrogate.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Surrogate Model — Surrogate","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/Surrogate.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Surrogate Model — Surrogate","text":"","code":"Surrogate$new(learner, archive, cols_x, cols_y, param_set)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/Surrogate.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Surrogate Model — Surrogate","text":"learner (learner) Arbitrary learner object depending subclass. archive (bbotk::Archive | NULL)bbotk::Archive bbotk::OptimInstance. cols_x (character() | NULL) Column id's variables used features. default, automatically inferred based archive. cols_y (character() | NULL) Column id's variables used targets. default, automatically inferred based archive. param_set (paradox::ParamSet) Parameter space description depending subclass.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/Surrogate.html","id":"method-update-","dir":"Reference","previous_headings":"","what":"Method update()","title":"Surrogate Model — Surrogate","text":"Train learner new data. Subclasses must implement $private.update().","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/Surrogate.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Surrogate Model — Surrogate","text":"","code":"Surrogate$update()"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/Surrogate.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Surrogate Model — Surrogate","text":"NULL.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/Surrogate.html","id":"method-predict-","dir":"Reference","previous_headings":"","what":"Method predict()","title":"Surrogate Model — Surrogate","text":"Predict mean response standard error. Must implemented subclasses.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/Surrogate.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Surrogate Model — Surrogate","text":"","code":"Surrogate$predict(xdt)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/Surrogate.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"Surrogate Model — Surrogate","text":"xdt (data.table::data.table()) New data. One row per observation.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/Surrogate.html","id":"returns-1","dir":"Reference","previous_headings":"","what":"Returns","title":"Surrogate Model — Surrogate","text":"Arbitrary prediction object.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/Surrogate.html","id":"method-format-","dir":"Reference","previous_headings":"","what":"Method format()","title":"Surrogate Model — Surrogate","text":"Helper print outputs.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/Surrogate.html","id":"usage-3","dir":"Reference","previous_headings":"","what":"Usage","title":"Surrogate Model — Surrogate","text":"","code":"Surrogate$format()"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/Surrogate.html","id":"method-print-","dir":"Reference","previous_headings":"","what":"Method print()","title":"Surrogate Model — Surrogate","text":"Print method.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/Surrogate.html","id":"usage-4","dir":"Reference","previous_headings":"","what":"Usage","title":"Surrogate Model — Surrogate","text":"","code":"Surrogate$print()"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/Surrogate.html","id":"returns-2","dir":"Reference","previous_headings":"","what":"Returns","title":"Surrogate Model — Surrogate","text":"(character()).","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/Surrogate.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Surrogate Model — Surrogate","text":"objects class cloneable method.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/Surrogate.html","id":"usage-5","dir":"Reference","previous_headings":"","what":"Usage","title":"Surrogate Model — Surrogate","text":"","code":"Surrogate$clone(deep = FALSE)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/Surrogate.html","id":"arguments-2","dir":"Reference","previous_headings":"","what":"Arguments","title":"Surrogate Model — Surrogate","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/SurrogateLearner.html","id":null,"dir":"Reference","previous_headings":"","what":"Surrogate Model Containing a Single Learner — SurrogateLearner","title":"Surrogate Model Containing a Single Learner — SurrogateLearner","text":"Surrogate model containing single mlr3::LearnerRegr.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/SurrogateLearner.html","id":"parameters","dir":"Reference","previous_headings":"","what":"Parameters","title":"Surrogate Model Containing a Single Learner — SurrogateLearner","text":"assert_insample_perf logical(1) insample performance mlr3::LearnerRegr asserted updating surrogate? assertion fails (.e., insample performance based perf_measure meet perf_threshold), error thrown. Default FALSE. perf_measure mlr3::MeasureRegr Performance measure use assert insample performance mlr3::LearnerRegr. relevant assert_insample_perf = TRUE. Default mlr3::mlr_measures_regr.rsq. perf_threshold numeric(1) Threshold insample performance mlr3::LearnerRegr asserted . relevant assert_insample_perf = TRUE. Default 0. catch_errors logical(1) errors updating surrogate caught propagated loop_function can handle failed acquisition function optimization (result failed surrogate) appropriately , e.g., proposing randomly sampled point evaluation? Default TRUE.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/SurrogateLearner.html","id":"super-class","dir":"Reference","previous_headings":"","what":"Super class","title":"Surrogate Model Containing a Single Learner — SurrogateLearner","text":"mlr3mbo::Surrogate -> SurrogateLearner","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/SurrogateLearner.html","id":"active-bindings","dir":"Reference","previous_headings":"","what":"Active bindings","title":"Surrogate Model Containing a Single Learner — SurrogateLearner","text":"print_id (character) Id used printing. n_learner (integer(1)) Returns number surrogate models. assert_insample_perf (numeric()) Asserts whether current insample performance meets performance threshold. packages (character()) Set required packages. warning signaled least one packages installed, loaded (attached) later -demand via requireNamespace(). feature_types (character()) Stores feature types surrogate can handle, e.g. \"logical\", \"numeric\", \"factor\". complete list candidate feature types, grouped task type, stored mlr_reflections$task_feature_types. properties (character()) Stores set properties/capabilities surrogate . complete list candidate properties, grouped task type, stored mlr_reflections$learner_properties. predict_type (character(1)) Retrieves currently active predict type, e.g. \"response\".","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/SurrogateLearner.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Surrogate Model Containing a Single Learner — SurrogateLearner","text":"mlr3mbo::Surrogate$format() mlr3mbo::Surrogate$print() mlr3mbo::Surrogate$update()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/SurrogateLearner.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Surrogate Model Containing a Single Learner — SurrogateLearner","text":"SurrogateLearner$new() SurrogateLearner$predict() SurrogateLearner$clone()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/SurrogateLearner.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Surrogate Model Containing a Single Learner — SurrogateLearner","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/SurrogateLearner.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Surrogate Model Containing a Single Learner — SurrogateLearner","text":"","code":"SurrogateLearner$new(learner, archive = NULL, cols_x = NULL, col_y = NULL)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/SurrogateLearner.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Surrogate Model Containing a Single Learner — SurrogateLearner","text":"learner (mlr3::LearnerRegr). archive (bbotk::Archive | NULL)bbotk::Archive bbotk::OptimInstance. cols_x (character() | NULL) Column id's variables used features. default, automatically inferred based archive. col_y (character(1) | NULL) Column id variable used target. default, automatically inferred based archive.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/SurrogateLearner.html","id":"method-predict-","dir":"Reference","previous_headings":"","what":"Method predict()","title":"Surrogate Model Containing a Single Learner — SurrogateLearner","text":"Predict mean response standard error.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/SurrogateLearner.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Surrogate Model Containing a Single Learner — SurrogateLearner","text":"","code":"SurrogateLearner$predict(xdt)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/SurrogateLearner.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"Surrogate Model Containing a Single Learner — SurrogateLearner","text":"xdt (data.table::data.table()) New data. One row per observation.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/SurrogateLearner.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Surrogate Model Containing a Single Learner — SurrogateLearner","text":"data.table::data.table() columns mean se.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/SurrogateLearner.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Surrogate Model Containing a Single Learner — SurrogateLearner","text":"objects class cloneable method.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/SurrogateLearner.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Surrogate Model Containing a Single Learner — SurrogateLearner","text":"","code":"SurrogateLearner$clone(deep = FALSE)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/SurrogateLearner.html","id":"arguments-2","dir":"Reference","previous_headings":"","what":"Arguments","title":"Surrogate Model Containing a Single Learner — SurrogateLearner","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/SurrogateLearner.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Surrogate Model Containing a Single Learner — SurrogateLearner","text":"","code":"if (requireNamespace(\"mlr3learners\") & requireNamespace(\"DiceKriging\") & requireNamespace(\"rgenoud\")) { library(bbotk) library(paradox) library(mlr3learners) 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)) xdt = generate_design_random(instance$search_space, n = 4)$data instance$eval_batch(xdt) learner = default_gp() surrogate = srlrn(learner, archive = instance$archive) surrogate$update() surrogate$learner$model } #> #> Call: #> DiceKriging::km(design = data, response = task$truth(), covtype = \"matern5_2\", #> nugget = 2.83305750865222e-07, optim.method = \"gen\", control = pv$control) #> #> Trend coeff.: #> Estimate #> (Intercept) 5.8590 #> #> Covar. type : matern5_2 #> Covar. coeff.: #> Estimate #> theta(x) 1.1710 #> #> Variance estimate: 21.95183 #> #> Nugget effect : 2.833058e-07 #>"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/SurrogateLearnerCollection.html","id":null,"dir":"Reference","previous_headings":"","what":"Surrogate Model Containing Multiple Learners — SurrogateLearnerCollection","title":"Surrogate Model Containing Multiple Learners — SurrogateLearnerCollection","text":"Surrogate model containing multiple mlr3::LearnerRegr. mlr3::LearnerRegr fit target variables indicated via cols_y. Note redundant mlr3::LearnerRegr must deep clones.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/SurrogateLearnerCollection.html","id":"parameters","dir":"Reference","previous_headings":"","what":"Parameters","title":"Surrogate Model Containing Multiple Learners — SurrogateLearnerCollection","text":"assert_insample_perf logical(1) insample performance mlr3::LearnerRegr asserted updating surrogate? assertion fails (.e., insample performance based perf_measure meet perf_threshold), error thrown. Default FALSE. perf_measure List mlr3::MeasureRegr Performance measures use assert insample performance mlr3::LearnerRegr. relevant assert_insample_perf = TRUE. Default mlr3::mlr_measures_regr.rsq learner. perf_threshold List numeric(1) Thresholds insample performance mlr3::LearnerRegr asserted . relevant assert_insample_perf = TRUE. Default 0 learner. catch_errors logical(1) errors updating surrogate caught propagated loop_function can handle failed acquisition function optimization (result failed surrogate) appropriately , e.g., proposing randomly sampled point evaluation? Default TRUE.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/SurrogateLearnerCollection.html","id":"super-class","dir":"Reference","previous_headings":"","what":"Super class","title":"Surrogate Model Containing Multiple Learners — SurrogateLearnerCollection","text":"mlr3mbo::Surrogate -> SurrogateLearnerCollection","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/SurrogateLearnerCollection.html","id":"active-bindings","dir":"Reference","previous_headings":"","what":"Active bindings","title":"Surrogate Model Containing Multiple Learners — SurrogateLearnerCollection","text":"print_id (character) Id used printing. n_learner (integer(1)) Returns number surrogate models. assert_insample_perf (numeric()) Asserts whether current insample performance meets performance threshold. packages (character()) Set required packages. warning signaled least one packages installed, loaded (attached) later -demand via requireNamespace(). feature_types (character()) Stores feature types surrogate can handle, e.g. \"logical\", \"numeric\", \"factor\". complete list candidate feature types, grouped task type, stored mlr_reflections$task_feature_types. properties (character()) Stores set properties/capabilities surrogate . complete list candidate properties, grouped task type, stored mlr_reflections$learner_properties. predict_type (character(1)) Retrieves currently active predict type, e.g. \"response\".","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/SurrogateLearnerCollection.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Surrogate Model Containing Multiple Learners — SurrogateLearnerCollection","text":"mlr3mbo::Surrogate$format() mlr3mbo::Surrogate$print() mlr3mbo::Surrogate$update()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/SurrogateLearnerCollection.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Surrogate Model Containing Multiple Learners — SurrogateLearnerCollection","text":"SurrogateLearnerCollection$new() SurrogateLearnerCollection$predict() SurrogateLearnerCollection$clone()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/SurrogateLearnerCollection.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Surrogate Model Containing Multiple Learners — SurrogateLearnerCollection","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/SurrogateLearnerCollection.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Surrogate Model Containing Multiple Learners — SurrogateLearnerCollection","text":"","code":"SurrogateLearnerCollection$new( learners, archive = NULL, cols_x = NULL, cols_y = NULL )"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/SurrogateLearnerCollection.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Surrogate Model Containing Multiple Learners — SurrogateLearnerCollection","text":"learners (list mlr3::LearnerRegr). archive (bbotk::Archive | NULL)bbotk::Archive bbotk::OptimInstance. cols_x (character() | NULL) Column id's variables used features. default, automatically inferred based archive. cols_y (character() | NULL) Column id's variables used targets. default, automatically inferred based archive.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/SurrogateLearnerCollection.html","id":"method-predict-","dir":"Reference","previous_headings":"","what":"Method predict()","title":"Surrogate Model Containing Multiple Learners — SurrogateLearnerCollection","text":"Predict mean response standard error. Returns named list data.tables. contains mean response standard error one col_y.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/SurrogateLearnerCollection.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Surrogate Model Containing Multiple Learners — SurrogateLearnerCollection","text":"","code":"SurrogateLearnerCollection$predict(xdt)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/SurrogateLearnerCollection.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"Surrogate Model Containing Multiple Learners — SurrogateLearnerCollection","text":"xdt (data.table::data.table()) New data. One row per observation.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/SurrogateLearnerCollection.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Surrogate Model Containing Multiple Learners — SurrogateLearnerCollection","text":"list data.table::data.table()s columns mean se.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/SurrogateLearnerCollection.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Surrogate Model Containing Multiple Learners — SurrogateLearnerCollection","text":"objects class cloneable method.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/SurrogateLearnerCollection.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Surrogate Model Containing Multiple Learners — SurrogateLearnerCollection","text":"","code":"SurrogateLearnerCollection$clone(deep = FALSE)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/SurrogateLearnerCollection.html","id":"arguments-2","dir":"Reference","previous_headings":"","what":"Arguments","title":"Surrogate Model Containing Multiple Learners — SurrogateLearnerCollection","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/SurrogateLearnerCollection.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Surrogate Model Containing Multiple Learners — SurrogateLearnerCollection","text":"","code":"if (requireNamespace(\"mlr3learners\") & requireNamespace(\"DiceKriging\") & requireNamespace(\"rgenoud\") & requireNamespace(\"ranger\")) { library(bbotk) library(paradox) library(mlr3learners) fun = function(xs) { list(y1 = xs$x^2, y2 = (xs$x - 2) ^ 2) } domain = ps(x = p_dbl(lower = -10, upper = 10)) codomain = ps(y1 = p_dbl(tags = \"minimize\"), y2 = p_dbl(tags = \"minimize\")) objective = ObjectiveRFun$new(fun = fun, domain = domain, codomain = codomain) instance = OptimInstanceBatchMultiCrit$new( objective = objective, terminator = trm(\"evals\", n_evals = 5)) xdt = generate_design_random(instance$search_space, n = 4)$data instance$eval_batch(xdt) learner1 = default_gp() learner2 = default_rf() surrogate = srlrn(list(learner1, learner2), archive = instance$archive) surrogate$update() surrogate$learner surrogate$learner[[\"y2\"]]$model } #> Loading required namespace: ranger #> Ranger result #> #> Call: #> ranger::ranger(dependent.variable.name = task$target_names, data = task$data(), case.weights = task$weights$weight, keep.inbag = TRUE, num.threads = 1L, num.trees = 100L) #> #> Type: Regression #> Number of trees: 100 #> Sample size: 4 #> Number of independent variables: 1 #> Mtry: 1 #> Target node size: 5 #> Variable importance mode: none #> Splitrule: variance #> OOB prediction error (MSE): 4791.712 #> R squared (OOB): -0.404484"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/acqf.html","id":null,"dir":"Reference","previous_headings":"","what":"Syntactic Sugar Acquisition Function Construction — acqf","title":"Syntactic Sugar Acquisition Function Construction — acqf","text":"function complements mlr_acqfunctions functions spirit mlr_sugar mlr3.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/acqf.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Syntactic Sugar Acquisition Function Construction — acqf","text":"","code":"acqf(.key, ...)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/acqf.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Syntactic Sugar Acquisition Function Construction — acqf","text":".key (character(1)) Key passed respective dictionary retrieve object. ... (named list()) Named arguments passed constructor, set parameters paradox::ParamSet, set public field. See mlr3misc::dictionary_sugar_get() details.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/acqf.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Syntactic Sugar Acquisition Function Construction — acqf","text":"AcqFunction","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/acqf.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Syntactic Sugar Acquisition Function Construction — acqf","text":"","code":"acqf(\"ei\") #> #> Domain: #> #> Empty. #> Codomain: #> #> Empty."},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/acqo.html","id":null,"dir":"Reference","previous_headings":"","what":"Syntactic Sugar Acquisition Function Optimizer Construction — acqo","title":"Syntactic Sugar Acquisition Function Optimizer Construction — acqo","text":"function allows construct AcqOptimizer spirit mlr_sugar mlr3.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/acqo.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Syntactic Sugar Acquisition Function Optimizer Construction — acqo","text":"","code":"acqo(optimizer, terminator, acq_function = NULL, ...)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/acqo.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Syntactic Sugar Acquisition Function Optimizer Construction — acqo","text":"optimizer (bbotk::Optimizer)bbotk::Optimizer used. terminator (bbotk::Terminator)bbotk::Terminator used. acq_function (NULL | AcqFunction)AcqFunction used. Can also NULL. ... (named list()) Named arguments passed constructor, set parameters paradox::ParamSet.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/acqo.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Syntactic Sugar Acquisition Function Optimizer Construction — acqo","text":"AcqOptimizer","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/acqo.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Syntactic Sugar Acquisition Function Optimizer Construction — acqo","text":"","code":"library(bbotk) acqo(opt(\"random_search\"), trm(\"evals\"), catch_errors = FALSE) #> : (OptimizerBatchRandomSearch | TerminatorEvals) #> * Parameters: n_candidates=1, logging_level=warn, warmstart=FALSE, #> skip_already_evaluated=TRUE, catch_errors=FALSE"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/default_acqfunction.html","id":null,"dir":"Reference","previous_headings":"","what":"Default Acquisition Function — default_acqfunction","title":"Default Acquisition Function — default_acqfunction","text":"Chooses default acquisition function, .e. criterion used propose future points. single-objective optimization, defaults mlr_acqfunctions_ei. multi-objective optimization, defaults mlr_acqfunctions_smsego.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/default_acqfunction.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Default Acquisition Function — default_acqfunction","text":"","code":"default_acqfunction(instance)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/default_acqfunction.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Default Acquisition Function — default_acqfunction","text":"instance (bbotk::OptimInstance).","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/default_acqfunction.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Default Acquisition Function — default_acqfunction","text":"AcqFunction","code":""},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/default_acqoptimizer.html","id":null,"dir":"Reference","previous_headings":"","what":"Default Acquisition Function Optimizer — default_acqoptimizer","title":"Default Acquisition Function Optimizer — default_acqoptimizer","text":"Chooses default acquisition function optimizer. Defaults wrapping bbotk::OptimizerBatchRandomSearch allowing 10000 function evaluations (batch size 1000) via bbotk::TerminatorEvals.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/default_acqoptimizer.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Default Acquisition Function Optimizer — default_acqoptimizer","text":"","code":"default_acqoptimizer(acq_function)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/default_acqoptimizer.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Default Acquisition Function Optimizer — default_acqoptimizer","text":"acq_function (AcqFunction).","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/default_acqoptimizer.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Default Acquisition Function Optimizer — default_acqoptimizer","text":"AcqOptimizer","code":""},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/default_gp.html","id":null,"dir":"Reference","previous_headings":"","what":"Default Gaussian Process — default_gp","title":"Default Gaussian Process — default_gp","text":"helper function constructs default Gaussian Process mlr3::LearnerRegr example used default_surrogate. Constructs Kriging learner “\"regr.km\"” kernel “\"matern5_2\"”. noisy = FALSE (default) small nugget effect added nugget.stability = 10^-8 increase numerical stability hopefully prevent crashes DiceKriging. noisy = TRUE nugget effect estimated nugget.estim = TRUE. noisy = TRUE jitter set TRUE circumvent problem DiceKriging already trained input values produce exact trained output. general, instead default \"BFGS\" optimization method use rgenoud (\"gen\"), hybrid algorithm, combine global search based genetic algorithms local search based gradients. may improve model fit less frequently produce constant model prediction.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/default_gp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Default Gaussian Process — default_gp","text":"","code":"default_gp(noisy = FALSE)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/default_gp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Default Gaussian Process — default_gp","text":"noisy (logical(1)) Whether learner used noisy objective function scenario. See .","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/default_gp.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Default Gaussian Process — default_gp","text":"mlr3::LearnerRegr","code":""},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/default_loop_function.html","id":null,"dir":"Reference","previous_headings":"","what":"Default Loop Function — default_loop_function","title":"Default Loop Function — default_loop_function","text":"Chooses default loop_function, .e. Bayesian Optimization flavor used optimization. single-objective optimization, defaults bayesopt_ego. multi-objective optimization, defaults bayesopt_smsego.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/default_loop_function.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Default Loop Function — default_loop_function","text":"","code":"default_loop_function(instance)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/default_loop_function.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Default Loop Function — default_loop_function","text":"instance (bbotk::OptimInstance) object inherits bbotk::OptimInstance.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/default_loop_function.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Default Loop Function — default_loop_function","text":"loop_function","code":""},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/default_result_assigner.html","id":null,"dir":"Reference","previous_headings":"","what":"Default Result Assigner — default_result_assigner","title":"Default Result Assigner — default_result_assigner","text":"Chooses default result assigner. Defaults ResultAssignerArchive.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/default_result_assigner.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Default Result Assigner — default_result_assigner","text":"","code":"default_result_assigner(instance)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/default_result_assigner.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Default Result Assigner — default_result_assigner","text":"instance (bbotk::OptimInstance) object inherits bbotk::OptimInstance.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/default_result_assigner.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Default Result Assigner — default_result_assigner","text":"ResultAssigner","code":""},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/default_rf.html","id":null,"dir":"Reference","previous_headings":"","what":"Default Random Forest — default_rf","title":"Default Random Forest — default_rf","text":"helper function constructs default random forest mlr3::LearnerRegr example used default_surrogate. Constructs ranger learner “\"regr.ranger\"” num.trees = 100, keep.inbag = TRUE se.method = \"jack\".","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/default_rf.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Default Random Forest — default_rf","text":"","code":"default_rf(noisy = FALSE)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/default_rf.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Default Random Forest — default_rf","text":"noisy (logical(1)) Whether learner used noisy objective function scenario. Currently effect.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/default_rf.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Default Random Forest — default_rf","text":"mlr3::LearnerRegr","code":""},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/default_surrogate.html","id":null,"dir":"Reference","previous_headings":"","what":"Default Surrogate — default_surrogate","title":"Default Surrogate — default_surrogate","text":"helper function constructs default Surrogate based properties bbotk::OptimInstance. numeric-(including integers) parameter spaces without dependencies Gaussian Process constricted via default_gp(). mixed numeric-categorical parameter spaces, spaces conditional parameters random forest constructed via default_rf(). case, learners encapsulated using “\"evaluate\"”, fallback learner set, cases surrogate learner errors. Currently, following learner used fallback: lrn(\"regr.ranger\", num.trees = 10L, keep.inbag = TRUE, se.method = \"jack\"). additionally dependencies present parameter space, inactive conditional parameters represented missing NA values training design data. simply handle imputation method, added random forest, concretely use po(\"imputesample\") (logicals) po(\"imputeoor\") (anything else) package mlr3pipelines. Characters always encoded factors via po(\"colapply\"). range imputation makes sense tree-based methods usually hard beat, see Ding et al. (2010). case dependencies, following learner used fallback: lrn(\"regr.featureless\"). instance class bbotk::OptimInstanceBatchSingleCrit learner wrapped SurrogateLearner. instance class bbotk::OptimInstanceBatchMultiCrit multiple deep clones learner wrapped SurrogateLearnerCollection.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/default_surrogate.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Default Surrogate — default_surrogate","text":"","code":"default_surrogate(instance, learner = NULL, n_learner = NULL)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/default_surrogate.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Default Surrogate — default_surrogate","text":"instance (bbotk::OptimInstance) object inherits bbotk::OptimInstance. learner (NULL | mlr3::Learner). specified, learner used instead defaults described . n_learner (NULL | integer(1)). Number learners considered construction SurrogateLearner SurrogateLearnerCollection. specified based number objectives stated instance.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/default_surrogate.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Default Surrogate — default_surrogate","text":"Surrogate","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/default_surrogate.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Default Surrogate — default_surrogate","text":"Ding, Yufeng, Simonoff, S J (2010). “Investigation Missing Data Methods Classification Trees Applied Binary Response Data.” Journal Machine Learning Research, 11(1), 131–170.","code":""},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/loop_function.html","id":null,"dir":"Reference","previous_headings":"","what":"Loop Functions for Bayesian Optimization — loop_function","title":"Loop Functions for Bayesian Optimization — loop_function","text":"Loop functions determine behavior Bayesian Optimization algorithm global level. overview readily available loop functions, see .data.table(mlr_loop_functions). general, loop function simply decorated member S3 class loop_function. Attributes must include: id (id loop function), label (brief description), instance (\"single-crit\" \"multi_crit\"), man (link manual page). example, see, e.g., bayesopt_ego.","code":""},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mbo_defaults.html","id":null,"dir":"Reference","previous_headings":"","what":"Defaults for OptimizerMbo — mbo_defaults","title":"Defaults for OptimizerMbo — mbo_defaults","text":"following defaults set OptimizerMbo optimization respective fields set initialization. Optimization Loop: default_loop_function Surrogate: default_surrogate Acquisition Function: default_acqfunction Acqfun Optimizer: default_acqoptimizer Result Assigner: default_result_assigner","code":""},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr3mbo-package.html","id":null,"dir":"Reference","previous_headings":"","what":"mlr3mbo: Flexible Bayesian Optimization — mlr3mbo-package","title":"mlr3mbo: Flexible Bayesian Optimization — mlr3mbo-package","text":"modern flexible approach Bayesian Optimization / Model Based Optimization building 'bbotk' package. 'mlr3mbo' toolbox providing ready--use optimization algorithms well fundamental building blocks allowing straightforward implementation custom algorithms. Single- multi-objective optimization supported well mixed continuous, categorical conditional search spaces. Moreover, using 'mlr3mbo' hyperparameter optimization machine learning models within 'mlr3' ecosystem straightforward via 'mlr3tuning'. Examples ready--use optimization algorithms include Efficient Global Optimization Jones et al. (1998) doi:10.1023/:1008306431147 , ParEGO Knowles (2006) doi:10.1109/TEVC.2005.851274 SMS-EGO Ponweiser et al. (2008) doi:10.1007/978-3-540-87700-4_78 .","code":""},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr3mbo-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"mlr3mbo: Flexible Bayesian Optimization — mlr3mbo-package","text":"Maintainer: Lennart Schneider lennart.sch@web.de (ORCID) Authors: Jakob Richter jakob1richter@gmail.com (ORCID) Marc Becker marcbecker@posteo.de (ORCID) Michel Lang michellang@gmail.com (ORCID) Bernd Bischl bernd_bischl@gmx.net (ORCID) Florian Pfisterer pfistererf@googlemail.com (ORCID) Martin Binder mlr.developer@mb706.com Sebastian Fischer sebf.fischer@gmail.com (ORCID) contributors: Michael H. Buselli [copyright holder] Wessel Dankers [copyright holder] Carlos Fonseca [copyright holder] Manuel Lopez-Ibanez [copyright holder] Luis Paquete [copyright holder]","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions.html","id":null,"dir":"Reference","previous_headings":"","what":"Dictionary of Acquisition Functions — mlr_acqfunctions","title":"Dictionary of Acquisition Functions — mlr_acqfunctions","text":"simple mlr3misc::Dictionary storing objects class AcqFunction. acquisition function associated help page, see mlr_acqfunctions_[id]. convenient way retrieve construct acquisition function, see acqf().","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Dictionary of Acquisition Functions — mlr_acqfunctions","text":"R6::R6Class object inheriting mlr3misc::Dictionary.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Dictionary of Acquisition Functions — mlr_acqfunctions","text":"See mlr3misc::Dictionary.","code":""},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Dictionary of Acquisition Functions — mlr_acqfunctions","text":"","code":"library(data.table) as.data.table(mlr_acqfunctions) #> Key: #> key label #> #> 1: aei Augmented Expected Improvement #> 2: cb Lower / Upper Confidence Bound #> 3: ehvi Expected Hypervolume Improvement #> 4: ehvigh Expected Hypervolume Improvement via GH Quadrature #> 5: ei Expected Improvement #> 6: eips Expected Improvement Per Second #> 7: mean Posterior Mean #> 8: pi Probability Of Improvement #> 9: sd Posterior Standard Deviation #> 10: smsego SMS-EGO #> man #> #> 1: mlr3mbo::mlr_acqfunctions_aei #> 2: mlr3mbo::mlr_acqfunctions_cb #> 3: mlr3mbo::mlr_acqfunctions_ehvi #> 4: mlr3mbo::mlr_acqfunctions_ehvigh #> 5: mlr3mbo::mlr_acqfunctions_ei #> 6: mlr3mbo::mlr_acqfunctions_eips #> 7: mlr3mbo::mlr_acqfunctions_mean #> 8: mlr3mbo::mlr_acqfunctions_pi #> 9: mlr3mbo::mlr_acqfunctions_sd #> 10: mlr3mbo::mlr_acqfunctions_smsego acqf(\"ei\") #> #> Domain: #> #> Empty. #> Codomain: #> #> Empty."},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_aei.html","id":null,"dir":"Reference","previous_headings":"","what":"Acquisition Function Augmented Expected Improvement — mlr_acqfunctions_aei","title":"Acquisition Function Augmented Expected Improvement — mlr_acqfunctions_aei","text":"Augmented Expected Improvement. Useful working noisy objectives. Currently works correctly \"regr.km\" surrogate model nugget.estim = TRUE given.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_aei.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Acquisition Function Augmented Expected Improvement — mlr_acqfunctions_aei","text":"AcqFunction can instantiated via dictionary mlr_acqfunctions associated sugar function acqf():","code":"mlr_acqfunctions$get(\"aei\") acqf(\"aei\")"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_aei.html","id":"parameters","dir":"Reference","previous_headings":"","what":"Parameters","title":"Acquisition Function Augmented Expected Improvement — mlr_acqfunctions_aei","text":"\"c\" (numeric(1)) Constant \\(c\\) used Formula (14) Huang (2012) reflect degree risk aversion. Defaults 1.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_aei.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Acquisition Function Augmented Expected Improvement — mlr_acqfunctions_aei","text":"Huang D, Allen TT, Notz WI, Zheng N (2012). “Erratum : Global Optimization Stochastic Black-box Systems via Sequential Kriging Meta-Models.” Journal Global Optimization, 54(2), 431–431.","code":""},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_aei.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Acquisition Function Augmented Expected Improvement — mlr_acqfunctions_aei","text":"bbotk::Objective -> mlr3mbo::AcqFunction -> AcqFunctionAEI","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_aei.html","id":"public-fields","dir":"Reference","previous_headings":"","what":"Public fields","title":"Acquisition Function Augmented Expected Improvement — mlr_acqfunctions_aei","text":"y_effective_best (numeric(1)) Best effective objective value observed far. case maximization, already includes necessary change sign. noise_var (numeric(1)) Estimate variance noise. corresponds nugget estimate using mlr3learners surrogate model.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_aei.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Acquisition Function Augmented Expected Improvement — mlr_acqfunctions_aei","text":"bbotk::Objective$eval() bbotk::Objective$format() bbotk::Objective$help() bbotk::Objective$print() mlr3mbo::AcqFunction$eval_dt() mlr3mbo::AcqFunction$eval_many()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_aei.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Acquisition Function Augmented Expected Improvement — mlr_acqfunctions_aei","text":"AcqFunctionAEI$new() AcqFunctionAEI$update() AcqFunctionAEI$clone()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_aei.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Acquisition Function Augmented Expected Improvement — mlr_acqfunctions_aei","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_aei.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function Augmented Expected Improvement — mlr_acqfunctions_aei","text":"","code":"AcqFunctionAEI$new(surrogate = NULL, c = 1)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_aei.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Acquisition Function Augmented Expected Improvement — mlr_acqfunctions_aei","text":"surrogate (NULL | SurrogateLearner). c (numeric(1)).","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_aei.html","id":"method-update-","dir":"Reference","previous_headings":"","what":"Method update()","title":"Acquisition Function Augmented Expected Improvement — mlr_acqfunctions_aei","text":"Updates acquisition function sets y_effective_best noise_var.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_aei.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function Augmented Expected Improvement — mlr_acqfunctions_aei","text":"","code":"AcqFunctionAEI$update()"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_aei.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Acquisition Function Augmented Expected Improvement — mlr_acqfunctions_aei","text":"objects class cloneable method.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_aei.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function Augmented Expected Improvement — mlr_acqfunctions_aei","text":"","code":"AcqFunctionAEI$clone(deep = FALSE)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_aei.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"Acquisition Function Augmented Expected Improvement — mlr_acqfunctions_aei","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_aei.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Acquisition Function Augmented Expected Improvement — mlr_acqfunctions_aei","text":"","code":"if (requireNamespace(\"mlr3learners\") & requireNamespace(\"DiceKriging\") & requireNamespace(\"rgenoud\")) { library(bbotk) library(paradox) library(mlr3learners) library(data.table) set.seed(2906) fun = function(xs) { list(y = xs$x ^ 2 + rnorm(length(xs$x), mean = 0, sd = 1)) } 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, properties = \"noisy\") instance = OptimInstanceBatchSingleCrit$new( objective = objective, terminator = trm(\"evals\", n_evals = 5)) instance$eval_batch(data.table(x = c(-6, -5, 3, 9))) learner = lrn(\"regr.km\", covtype = \"matern5_2\", optim.method = \"gen\", nugget.estim = TRUE, jitter = 1e-12, control = list(trace = FALSE)) surrogate = srlrn(learner, archive = instance$archive) acq_function = acqf(\"aei\", surrogate = surrogate) acq_function$surrogate$update() acq_function$update() acq_function$eval_dt(data.table(x = c(-1, 0, 1))) } #> acq_aei #> #> 1: 7.583607 #> 2: 7.583607 #> 3: 7.583607"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_cb.html","id":null,"dir":"Reference","previous_headings":"","what":"Acquisition Function Confidence Bound — mlr_acqfunctions_cb","title":"Acquisition Function Confidence Bound — mlr_acqfunctions_cb","text":"Lower / Upper Confidence Bound.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_cb.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Acquisition Function Confidence Bound — mlr_acqfunctions_cb","text":"AcqFunction can instantiated via dictionary mlr_acqfunctions associated sugar function acqf():","code":"mlr_acqfunctions$get(\"cb\") acqf(\"cb\")"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_cb.html","id":"parameters","dir":"Reference","previous_headings":"","what":"Parameters","title":"Acquisition Function Confidence Bound — mlr_acqfunctions_cb","text":"\"lambda\" (numeric(1)) \\(\\lambda\\) value used confidence bound. Defaults 2.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_cb.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Acquisition Function Confidence Bound — mlr_acqfunctions_cb","text":"Snoek, Jasper, Larochelle, Hugo, Adams, P R (2012). “Practical Bayesian Optimization Machine Learning Algorithms.” Pereira F, Burges CJC, Bottou L, Weinberger KQ (eds.), Advances Neural Information Processing Systems, volume 25, 2951–2959.","code":""},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_cb.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Acquisition Function Confidence Bound — mlr_acqfunctions_cb","text":"bbotk::Objective -> mlr3mbo::AcqFunction -> AcqFunctionCB","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_cb.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Acquisition Function Confidence Bound — mlr_acqfunctions_cb","text":"bbotk::Objective$eval() bbotk::Objective$format() bbotk::Objective$help() bbotk::Objective$print() mlr3mbo::AcqFunction$eval_dt() mlr3mbo::AcqFunction$eval_many() mlr3mbo::AcqFunction$update()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_cb.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Acquisition Function Confidence Bound — mlr_acqfunctions_cb","text":"AcqFunctionCB$new() AcqFunctionCB$clone()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_cb.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Acquisition Function Confidence Bound — mlr_acqfunctions_cb","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_cb.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function Confidence Bound — mlr_acqfunctions_cb","text":"","code":"AcqFunctionCB$new(surrogate = NULL, lambda = 2)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_cb.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Acquisition Function Confidence Bound — mlr_acqfunctions_cb","text":"surrogate (NULL | SurrogateLearner). lambda (numeric(1)).","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_cb.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Acquisition Function Confidence Bound — mlr_acqfunctions_cb","text":"objects class cloneable method.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_cb.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function Confidence Bound — mlr_acqfunctions_cb","text":"","code":"AcqFunctionCB$clone(deep = FALSE)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_cb.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"Acquisition Function Confidence Bound — mlr_acqfunctions_cb","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_cb.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Acquisition Function Confidence Bound — mlr_acqfunctions_cb","text":"","code":"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))) } #> acq_cb #> #> 1: -55.38831 #> 2: -55.57158 #> 3: -49.63773"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ehvi.html","id":null,"dir":"Reference","previous_headings":"","what":"Acquisition Function Expected Hypervolume Improvement — mlr_acqfunctions_ehvi","title":"Acquisition Function Expected Hypervolume Improvement — mlr_acqfunctions_ehvi","text":"Exact Expected Hypervolume Improvement. Calculates exact expected hypervolume improvement case two objectives. case optimizing two objective functions, AcqFunctionEHVIGH can used. See Emmerich et al. (2016) details.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ehvi.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Acquisition Function Expected Hypervolume Improvement — mlr_acqfunctions_ehvi","text":"Emmerich, Michael, Yang, Kaifeng, Deutz, André, Wang, Hao, Fonseca, M. C (2016). “Multicriteria Generalization Bayesian Global Optimization.” Pardalos, M. P, Zhigljavsky, Anatoly, Žilinskas, Julius (eds.), Advances Stochastic Deterministic Global Optimization, 229–242. Springer International Publishing, Cham.","code":""},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ehvi.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Acquisition Function Expected Hypervolume Improvement — mlr_acqfunctions_ehvi","text":"bbotk::Objective -> mlr3mbo::AcqFunction -> AcqFunctionEHVI","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ehvi.html","id":"public-fields","dir":"Reference","previous_headings":"","what":"Public fields","title":"Acquisition Function Expected Hypervolume Improvement — mlr_acqfunctions_ehvi","text":"ys_front (matrix()) Approximated Pareto front. Sorted first objective. Signs corrected respect assuming minimization objectives. ref_point (numeric()) Reference point. Signs corrected respect assuming minimization objectives. ys_front_augmented (matrix()) Augmented approximated Pareto front. Sorted first objective. Signs corrected respect assuming minimization objectives.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ehvi.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Acquisition Function Expected Hypervolume Improvement — mlr_acqfunctions_ehvi","text":"bbotk::Objective$eval() bbotk::Objective$format() bbotk::Objective$help() bbotk::Objective$print() mlr3mbo::AcqFunction$eval_dt() mlr3mbo::AcqFunction$eval_many()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ehvi.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Acquisition Function Expected Hypervolume Improvement — mlr_acqfunctions_ehvi","text":"AcqFunctionEHVI$new() AcqFunctionEHVI$update() AcqFunctionEHVI$clone()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ehvi.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Acquisition Function Expected Hypervolume Improvement — mlr_acqfunctions_ehvi","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ehvi.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function Expected Hypervolume Improvement — mlr_acqfunctions_ehvi","text":"","code":"AcqFunctionEHVI$new(surrogate = NULL)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ehvi.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Acquisition Function Expected Hypervolume Improvement — mlr_acqfunctions_ehvi","text":"surrogate (NULL | SurrogateLearnerCollection).","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ehvi.html","id":"method-update-","dir":"Reference","previous_headings":"","what":"Method update()","title":"Acquisition Function Expected Hypervolume Improvement — mlr_acqfunctions_ehvi","text":"Updates acquisition function sets ys_front, ref_point.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ehvi.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function Expected Hypervolume Improvement — mlr_acqfunctions_ehvi","text":"","code":"AcqFunctionEHVI$update()"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ehvi.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Acquisition Function Expected Hypervolume Improvement — mlr_acqfunctions_ehvi","text":"objects class cloneable method.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ehvi.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function Expected Hypervolume Improvement — mlr_acqfunctions_ehvi","text":"","code":"AcqFunctionEHVI$clone(deep = FALSE)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ehvi.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"Acquisition Function Expected Hypervolume Improvement — mlr_acqfunctions_ehvi","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ehvi.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Acquisition Function Expected Hypervolume Improvement — mlr_acqfunctions_ehvi","text":"","code":"if (requireNamespace(\"mlr3learners\") & requireNamespace(\"DiceKriging\") & requireNamespace(\"rgenoud\")) { library(bbotk) library(paradox) library(mlr3learners) library(data.table) fun = function(xs) { list(y1 = xs$x^2, y2 = (xs$x - 2) ^ 2) } domain = ps(x = p_dbl(lower = -10, upper = 10)) codomain = ps(y1 = p_dbl(tags = \"minimize\"), y2 = p_dbl(tags = \"minimize\")) objective = ObjectiveRFun$new(fun = fun, domain = domain, codomain = codomain) instance = OptimInstanceBatchMultiCrit$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) acq_function = acqf(\"ehvi\", surrogate = surrogate) acq_function$surrogate$update() acq_function$update() acq_function$eval_dt(data.table(x = c(-1, 0, 1))) } #> acq_ehvi #> #> 1: 206.4260 #> 2: 264.3261 #> 3: 376.3486"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ehvigh.html","id":null,"dir":"Reference","previous_headings":"","what":"Acquisition Function Expected Hypervolume Improvement via Gauss-Hermite Quadrature — mlr_acqfunctions_ehvigh","title":"Acquisition Function Expected Hypervolume Improvement via Gauss-Hermite Quadrature — mlr_acqfunctions_ehvigh","text":"Expected Hypervolume Improvement. Computed via Gauss-Hermite quadrature. case optimizing two objective functions AcqFunctionEHVI preferred.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ehvigh.html","id":"parameters","dir":"Reference","previous_headings":"","what":"Parameters","title":"Acquisition Function Expected Hypervolume Improvement via Gauss-Hermite Quadrature — mlr_acqfunctions_ehvigh","text":"\"k\" (integer(1)) Number nodes per objective used numerical integration via Gauss-Hermite quadrature. Defaults 15. example, two objectives optimized, total number nodes therefore 225 per default. Changing value construction requires call $update() update $gh_data field. \"r\" (numeric(1)) Pruning rate 0 1 determines fraction nodes Gauss-Hermite quadrature rule ignored based weight value (nodes lowest weights ignored). Default 0.2. Changing value construction require call $update().","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ehvigh.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Acquisition Function Expected Hypervolume Improvement via Gauss-Hermite Quadrature — mlr_acqfunctions_ehvigh","text":"Rahat, Alma, Chugh, Tinkle, Fieldsend, Jonathan, Allmendinger, Richard, Miettinen, Kaisa (2022). “Efficient Approximation Expected Hypervolume Improvement using Gauss-Hermit Quadrature.” Rudolph, Günter, Kononova, V. , Aguirre, Hernán, Kerschke, Pascal, Ochoa, Gabriela, Tušar, Tea (eds.), Parallel Problem Solving Nature – PPSN XVII, 90–103.","code":""},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ehvigh.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Acquisition Function Expected Hypervolume Improvement via Gauss-Hermite Quadrature — mlr_acqfunctions_ehvigh","text":"bbotk::Objective -> mlr3mbo::AcqFunction -> AcqFunctionEHVIGH","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ehvigh.html","id":"public-fields","dir":"Reference","previous_headings":"","what":"Public fields","title":"Acquisition Function Expected Hypervolume Improvement via Gauss-Hermite Quadrature — mlr_acqfunctions_ehvigh","text":"ys_front (matrix()) Approximated Pareto front. Signs corrected respect assuming minimization objectives. ref_point (numeric()) Reference point. Signs corrected respect assuming minimization objectives. hypervolume (numeric(1)). Current hypervolume approximated Pareto front respect reference point. gh_data (matrix()) Data required Gauss-Hermite quadrature rule form matrix dimension (k x 2). row corresponds one Gauss-Hermite node (column \"x\") corresponding weight (column \"w\"). Computed via fastGHQuad::gaussHermiteData. Nodes scaled factor sqrt(2) weights normalized sum one constraint.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ehvigh.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Acquisition Function Expected Hypervolume Improvement via Gauss-Hermite Quadrature — mlr_acqfunctions_ehvigh","text":"bbotk::Objective$eval() bbotk::Objective$format() bbotk::Objective$help() bbotk::Objective$print() mlr3mbo::AcqFunction$eval_dt() mlr3mbo::AcqFunction$eval_many()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ehvigh.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Acquisition Function Expected Hypervolume Improvement via Gauss-Hermite Quadrature — mlr_acqfunctions_ehvigh","text":"AcqFunctionEHVIGH$new() AcqFunctionEHVIGH$update() AcqFunctionEHVIGH$clone()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ehvigh.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Acquisition Function Expected Hypervolume Improvement via Gauss-Hermite Quadrature — mlr_acqfunctions_ehvigh","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ehvigh.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function Expected Hypervolume Improvement via Gauss-Hermite Quadrature — mlr_acqfunctions_ehvigh","text":"","code":"AcqFunctionEHVIGH$new(surrogate = NULL, k = 15L, r = 0.2)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ehvigh.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Acquisition Function Expected Hypervolume Improvement via Gauss-Hermite Quadrature — mlr_acqfunctions_ehvigh","text":"surrogate (NULL | SurrogateLearnerCollection). k (integer(1)). r (numeric(1)).","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ehvigh.html","id":"method-update-","dir":"Reference","previous_headings":"","what":"Method update()","title":"Acquisition Function Expected Hypervolume Improvement via Gauss-Hermite Quadrature — mlr_acqfunctions_ehvigh","text":"Updates acquisition function sets ys_front, ref_point, hypervolume, gh_data.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ehvigh.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function Expected Hypervolume Improvement via Gauss-Hermite Quadrature — mlr_acqfunctions_ehvigh","text":"","code":"AcqFunctionEHVIGH$update()"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ehvigh.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Acquisition Function Expected Hypervolume Improvement via Gauss-Hermite Quadrature — mlr_acqfunctions_ehvigh","text":"objects class cloneable method.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ehvigh.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function Expected Hypervolume Improvement via Gauss-Hermite Quadrature — mlr_acqfunctions_ehvigh","text":"","code":"AcqFunctionEHVIGH$clone(deep = FALSE)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ehvigh.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"Acquisition Function Expected Hypervolume Improvement via Gauss-Hermite Quadrature — mlr_acqfunctions_ehvigh","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ehvigh.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Acquisition Function Expected Hypervolume Improvement via Gauss-Hermite Quadrature — mlr_acqfunctions_ehvigh","text":"","code":"if (requireNamespace(\"mlr3learners\") & requireNamespace(\"DiceKriging\") & requireNamespace(\"rgenoud\")) { library(bbotk) library(paradox) library(mlr3learners) library(data.table) fun = function(xs) { list(y1 = xs$x^2, y2 = (xs$x - 2) ^ 2) } domain = ps(x = p_dbl(lower = -10, upper = 10)) codomain = ps(y1 = p_dbl(tags = \"minimize\"), y2 = p_dbl(tags = \"minimize\")) objective = ObjectiveRFun$new(fun = fun, domain = domain, codomain = codomain) instance = OptimInstanceBatchMultiCrit$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) acq_function = acqf(\"ehvigh\", surrogate = surrogate) acq_function$surrogate$update() acq_function$update() acq_function$eval_dt(data.table(x = c(-1, 0, 1))) } #> acq_ehvigh #> #> 1: 136.3082 #> 2: 152.4999 #> 3: 166.7487"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ei.html","id":null,"dir":"Reference","previous_headings":"","what":"Acquisition Function Expected Improvement — mlr_acqfunctions_ei","title":"Acquisition Function Expected Improvement — mlr_acqfunctions_ei","text":"Expected Improvement.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ei.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Acquisition Function Expected Improvement — mlr_acqfunctions_ei","text":"AcqFunction can instantiated via dictionary mlr_acqfunctions associated sugar function acqf():","code":"mlr_acqfunctions$get(\"ei\") acqf(\"ei\")"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ei.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Acquisition Function Expected Improvement — mlr_acqfunctions_ei","text":"Jones, R. D, Schonlau, Matthias, Welch, J. W (1998). “Efficient Global Optimization Expensive Black-Box Functions.” Journal Global optimization, 13(4), 455–492.","code":""},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ei.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Acquisition Function Expected Improvement — mlr_acqfunctions_ei","text":"bbotk::Objective -> mlr3mbo::AcqFunction -> AcqFunctionEI","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ei.html","id":"public-fields","dir":"Reference","previous_headings":"","what":"Public fields","title":"Acquisition Function Expected Improvement — mlr_acqfunctions_ei","text":"y_best (numeric(1)) Best objective function value observed far. case maximization, already includes necessary change sign.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ei.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Acquisition Function Expected Improvement — mlr_acqfunctions_ei","text":"bbotk::Objective$eval() bbotk::Objective$format() bbotk::Objective$help() bbotk::Objective$print() mlr3mbo::AcqFunction$eval_dt() mlr3mbo::AcqFunction$eval_many()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ei.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Acquisition Function Expected Improvement — mlr_acqfunctions_ei","text":"AcqFunctionEI$new() AcqFunctionEI$update() AcqFunctionEI$clone()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ei.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Acquisition Function Expected Improvement — mlr_acqfunctions_ei","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ei.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function Expected Improvement — mlr_acqfunctions_ei","text":"","code":"AcqFunctionEI$new(surrogate = NULL)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ei.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Acquisition Function Expected Improvement — mlr_acqfunctions_ei","text":"surrogate (NULL | SurrogateLearner).","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ei.html","id":"method-update-","dir":"Reference","previous_headings":"","what":"Method update()","title":"Acquisition Function Expected Improvement — mlr_acqfunctions_ei","text":"Updates acquisition function sets y_best.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ei.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function Expected Improvement — mlr_acqfunctions_ei","text":"","code":"AcqFunctionEI$update()"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ei.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Acquisition Function Expected Improvement — mlr_acqfunctions_ei","text":"objects class cloneable method.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ei.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function Expected Improvement — mlr_acqfunctions_ei","text":"","code":"AcqFunctionEI$clone(deep = FALSE)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ei.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"Acquisition Function Expected Improvement — mlr_acqfunctions_ei","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_ei.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Acquisition Function Expected Improvement — mlr_acqfunctions_ei","text":"","code":"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(\"ei\", surrogate = surrogate) acq_function$surrogate$update() acq_function$update() acq_function$eval_dt(data.table(x = c(-1, 0, 1))) } #> acq_ei #> #> 1: 4.092188 #> 2: 4.549039 #> 3: 5.037109"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_eips.html","id":null,"dir":"Reference","previous_headings":"","what":"Acquisition Function Expected Improvement Per Second — mlr_acqfunctions_eips","title":"Acquisition Function Expected Improvement Per Second — mlr_acqfunctions_eips","text":"Expected Improvement per Second. assumed calculations performed bbotk::OptimInstanceBatchSingleCrit. Additionally target values codomain minimized maximized, bbotk::Objective bbotk::OptimInstanceBatchSingleCrit return time values. column names target variable time variable must passed cols_y order (target, time) constructing SurrogateLearnerCollection used surrogate.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_eips.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Acquisition Function Expected Improvement Per Second — mlr_acqfunctions_eips","text":"AcqFunction can instantiated via dictionary mlr_acqfunctions associated sugar function acqf():","code":"mlr_acqfunctions$get(\"eips\") acqf(\"eips\")"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_eips.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Acquisition Function Expected Improvement Per Second — mlr_acqfunctions_eips","text":"Snoek, Jasper, Larochelle, Hugo, Adams, P R (2012). “Practical Bayesian Optimization Machine Learning Algorithms.” Pereira F, Burges CJC, Bottou L, Weinberger KQ (eds.), Advances Neural Information Processing Systems, volume 25, 2951–2959.","code":""},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_eips.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Acquisition Function Expected Improvement Per Second — mlr_acqfunctions_eips","text":"bbotk::Objective -> mlr3mbo::AcqFunction -> AcqFunctionEIPS","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_eips.html","id":"public-fields","dir":"Reference","previous_headings":"","what":"Public fields","title":"Acquisition Function Expected Improvement Per Second — mlr_acqfunctions_eips","text":"y_best (numeric(1)) Best objective function value observed far. case maximization, already includes necessary change sign.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_eips.html","id":"active-bindings","dir":"Reference","previous_headings":"","what":"Active bindings","title":"Acquisition Function Expected Improvement Per Second — mlr_acqfunctions_eips","text":"col_y (character(1)). col_time (character(1)).","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_eips.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Acquisition Function Expected Improvement Per Second — mlr_acqfunctions_eips","text":"bbotk::Objective$eval() bbotk::Objective$format() bbotk::Objective$help() bbotk::Objective$print() mlr3mbo::AcqFunction$eval_dt() mlr3mbo::AcqFunction$eval_many()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_eips.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Acquisition Function Expected Improvement Per Second — mlr_acqfunctions_eips","text":"AcqFunctionEIPS$new() AcqFunctionEIPS$update() AcqFunctionEIPS$clone()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_eips.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Acquisition Function Expected Improvement Per Second — mlr_acqfunctions_eips","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_eips.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function Expected Improvement Per Second — mlr_acqfunctions_eips","text":"","code":"AcqFunctionEIPS$new(surrogate = NULL)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_eips.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Acquisition Function Expected Improvement Per Second — mlr_acqfunctions_eips","text":"surrogate (NULL | SurrogateLearnerCollection).","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_eips.html","id":"method-update-","dir":"Reference","previous_headings":"","what":"Method update()","title":"Acquisition Function Expected Improvement Per Second — mlr_acqfunctions_eips","text":"Updates acquisition function sets y_best.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_eips.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function Expected Improvement Per Second — mlr_acqfunctions_eips","text":"","code":"AcqFunctionEIPS$update()"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_eips.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Acquisition Function Expected Improvement Per Second — mlr_acqfunctions_eips","text":"objects class cloneable method.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_eips.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function Expected Improvement Per Second — mlr_acqfunctions_eips","text":"","code":"AcqFunctionEIPS$clone(deep = FALSE)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_eips.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"Acquisition Function Expected Improvement Per Second — mlr_acqfunctions_eips","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_eips.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Acquisition Function Expected Improvement Per Second — mlr_acqfunctions_eips","text":"","code":"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 #> #> 1: 4.401246 #> 2: 4.864655 #> 3: 5.297142"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_mean.html","id":null,"dir":"Reference","previous_headings":"","what":"Acquisition Function Mean — mlr_acqfunctions_mean","title":"Acquisition Function Mean — mlr_acqfunctions_mean","text":"Posterior Mean.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_mean.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Acquisition Function Mean — mlr_acqfunctions_mean","text":"AcqFunction can instantiated via dictionary mlr_acqfunctions associated sugar function acqf():","code":"mlr_acqfunctions$get(\"mean\") acqf(\"mean\")"},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_mean.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Acquisition Function Mean — mlr_acqfunctions_mean","text":"bbotk::Objective -> mlr3mbo::AcqFunction -> AcqFunctionMean","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_mean.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Acquisition Function Mean — mlr_acqfunctions_mean","text":"bbotk::Objective$eval() bbotk::Objective$format() bbotk::Objective$help() bbotk::Objective$print() mlr3mbo::AcqFunction$eval_dt() mlr3mbo::AcqFunction$eval_many() mlr3mbo::AcqFunction$update()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_mean.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Acquisition Function Mean — mlr_acqfunctions_mean","text":"AcqFunctionMean$new() AcqFunctionMean$clone()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_mean.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Acquisition Function Mean — mlr_acqfunctions_mean","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_mean.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function Mean — mlr_acqfunctions_mean","text":"","code":"AcqFunctionMean$new(surrogate = NULL)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_mean.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Acquisition Function Mean — mlr_acqfunctions_mean","text":"surrogate (NULL | SurrogateLearner).","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_mean.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Acquisition Function Mean — mlr_acqfunctions_mean","text":"objects class cloneable method.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_mean.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function Mean — mlr_acqfunctions_mean","text":"","code":"AcqFunctionMean$clone(deep = FALSE)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_mean.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"Acquisition Function Mean — mlr_acqfunctions_mean","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_mean.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Acquisition Function Mean — mlr_acqfunctions_mean","text":"","code":"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(\"mean\", surrogate = surrogate) acq_function$surrogate$update() acq_function$update() acq_function$eval_dt(data.table(x = c(-1, 0, 1))) } #> acq_mean #> #> 1: 25.87163 #> 2: 23.23378 #> 3: 17.57580"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_pi.html","id":null,"dir":"Reference","previous_headings":"","what":"Acquisition Function Probability of Improvement — mlr_acqfunctions_pi","title":"Acquisition Function Probability of Improvement — mlr_acqfunctions_pi","text":"Probability Improvement.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_pi.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Acquisition Function Probability of Improvement — mlr_acqfunctions_pi","text":"AcqFunction can instantiated via dictionary mlr_acqfunctions associated sugar function acqf():","code":"mlr_acqfunctions$get(\"pi\") acqf(\"pi\")"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_pi.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Acquisition Function Probability of Improvement — mlr_acqfunctions_pi","text":"Kushner, J. H (1964). “New Method Locating Maximum Point Arbitrary Multipeak Curve Presence Noise.” Journal Basic Engineering, 86(1), 97–106.","code":""},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_pi.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Acquisition Function Probability of Improvement — mlr_acqfunctions_pi","text":"bbotk::Objective -> mlr3mbo::AcqFunction -> AcqFunctionPI","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_pi.html","id":"public-fields","dir":"Reference","previous_headings":"","what":"Public fields","title":"Acquisition Function Probability of Improvement — mlr_acqfunctions_pi","text":"y_best (numeric(1)) Best objective function value observed far. case maximization, already includes necessary change sign.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_pi.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Acquisition Function Probability of Improvement — mlr_acqfunctions_pi","text":"bbotk::Objective$eval() bbotk::Objective$format() bbotk::Objective$help() bbotk::Objective$print() mlr3mbo::AcqFunction$eval_dt() mlr3mbo::AcqFunction$eval_many()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_pi.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Acquisition Function Probability of Improvement — mlr_acqfunctions_pi","text":"AcqFunctionPI$new() AcqFunctionPI$update() AcqFunctionPI$clone()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_pi.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Acquisition Function Probability of Improvement — mlr_acqfunctions_pi","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_pi.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function Probability of Improvement — mlr_acqfunctions_pi","text":"","code":"AcqFunctionPI$new(surrogate = NULL)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_pi.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Acquisition Function Probability of Improvement — mlr_acqfunctions_pi","text":"surrogate (NULL | SurrogateLearner).","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_pi.html","id":"method-update-","dir":"Reference","previous_headings":"","what":"Method update()","title":"Acquisition Function Probability of Improvement — mlr_acqfunctions_pi","text":"Updates acquisition function sets y_best.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_pi.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function Probability of Improvement — mlr_acqfunctions_pi","text":"","code":"AcqFunctionPI$update()"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_pi.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Acquisition Function Probability of Improvement — mlr_acqfunctions_pi","text":"objects class cloneable method.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_pi.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function Probability of Improvement — mlr_acqfunctions_pi","text":"","code":"AcqFunctionPI$clone(deep = FALSE)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_pi.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"Acquisition Function Probability of Improvement — mlr_acqfunctions_pi","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_pi.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Acquisition Function Probability of Improvement — mlr_acqfunctions_pi","text":"","code":"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 #> #> 1: 0.2666736 #> 2: 0.2939486 #> 3: 0.3509359"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_sd.html","id":null,"dir":"Reference","previous_headings":"","what":"Acquisition Function Standard Deviation — mlr_acqfunctions_sd","title":"Acquisition Function Standard Deviation — mlr_acqfunctions_sd","text":"Posterior Standard Deviation.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_sd.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Acquisition Function Standard Deviation — mlr_acqfunctions_sd","text":"AcqFunction can instantiated via dictionary mlr_acqfunctions associated sugar function acqf():","code":"mlr_acqfunctions$get(\"sd\") acqf(\"sd\")"},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_sd.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Acquisition Function Standard Deviation — mlr_acqfunctions_sd","text":"bbotk::Objective -> mlr3mbo::AcqFunction -> AcqFunctionSD","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_sd.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Acquisition Function Standard Deviation — mlr_acqfunctions_sd","text":"bbotk::Objective$eval() bbotk::Objective$format() bbotk::Objective$help() bbotk::Objective$print() mlr3mbo::AcqFunction$eval_dt() mlr3mbo::AcqFunction$eval_many() mlr3mbo::AcqFunction$update()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_sd.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Acquisition Function Standard Deviation — mlr_acqfunctions_sd","text":"AcqFunctionSD$new() AcqFunctionSD$clone()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_sd.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Acquisition Function Standard Deviation — mlr_acqfunctions_sd","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_sd.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function Standard Deviation — mlr_acqfunctions_sd","text":"","code":"AcqFunctionSD$new(surrogate = NULL)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_sd.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Acquisition Function Standard Deviation — mlr_acqfunctions_sd","text":"surrogate (NULL | SurrogateLearner).","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_sd.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Acquisition Function Standard Deviation — mlr_acqfunctions_sd","text":"objects class cloneable method.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_sd.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function Standard Deviation — mlr_acqfunctions_sd","text":"","code":"AcqFunctionSD$clone(deep = FALSE)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_sd.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"Acquisition Function Standard Deviation — mlr_acqfunctions_sd","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_sd.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Acquisition Function Standard Deviation — mlr_acqfunctions_sd","text":"","code":"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(\"sd\", surrogate = surrogate) acq_function$surrogate$update() acq_function$update() acq_function$eval_dt(data.table(x = c(-1, 0, 1))) } #> acq_sd #> #> 1: 27.08680 #> 2: 26.26861 #> 3: 22.40464"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_smsego.html","id":null,"dir":"Reference","previous_headings":"","what":"Acquisition Function SMS-EGO — mlr_acqfunctions_smsego","title":"Acquisition Function SMS-EGO — mlr_acqfunctions_smsego","text":"S-Metric Selection Evolutionary Multi-Objective Optimization Algorithm Acquisition Function.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_smsego.html","id":"parameters","dir":"Reference","previous_headings":"","what":"Parameters","title":"Acquisition Function SMS-EGO — mlr_acqfunctions_smsego","text":"\"lambda\" (numeric(1)) \\(\\lambda\\) value used confidence bound. Defaults 1. Based confidence = (1 - 2 * dnorm(lambda)) ^ m can calculate lambda given confidence level, see Ponweiser et al. (2008). \"epsilon\" (numeric(1)) \\(\\epsilon\\) used additive epsilon dominance. Can either single numeric value > 0 NULL (default). case NULL, epsilon vector maintained dynamically described Horn et al. (2015).","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_smsego.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Acquisition Function SMS-EGO — mlr_acqfunctions_smsego","text":"Ponweiser, Wolfgang, Wagner, Tobias, Biermann, Dirk, Vincze, Markus (2008). “Multiobjective Optimization Limited Budget Evaluations Using Model-Assisted S-Metric Selection.” Proceedings 10th International Conference Parallel Problem Solving Nature, 784–794. Horn, Daniel, Wagner, Tobias, Biermann, Dirk, Weihs, Claus, Bischl, Bernd (2015). “Model-Based Multi-objective Optimization: Taxonomy, Multi-Point Proposal, Toolbox Benchmark.” International Conference Evolutionary Multi-Criterion Optimization, 64–78.","code":""},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_smsego.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Acquisition Function SMS-EGO — mlr_acqfunctions_smsego","text":"bbotk::Objective -> mlr3mbo::AcqFunction -> AcqFunctionSmsEgo","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_smsego.html","id":"public-fields","dir":"Reference","previous_headings":"","what":"Public fields","title":"Acquisition Function SMS-EGO — mlr_acqfunctions_smsego","text":"ys_front (matrix()) Approximated Pareto front. Signs corrected respect assuming minimization objectives. ref_point (numeric()) Reference point. Signs corrected respect assuming minimization objectives. epsilon (numeric()) Epsilon used additive epsilon dominance. progress (numeric(1)) Optimization progress (typically, number function evaluations left). Note requires bbotk::OptimInstance terminated via bbotk::TerminatorEvals.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_smsego.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Acquisition Function SMS-EGO — mlr_acqfunctions_smsego","text":"bbotk::Objective$eval() bbotk::Objective$format() bbotk::Objective$help() bbotk::Objective$print() mlr3mbo::AcqFunction$eval_dt() mlr3mbo::AcqFunction$eval_many()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_smsego.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Acquisition Function SMS-EGO — mlr_acqfunctions_smsego","text":"AcqFunctionSmsEgo$new() AcqFunctionSmsEgo$update() AcqFunctionSmsEgo$clone()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_smsego.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Acquisition Function SMS-EGO — mlr_acqfunctions_smsego","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_smsego.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function SMS-EGO — mlr_acqfunctions_smsego","text":"","code":"AcqFunctionSmsEgo$new(surrogate = NULL, lambda = 1, epsilon = NULL)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_smsego.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Acquisition Function SMS-EGO — mlr_acqfunctions_smsego","text":"surrogate (NULL | SurrogateLearnerCollection). lambda (numeric(1)). epsilon (NULL | numeric(1)).","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_smsego.html","id":"method-update-","dir":"Reference","previous_headings":"","what":"Method update()","title":"Acquisition Function SMS-EGO — mlr_acqfunctions_smsego","text":"Updates acquisition function sets ys_front, ref_point, epsilon.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_smsego.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function SMS-EGO — mlr_acqfunctions_smsego","text":"","code":"AcqFunctionSmsEgo$update()"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_smsego.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Acquisition Function SMS-EGO — mlr_acqfunctions_smsego","text":"objects class cloneable method.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_smsego.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Acquisition Function SMS-EGO — mlr_acqfunctions_smsego","text":"","code":"AcqFunctionSmsEgo$clone(deep = FALSE)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_smsego.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"Acquisition Function SMS-EGO — mlr_acqfunctions_smsego","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_acqfunctions_smsego.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Acquisition Function SMS-EGO — mlr_acqfunctions_smsego","text":"","code":"if (requireNamespace(\"mlr3learners\") & requireNamespace(\"DiceKriging\") & requireNamespace(\"rgenoud\")) { library(bbotk) library(paradox) library(mlr3learners) library(data.table) fun = function(xs) { list(y1 = xs$x^2, y2 = (xs$x - 2) ^ 2) } domain = ps(x = p_dbl(lower = -10, upper = 10)) codomain = ps(y1 = p_dbl(tags = \"minimize\"), y2 = p_dbl(tags = \"minimize\")) objective = ObjectiveRFun$new(fun = fun, domain = domain, codomain = codomain) instance = OptimInstanceBatchMultiCrit$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) acq_function = acqf(\"smsego\", surrogate = surrogate) acq_function$surrogate$update() acq_function$progress = 5 - 4 # n_evals = 5 and 4 points already evaluated acq_function$update() acq_function$eval_dt(data.table(x = c(-1, 0, 1))) } #> acq_smsego #> #> 1: -581.3215 #> 2: -730.5539 #> 3: -1132.2505"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions.html","id":null,"dir":"Reference","previous_headings":"","what":"Dictionary of Loop Functions — mlr_loop_functions","title":"Dictionary of Loop Functions — mlr_loop_functions","text":"simple mlr3misc::Dictionary storing objects class loop_function. loop function associated help page, see mlr_loop_functions_[id]. Retrieves object key key dictionary. Additional arguments must named passed constructor stored object.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Dictionary of Loop Functions — mlr_loop_functions","text":"R6::R6Class object inheriting mlr3misc::Dictionary.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Dictionary of Loop Functions — mlr_loop_functions","text":"key (character(1)). ... () Passed constructor.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Dictionary of Loop Functions — mlr_loop_functions","text":"Object corresponding key.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Dictionary of Loop Functions — mlr_loop_functions","text":"See mlr3misc::Dictionary.","code":""},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Dictionary of Loop Functions — mlr_loop_functions","text":"","code":"library(data.table) as.data.table(mlr_loop_functions) #> Key: #> key label instance #> #> 1: bayesopt_ego Efficient Global Optimization single-crit #> 2: bayesopt_emo Multi-Objective EGO multi-crit #> 3: bayesopt_mpcl Multipoint Constant Liar single-crit #> 4: bayesopt_parego ParEGO multi-crit #> 5: bayesopt_smsego SMS-EGO multi-crit #> man #> #> 1: mlr3mbo::mlr_loop_functions_ego #> 2: mlr3mbo::mlr_loop_functions_emo #> 3: mlr3mbo::mlr_loop_functions_mpcl #> 4: mlr3mbo::mlr_loop_functions_parego #> 5: mlr3mbo::mlr_loop_functions_smsego"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions_ego.html","id":null,"dir":"Reference","previous_headings":"","what":"Sequential Single-Objective Bayesian Optimization — mlr_loop_functions_ego","title":"Sequential Single-Objective Bayesian Optimization — mlr_loop_functions_ego","text":"Loop function sequential single-objective Bayesian Optimization. Normally used inside OptimizerMbo. iteration initial design, surrogate acquisition function updated next candidate chosen based optimizing acquisition function.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions_ego.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sequential Single-Objective Bayesian Optimization — mlr_loop_functions_ego","text":"","code":"bayesopt_ego( instance, surrogate, acq_function, acq_optimizer, init_design_size = NULL, random_interleave_iter = 0L )"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions_ego.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sequential Single-Objective Bayesian Optimization — mlr_loop_functions_ego","text":"instance (bbotk::OptimInstanceBatchSingleCrit) bbotk::OptimInstanceBatchSingleCrit optimized. surrogate (Surrogate)Surrogate used surrogate. Typically SurrogateLearner. acq_function (AcqFunction)AcqFunction used acquisition function. acq_optimizer (AcqOptimizer)AcqOptimizer used acquisition function optimizer. init_design_size (NULL | integer(1)) Size initial design. NULL bbotk::Archive contains evaluations, 4 * d used d dimensionality search space. Points generated via Sobol sequence. random_interleave_iter (integer(1)) Every random_interleave_iter iteration (starting initial design), point sampled uniformly random evaluated (instead model based proposal). example, random_interleave_iter = 2, random interleaving performed second, fourth, sixth, ... iteration. Default 0, .e., random interleaving performed .","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions_ego.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sequential Single-Objective Bayesian Optimization — mlr_loop_functions_ego","text":"invisible(instance) original instance modified -place returned invisible.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions_ego.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Sequential Single-Objective Bayesian Optimization — mlr_loop_functions_ego","text":"acq_function$surrogate, even already populated, always overwritten surrogate. acq_optimizer$acq_function, even already populated, always overwritten acq_function. surrogate$archive, even already populated, always overwritten bbotk::Archive bbotk::OptimInstanceBatchSingleCrit.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions_ego.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Sequential Single-Objective Bayesian Optimization — mlr_loop_functions_ego","text":"Jones, R. D, Schonlau, Matthias, Welch, J. W (1998). “Efficient Global Optimization Expensive Black-Box Functions.” Journal Global optimization, 13(4), 455–492. Snoek, Jasper, Larochelle, Hugo, Adams, P R (2012). “Practical Bayesian Optimization Machine Learning Algorithms.” Pereira F, Burges CJC, Bottou L, Weinberger KQ (eds.), Advances Neural Information Processing Systems, volume 25, 2951–2959.","code":""},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions_ego.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sequential Single-Objective Bayesian Optimization — mlr_loop_functions_ego","text":"","code":"# \\donttest{ if (requireNamespace(\"mlr3learners\") & requireNamespace(\"DiceKriging\") & requireNamespace(\"rgenoud\")) { library(bbotk) library(paradox) library(mlr3learners) 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)) surrogate = default_surrogate(instance) acq_function = acqf(\"ei\") acq_optimizer = acqo( optimizer = opt(\"random_search\", batch_size = 100), terminator = trm(\"evals\", n_evals = 100)) optimizer = opt(\"mbo\", loop_function = bayesopt_ego, surrogate = surrogate, acq_function = acq_function, acq_optimizer = acq_optimizer) optimizer$optimize(instance) # expected improvement per second example 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)) surrogate = default_surrogate(instance, n_learner = 2) surrogate$cols_y = c(\"y\", \"time\") optimizer = opt(\"mbo\", loop_function = bayesopt_ego, surrogate = surrogate, acq_function = acqf(\"eips\"), acq_optimizer = acq_optimizer) optimizer$optimize(instance) } #> x x_domain y #> #> 1: 0.5609628 0.3146792 # }"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions_emo.html","id":null,"dir":"Reference","previous_headings":"","what":"Sequential Multi-Objective Bayesian Optimization — mlr_loop_functions_emo","title":"Sequential Multi-Objective Bayesian Optimization — mlr_loop_functions_emo","text":"Loop function sequential multi-objective Bayesian Optimization. Normally used inside OptimizerMbo. conceptual counterpart mlr_loop_functions_ego. iteration initial design, surrogate acquisition function updated next candidate chosen based optimizing acquisition function.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions_emo.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sequential Multi-Objective Bayesian Optimization — mlr_loop_functions_emo","text":"","code":"bayesopt_emo( instance, surrogate, acq_function, acq_optimizer, init_design_size = NULL, random_interleave_iter = 0L )"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions_emo.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sequential Multi-Objective Bayesian Optimization — mlr_loop_functions_emo","text":"instance (bbotk::OptimInstanceBatchMultiCrit) bbotk::OptimInstanceBatchMultiCrit optimized. surrogate (SurrogateLearnerCollection)SurrogateLearnerCollection used surrogate. acq_function (AcqFunction)AcqFunction used acquisition function. acq_optimizer (AcqOptimizer)AcqOptimizer used acquisition function optimizer. init_design_size (NULL | integer(1)) Size initial design. NULL bbotk::Archive contains evaluations, 4 * d used d dimensionality search space. Points generated via Sobol sequence. random_interleave_iter (integer(1)) Every random_interleave_iter iteration (starting initial design), point sampled uniformly random evaluated (instead model based proposal). example, random_interleave_iter = 2, random interleaving performed second, fourth, sixth, ... iteration. Default 0, .e., random interleaving performed .","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions_emo.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sequential Multi-Objective Bayesian Optimization — mlr_loop_functions_emo","text":"invisible(instance) original instance modified -place returned invisible.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions_emo.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Sequential Multi-Objective Bayesian Optimization — mlr_loop_functions_emo","text":"acq_function$surrogate, even already populated, always overwritten surrogate. acq_optimizer$acq_function, even already populated, always overwritten acq_function. surrogate$archive, even already populated, always overwritten bbotk::Archive bbotk::OptimInstanceBatchMultiCrit.","code":""},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions_emo.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sequential Multi-Objective Bayesian Optimization — mlr_loop_functions_emo","text":"","code":"# \\donttest{ if (requireNamespace(\"mlr3learners\") & requireNamespace(\"DiceKriging\") & requireNamespace(\"rgenoud\")) { library(bbotk) library(paradox) library(mlr3learners) fun = function(xs) { list(y1 = xs$x^2, y2 = (xs$x - 2) ^ 2) } domain = ps(x = p_dbl(lower = -10, upper = 10)) codomain = ps(y1 = p_dbl(tags = \"minimize\"), y2 = p_dbl(tags = \"minimize\")) objective = ObjectiveRFun$new(fun = fun, domain = domain, codomain = codomain) instance = OptimInstanceBatchMultiCrit$new( objective = objective, terminator = trm(\"evals\", n_evals = 5)) surrogate = default_surrogate(instance) acq_function = acqf(\"ehvi\") acq_optimizer = acqo( optimizer = opt(\"random_search\", batch_size = 100), terminator = trm(\"evals\", n_evals = 100)) optimizer = opt(\"mbo\", loop_function = bayesopt_emo, surrogate = surrogate, acq_function = acq_function, acq_optimizer = acq_optimizer) optimizer$optimize(instance) } #> x x_domain y1 y2 #> #> 1: 1.8995202 3.60817683 0.0100962 #> 2: 0.2245765 0.05043458 3.1521288 # }"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions_mpcl.html","id":null,"dir":"Reference","previous_headings":"","what":"Single-Objective Bayesian Optimization via Multipoint Constant Liar — mlr_loop_functions_mpcl","title":"Single-Objective Bayesian Optimization via Multipoint Constant Liar — mlr_loop_functions_mpcl","text":"Loop function single-objective Bayesian Optimization via multipoint constant liar. Normally used inside OptimizerMbo. iteration initial design, surrogate acquisition function updated. acquisition function optimized, find candidate instead evaluating candidate, objective function value obtained applying liar function previously obtained objective function values. repeated q - 1 times obtain total q candidates evaluated single batch.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions_mpcl.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Single-Objective Bayesian Optimization via Multipoint Constant Liar — mlr_loop_functions_mpcl","text":"","code":"bayesopt_mpcl( instance, surrogate, acq_function, acq_optimizer, init_design_size = NULL, q = 2L, liar = mean, random_interleave_iter = 0L )"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions_mpcl.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Single-Objective Bayesian Optimization via Multipoint Constant Liar — mlr_loop_functions_mpcl","text":"instance (bbotk::OptimInstanceBatchSingleCrit) bbotk::OptimInstanceBatchSingleCrit optimized. surrogate (Surrogate)Surrogate used surrogate. Typically SurrogateLearner. acq_function (AcqFunction)AcqFunction used acquisition function. acq_optimizer (AcqOptimizer)AcqOptimizer used acquisition function optimizer. init_design_size (NULL | integer(1)) Size initial design. NULL bbotk::Archive contains evaluations, 4 * d used d dimensionality search space. Points generated via Sobol sequence. q (integer(1)) Batch size > 1. Default 2. liar (function) function accepting numeric vector input returning single numeric output. Default mean. sensible functions include min (max, depending optimization direction). random_interleave_iter (integer(1)) Every random_interleave_iter iteration (starting initial design), point sampled uniformly random evaluated (instead model based proposal). example, random_interleave_iter = 2, random interleaving performed second, fourth, sixth, ... iteration. Default 0, .e., random interleaving performed .","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions_mpcl.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Single-Objective Bayesian Optimization via Multipoint Constant Liar — mlr_loop_functions_mpcl","text":"invisible(instance) original instance modified -place returned invisible.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions_mpcl.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Single-Objective Bayesian Optimization via Multipoint Constant Liar — mlr_loop_functions_mpcl","text":"acq_function$surrogate, even already populated, always overwritten surrogate. acq_optimizer$acq_function, even already populated, always overwritten acq_function. surrogate$archive, even already populated, always overwritten bbotk::Archive bbotk::OptimInstanceBatchSingleCrit. make use parallel evaluations case `q > 1, objective function bbotk::OptimInstanceBatchSingleCrit must implemented accordingly.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions_mpcl.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Single-Objective Bayesian Optimization via Multipoint Constant Liar — mlr_loop_functions_mpcl","text":"Ginsbourger, David, Le Riche, Rodolphe, Carraro, Laurent (2008). “Multi-Points Criterion Deterministic Parallel Global Optimization Based Gaussian Processes.” Wang, Jialei, Clark, C. S, Liu, Eric, Frazier, . P (2020). “Parallel Bayesian Global Optimization Expensive Functions.” Operations Research, 68(6), 1850–1865.","code":""},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions_mpcl.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Single-Objective Bayesian Optimization via Multipoint Constant Liar — mlr_loop_functions_mpcl","text":"","code":"# \\donttest{ if (requireNamespace(\"mlr3learners\") & requireNamespace(\"DiceKriging\") & requireNamespace(\"rgenoud\")) { library(bbotk) library(paradox) library(mlr3learners) 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 = 7)) surrogate = default_surrogate(instance) acq_function = acqf(\"ei\") acq_optimizer = acqo( optimizer = opt(\"random_search\", batch_size = 100), terminator = trm(\"evals\", n_evals = 100)) optimizer = opt(\"mbo\", loop_function = bayesopt_mpcl, surrogate = surrogate, acq_function = acq_function, acq_optimizer = acq_optimizer, args = list(q = 3)) optimizer$optimize(instance) } #> x x_domain y #> #> 1: 0.1046131 0.01094391 # }"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions_parego.html","id":null,"dir":"Reference","previous_headings":"","what":"Multi-Objective Bayesian Optimization via ParEGO — mlr_loop_functions_parego","title":"Multi-Objective Bayesian Optimization via ParEGO — mlr_loop_functions_parego","text":"Loop function multi-objective Bayesian Optimization via ParEGO. Normally used inside OptimizerMbo. iteration initial design, observed objective function values normalized q candidates obtained scalarizing values via augmented Tchebycheff function, updating surrogate respect scalarized values optimizing acquisition function.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions_parego.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Multi-Objective Bayesian Optimization via ParEGO — mlr_loop_functions_parego","text":"","code":"bayesopt_parego( instance, surrogate, acq_function, acq_optimizer, init_design_size = NULL, q = 1L, s = 100L, rho = 0.05, random_interleave_iter = 0L )"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions_parego.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Multi-Objective Bayesian Optimization via ParEGO — mlr_loop_functions_parego","text":"instance (bbotk::OptimInstanceBatchMultiCrit) bbotk::OptimInstanceBatchMultiCrit optimized. surrogate (SurrogateLearner)SurrogateLearner used surrogate. acq_function (AcqFunction)AcqFunction used acquisition function. acq_optimizer (AcqOptimizer)AcqOptimizer used acquisition function optimizer. init_design_size (NULL | integer(1)) Size initial design. NULL bbotk::Archive contains evaluations, 4 * d used d dimensionality search space. Points generated via Sobol sequence. q (integer(1)) Batch size, .e., number candidates obtained single batch. Default 1. s (integer(1)) \\(s\\) Equation 1 Knowles (2006). Determines total number possible random weight vectors. Default 100. rho (numeric(1)) \\(\\rho\\) Equation 2 Knowles (2006) scaling linear part augmented Tchebycheff function. Default 0.05 random_interleave_iter (integer(1)) Every random_interleave_iter iteration (starting initial design), point sampled uniformly random evaluated (instead model based proposal). example, random_interleave_iter = 2, random interleaving performed second, fourth, sixth, ... iteration. Default 0, .e., random interleaving performed .","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions_parego.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Multi-Objective Bayesian Optimization via ParEGO — mlr_loop_functions_parego","text":"invisible(instance) original instance modified -place returned invisible.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions_parego.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Multi-Objective Bayesian Optimization via ParEGO — mlr_loop_functions_parego","text":"acq_function$surrogate, even already populated, always overwritten surrogate. acq_optimizer$acq_function, even already populated, always overwritten acq_function. surrogate$archive, even already populated, always overwritten bbotk::Archive bbotk::OptimInstanceBatchMultiCrit. scalarizations objective function values stored y_scal column bbotk::Archive bbotk::OptimInstanceBatchMultiCrit. make use parallel evaluations case `q > 1, objective function bbotk::OptimInstanceBatchMultiCrit must implemented accordingly.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions_parego.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Multi-Objective Bayesian Optimization via ParEGO — mlr_loop_functions_parego","text":"Knowles, Joshua (2006). “ParEGO: Hybrid Algorithm -Line Landscape Approximation Expensive Multiobjective Optimization Problems.” IEEE Transactions Evolutionary Computation, 10(1), 50–66.","code":""},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions_parego.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Multi-Objective Bayesian Optimization via ParEGO — mlr_loop_functions_parego","text":"","code":"# \\donttest{ if (requireNamespace(\"mlr3learners\") & requireNamespace(\"DiceKriging\") & requireNamespace(\"rgenoud\")) { library(bbotk) library(paradox) library(mlr3learners) fun = function(xs) { list(y1 = xs$x^2, y2 = (xs$x - 2) ^ 2) } domain = ps(x = p_dbl(lower = -10, upper = 10)) codomain = ps(y1 = p_dbl(tags = \"minimize\"), y2 = p_dbl(tags = \"minimize\")) objective = ObjectiveRFun$new(fun = fun, domain = domain, codomain = codomain) instance = OptimInstanceBatchMultiCrit$new( objective = objective, terminator = trm(\"evals\", n_evals = 5)) surrogate = default_surrogate(instance, n_learner = 1) acq_function = acqf(\"ei\") acq_optimizer = acqo( optimizer = opt(\"random_search\", batch_size = 100), terminator = trm(\"evals\", n_evals = 100)) optimizer = opt(\"mbo\", loop_function = bayesopt_parego, surrogate = surrogate, acq_function = acq_function, acq_optimizer = acq_optimizer) optimizer$optimize(instance) } #> WARN [09:25:46.319] [bbotk] Task 'surrogate_task' has missing values in column(s) 'y_scal', but learner 'regr.km' does not support this #> WARN [09:25:46.344] [bbotk] Could not update the surrogate a final time after the optimization process has terminated. #> x x_domain y1 y2 #> #> 1: 1.134356 1.286764 0.7493391 #> 2: 1.467836 2.154544 0.2831980 # }"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions_smsego.html","id":null,"dir":"Reference","previous_headings":"","what":"Sequential Multi-Objective Bayesian Optimization via SMS-EGO — mlr_loop_functions_smsego","title":"Sequential Multi-Objective Bayesian Optimization via SMS-EGO — mlr_loop_functions_smsego","text":"Loop function sequential multi-objective Bayesian Optimization via SMS-EGO. Normally used inside OptimizerMbo. iteration initial design, surrogate acquisition function (mlr_acqfunctions_smsego) updated next candidate chosen based optimizing acquisition function.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions_smsego.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sequential Multi-Objective Bayesian Optimization via SMS-EGO — mlr_loop_functions_smsego","text":"","code":"bayesopt_smsego( instance, surrogate, acq_function, acq_optimizer, init_design_size = NULL, random_interleave_iter = 0L )"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions_smsego.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sequential Multi-Objective Bayesian Optimization via SMS-EGO — mlr_loop_functions_smsego","text":"instance (bbotk::OptimInstanceBatchMultiCrit) bbotk::OptimInstanceBatchMultiCrit optimized. surrogate (SurrogateLearnerCollection)SurrogateLearnerCollection used surrogate. acq_function (mlr_acqfunctions_smsego)mlr_acqfunctions_smsego used acquisition function. acq_optimizer (AcqOptimizer)AcqOptimizer used acquisition function optimizer. init_design_size (NULL | integer(1)) Size initial design. NULL bbotk::Archive contains evaluations, 4 * d used d dimensionality search space. Points generated via Sobol sequence. random_interleave_iter (integer(1)) Every random_interleave_iter iteration (starting initial design), point sampled uniformly random evaluated (instead model based proposal). example, random_interleave_iter = 2, random interleaving performed second, fourth, sixth, ... iteration. Default 0, .e., random interleaving performed .","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions_smsego.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sequential Multi-Objective Bayesian Optimization via SMS-EGO — mlr_loop_functions_smsego","text":"invisible(instance) original instance modified -place returned invisible.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions_smsego.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Sequential Multi-Objective Bayesian Optimization via SMS-EGO — mlr_loop_functions_smsego","text":"acq_function$surrogate, even already populated, always overwritten surrogate. acq_optimizer$acq_function, even already populated, always overwritten acq_function. surrogate$archive, even already populated, always overwritten bbotk::Archive bbotk::OptimInstanceBatchMultiCrit. Due iterative computation epsilon within mlr_acqfunctions_smsego, requires bbotk::Terminator bbotk::OptimInstanceBatchMultiCrit bbotk::TerminatorEvals.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions_smsego.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Sequential Multi-Objective Bayesian Optimization via SMS-EGO — mlr_loop_functions_smsego","text":"Beume N, Naujoks B, Emmerich M (2007). “SMS-EMOA: Multiobjective selection based dominated hypervolume.” European Journal Operational Research, 181(3), 1653–1669. Ponweiser, Wolfgang, Wagner, Tobias, Biermann, Dirk, Vincze, Markus (2008). “Multiobjective Optimization Limited Budget Evaluations Using Model-Assisted S-Metric Selection.” Proceedings 10th International Conference Parallel Problem Solving Nature, 784–794.","code":""},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_loop_functions_smsego.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Sequential Multi-Objective Bayesian Optimization via SMS-EGO — mlr_loop_functions_smsego","text":"","code":"# \\donttest{ if (requireNamespace(\"mlr3learners\") & requireNamespace(\"DiceKriging\") & requireNamespace(\"rgenoud\")) { library(bbotk) library(paradox) library(mlr3learners) fun = function(xs) { list(y1 = xs$x^2, y2 = (xs$x - 2) ^ 2) } domain = ps(x = p_dbl(lower = -10, upper = 10)) codomain = ps(y1 = p_dbl(tags = \"minimize\"), y2 = p_dbl(tags = \"minimize\")) objective = ObjectiveRFun$new(fun = fun, domain = domain, codomain = codomain) instance = OptimInstanceBatchMultiCrit$new( objective = objective, terminator = trm(\"evals\", n_evals = 5)) surrogate = default_surrogate(instance) acq_function = acqf(\"smsego\") acq_optimizer = acqo( optimizer = opt(\"random_search\", batch_size = 100), terminator = trm(\"evals\", n_evals = 100)) optimizer = opt(\"mbo\", loop_function = bayesopt_smsego, surrogate = surrogate, acq_function = acq_function, acq_optimizer = acq_optimizer) optimizer$optimize(instance) } #> x x_domain y1 y2 #> #> 1: 0.03751159 0.001407119 3.851361 # }"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_optimizers_mbo.html","id":null,"dir":"Reference","previous_headings":"","what":"Model Based Optimization — mlr_optimizers_mbo","title":"Model Based Optimization — mlr_optimizers_mbo","text":"OptimizerMbo class implements Model Based Optimization (MBO). implementation follows modular layout relying loop_function determining MBO flavor used, e.g., bayesopt_ego sequential single-objective Bayesian Optimization, Surrogate, AcqFunction, e.g., mlr_acqfunctions_ei Expected Improvement AcqOptimizer. MBO algorithms iterative optimization algorithms make use continuously updated surrogate model built objective function. optimizing comparably cheap evaluate acquisition function defined surrogate prediction, next candidate chosen evaluation. Detailed descriptions different MBO flavors provided documentation respective loop_function. Termination handled via bbotk::Terminator part bbotk::OptimInstance optimized. Note general Surrogate updated one final time available data optimization process terminated. However, certain scenarios always possible meaningful, e.g., using bayesopt_parego() multi-objective optimization uses surrogate relies scalarization objectives. therefore recommended manually inspect Surrogate optimization used, e.g., visualization purposes make sure properly updated available data. final update Surrogate performed successfully, warning logged.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_optimizers_mbo.html","id":"archive","dir":"Reference","previous_headings":"","what":"Archive","title":"Model Based Optimization — mlr_optimizers_mbo","text":"bbotk::Archive holds following additional columns specific MBO algorithms: [acq_function$id] (numeric(1)) value acquisition function. .already_evaluated (logical(1)) Whether point already evaluated. Depends skip_already_evaluated parameter AcqOptimizer.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_optimizers_mbo.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Model Based Optimization — mlr_optimizers_mbo","text":"bbotk::Optimizer -> bbotk::OptimizerBatch -> OptimizerMbo","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_optimizers_mbo.html","id":"active-bindings","dir":"Reference","previous_headings":"","what":"Active bindings","title":"Model Based Optimization — mlr_optimizers_mbo","text":"loop_function (loop_function | NULL) Loop function determining MBO flavor. surrogate (Surrogate | NULL) surrogate. acq_function (AcqFunction | NULL) acquisition function. acq_optimizer (AcqOptimizer | NULL) acquisition function optimizer. args (named list()) arguments passed loop_function. example, random_interleave_iter. result_assigner (ResultAssigner | NULL) result assigner. param_classes (character()) Supported parameter classes optimizer can optimize. Determined based surrogate acq_optimizer. corresponds values given paradox::ParamSet's $class field. properties (character()) Set properties optimizer. Must subset bbotk_reflections$optimizer_properties. MBO principle flexible default assume optimizer properties. fully initialized, properties determined based loop_function surrogate. packages (character()) Set required packages. warning signaled prior optimization least one packages installed, loaded (attached) later -demand via requireNamespace(). Required packages determined based acq_function, surrogate acq_optimizer.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_optimizers_mbo.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Model Based Optimization — mlr_optimizers_mbo","text":"bbotk::Optimizer$format() bbotk::Optimizer$help() bbotk::OptimizerBatch$optimize()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_optimizers_mbo.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Model Based Optimization — mlr_optimizers_mbo","text":"OptimizerMbo$new() OptimizerMbo$print() OptimizerMbo$reset() OptimizerMbo$clone()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_optimizers_mbo.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Model Based Optimization — mlr_optimizers_mbo","text":"Creates new instance R6 class. surrogate NULL acq_function$surrogate field populated, Surrogate used. Otherwise, default_surrogate(instance) used. acq_function NULL acq_optimizer$acq_function field populated, AcqFunction used (therefore $surrogate populated; see ). Otherwise default_acqfunction(instance) used. acq_optimizer NULL, default_acqoptimizer(instance) used. Even already initialized, surrogate$archive field always overwritten bbotk::Archive current bbotk::OptimInstance optimized. information default values loop_function, surrogate, acq_function acq_optimizer, see ?mbo_defaults.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_optimizers_mbo.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Model Based Optimization — mlr_optimizers_mbo","text":"","code":"OptimizerMbo$new( loop_function = NULL, surrogate = NULL, acq_function = NULL, acq_optimizer = NULL, args = NULL, result_assigner = NULL )"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_optimizers_mbo.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Model Based Optimization — mlr_optimizers_mbo","text":"loop_function (loop_function | NULL) Loop function determining MBO flavor. surrogate (Surrogate | NULL) surrogate. acq_function (AcqFunction | NULL) acquisition function. acq_optimizer (AcqOptimizer | NULL) acquisition function optimizer. args (named list()) arguments passed loop_function. example, random_interleave_iter. result_assigner (ResultAssigner | NULL) result assigner.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_optimizers_mbo.html","id":"method-print-","dir":"Reference","previous_headings":"","what":"Method print()","title":"Model Based Optimization — mlr_optimizers_mbo","text":"Print method.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_optimizers_mbo.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Model Based Optimization — mlr_optimizers_mbo","text":"","code":"OptimizerMbo$print()"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_optimizers_mbo.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Model Based Optimization — mlr_optimizers_mbo","text":"(character()).","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_optimizers_mbo.html","id":"method-reset-","dir":"Reference","previous_headings":"","what":"Method reset()","title":"Model Based Optimization — mlr_optimizers_mbo","text":"Reset optimizer. Sets following fields NULL: loop_function, surrogate, acq_function, acq_optimizer, args, result_assigner","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_optimizers_mbo.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Model Based Optimization — mlr_optimizers_mbo","text":"","code":"OptimizerMbo$reset()"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_optimizers_mbo.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Model Based Optimization — mlr_optimizers_mbo","text":"objects class cloneable method.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_optimizers_mbo.html","id":"usage-3","dir":"Reference","previous_headings":"","what":"Usage","title":"Model Based Optimization — mlr_optimizers_mbo","text":"","code":"OptimizerMbo$clone(deep = FALSE)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_optimizers_mbo.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"Model Based Optimization — mlr_optimizers_mbo","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_optimizers_mbo.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Model Based Optimization — mlr_optimizers_mbo","text":"","code":"# \\donttest{ if (requireNamespace(\"mlr3learners\") & requireNamespace(\"DiceKriging\") & requireNamespace(\"rgenoud\")) { library(bbotk) library(paradox) library(mlr3learners) # single-objective EGO 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)) surrogate = default_surrogate(instance) acq_function = acqf(\"ei\") acq_optimizer = acqo( optimizer = opt(\"random_search\", batch_size = 100), terminator = trm(\"evals\", n_evals = 100)) optimizer = opt(\"mbo\", loop_function = bayesopt_ego, surrogate = surrogate, acq_function = acq_function, acq_optimizer = acq_optimizer) optimizer$optimize(instance) # multi-objective ParEGO fun = function(xs) { list(y1 = xs$x^2, y2 = (xs$x - 2) ^ 2) } domain = ps(x = p_dbl(lower = -10, upper = 10)) codomain = ps(y1 = p_dbl(tags = \"minimize\"), y2 = p_dbl(tags = \"minimize\")) objective = ObjectiveRFun$new(fun = fun, domain = domain, codomain = codomain) instance = OptimInstanceBatchMultiCrit$new( objective = objective, terminator = trm(\"evals\", n_evals = 5)) optimizer = opt(\"mbo\", loop_function = bayesopt_parego, surrogate = surrogate, acq_function = acq_function, acq_optimizer = acq_optimizer) optimizer$optimize(instance) } #> WARN [09:25:48.142] [bbotk] Task 'surrogate_task' has missing values in column(s) 'y_scal', but learner 'regr.km' does not support this #> WARN [09:25:48.143] [bbotk] Could not update the surrogate a final time after the optimization process has terminated. #> x x_domain y1 y2 #> #> 1: 1.816490 3.299635 0.03367603 #> 2: 1.364403 1.861596 0.40398355 # }"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_result_assigners.html","id":null,"dir":"Reference","previous_headings":"","what":"Dictionary of Result Assigners — mlr_result_assigners","title":"Dictionary of Result Assigners — mlr_result_assigners","text":"simple mlr3misc::Dictionary storing objects class ResultAssigner. acquisition function associated help page, see mlr_result_assigners_[id]. convenient way retrieve construct acquisition function, see ras().","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_result_assigners.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Dictionary of Result Assigners — mlr_result_assigners","text":"R6::R6Class object inheriting mlr3misc::Dictionary.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_result_assigners.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Dictionary of Result Assigners — mlr_result_assigners","text":"See mlr3misc::Dictionary.","code":""},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_result_assigners.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Dictionary of Result Assigners — mlr_result_assigners","text":"","code":"library(data.table) as.data.table(mlr_result_assigners) #> Key: #> key label man #> #> 1: archive Archive mlr3mbo::mlr_result_assigners_archive #> 2: surrogate Mean Surrogate Prediction mlr3mbo::mlr_result_assigners_surrogate ras(\"archive\") #> "},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_result_assigners_archive.html","id":null,"dir":"Reference","previous_headings":"","what":"Result Assigner Based on the Archive — mlr_result_assigners_archive","title":"Result Assigner Based on the Archive — mlr_result_assigners_archive","text":"Result assigner chooses final point(s) based evaluations bbotk::Archive. mimics default behavior bbotk::Optimizer.","code":""},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_result_assigners_archive.html","id":"super-class","dir":"Reference","previous_headings":"","what":"Super class","title":"Result Assigner Based on the Archive — mlr_result_assigners_archive","text":"mlr3mbo::ResultAssigner -> ResultAssignerArchive","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_result_assigners_archive.html","id":"active-bindings","dir":"Reference","previous_headings":"","what":"Active bindings","title":"Result Assigner Based on the Archive — mlr_result_assigners_archive","text":"packages (character()) Set required packages. warning signaled least one packages installed, loaded (attached) later -demand via requireNamespace().","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_result_assigners_archive.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Result Assigner Based on the Archive — mlr_result_assigners_archive","text":"mlr3mbo::ResultAssigner$format() mlr3mbo::ResultAssigner$print()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_result_assigners_archive.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Result Assigner Based on the Archive — mlr_result_assigners_archive","text":"ResultAssignerArchive$new() ResultAssignerArchive$assign_result() ResultAssignerArchive$clone()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_result_assigners_archive.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Result Assigner Based on the Archive — mlr_result_assigners_archive","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_result_assigners_archive.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Result Assigner Based on the Archive — mlr_result_assigners_archive","text":"","code":"ResultAssignerArchive$new()"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_result_assigners_archive.html","id":"method-assign-result-","dir":"Reference","previous_headings":"","what":"Method assign_result()","title":"Result Assigner Based on the Archive — mlr_result_assigners_archive","text":"Assigns result, .e., final point(s) instance.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_result_assigners_archive.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Result Assigner Based on the Archive — mlr_result_assigners_archive","text":"","code":"ResultAssignerArchive$assign_result(instance)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_result_assigners_archive.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Result Assigner Based on the Archive — mlr_result_assigners_archive","text":"instance (bbotk::OptimInstanceBatchSingleCrit | bbotk::OptimInstanceBatchMultiCrit) bbotk::OptimInstance final result assigned .","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_result_assigners_archive.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Result Assigner Based on the Archive — mlr_result_assigners_archive","text":"objects class cloneable method.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_result_assigners_archive.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Result Assigner Based on the Archive — mlr_result_assigners_archive","text":"","code":"ResultAssignerArchive$clone(deep = FALSE)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_result_assigners_archive.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"Result Assigner Based on the Archive — mlr_result_assigners_archive","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_result_assigners_archive.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Result Assigner Based on the Archive — mlr_result_assigners_archive","text":"","code":"result_assigner = ras(\"archive\")"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_result_assigners_surrogate.html","id":null,"dir":"Reference","previous_headings":"","what":"Result Assigner Based on a Surrogate Mean Prediction — mlr_result_assigners_surrogate","title":"Result Assigner Based on a Surrogate Mean Prediction — mlr_result_assigners_surrogate","text":"Result assigner chooses final point(s) based surrogate mean prediction evaluated points bbotk::Archive. especially useful case noisy objective functions. case operating bbotk::OptimInstanceBatchMultiCrit SurrogateLearnerCollection must use many learners objective functions.","code":""},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_result_assigners_surrogate.html","id":"super-class","dir":"Reference","previous_headings":"","what":"Super class","title":"Result Assigner Based on a Surrogate Mean Prediction — mlr_result_assigners_surrogate","text":"mlr3mbo::ResultAssigner -> ResultAssignerSurrogate","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_result_assigners_surrogate.html","id":"active-bindings","dir":"Reference","previous_headings":"","what":"Active bindings","title":"Result Assigner Based on a Surrogate Mean Prediction — mlr_result_assigners_surrogate","text":"surrogate (Surrogate | NULL) surrogate. packages (character()) Set required packages. warning signaled least one packages installed, loaded (attached) later -demand via requireNamespace().","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_result_assigners_surrogate.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Result Assigner Based on a Surrogate Mean Prediction — mlr_result_assigners_surrogate","text":"mlr3mbo::ResultAssigner$format() mlr3mbo::ResultAssigner$print()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_result_assigners_surrogate.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Result Assigner Based on a Surrogate Mean Prediction — mlr_result_assigners_surrogate","text":"ResultAssignerSurrogate$new() ResultAssignerSurrogate$assign_result() ResultAssignerSurrogate$clone()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_result_assigners_surrogate.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Result Assigner Based on a Surrogate Mean Prediction — mlr_result_assigners_surrogate","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_result_assigners_surrogate.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Result Assigner Based on a Surrogate Mean Prediction — mlr_result_assigners_surrogate","text":"","code":"ResultAssignerSurrogate$new(surrogate = NULL)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_result_assigners_surrogate.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Result Assigner Based on a Surrogate Mean Prediction — mlr_result_assigners_surrogate","text":"surrogate (Surrogate | NULL) surrogate used predict mean evaluated points.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_result_assigners_surrogate.html","id":"method-assign-result-","dir":"Reference","previous_headings":"","what":"Method assign_result()","title":"Result Assigner Based on a Surrogate Mean Prediction — mlr_result_assigners_surrogate","text":"Assigns result, .e., final point(s) instance. $surrogate NULL, default_surrogate(instance) used also assigned $surrogate.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_result_assigners_surrogate.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Result Assigner Based on a Surrogate Mean Prediction — mlr_result_assigners_surrogate","text":"","code":"ResultAssignerSurrogate$assign_result(instance)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_result_assigners_surrogate.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"Result Assigner Based on a Surrogate Mean Prediction — mlr_result_assigners_surrogate","text":"instance (bbotk::OptimInstanceBatchSingleCrit | bbotk::OptimInstanceBatchMultiCrit) bbotk::OptimInstance final result assigned .","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_result_assigners_surrogate.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Result Assigner Based on a Surrogate Mean Prediction — mlr_result_assigners_surrogate","text":"objects class cloneable method.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_result_assigners_surrogate.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Result Assigner Based on a Surrogate Mean Prediction — mlr_result_assigners_surrogate","text":"","code":"ResultAssignerSurrogate$clone(deep = FALSE)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_result_assigners_surrogate.html","id":"arguments-2","dir":"Reference","previous_headings":"","what":"Arguments","title":"Result Assigner Based on a Surrogate Mean Prediction — mlr_result_assigners_surrogate","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_result_assigners_surrogate.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Result Assigner Based on a Surrogate Mean Prediction — mlr_result_assigners_surrogate","text":"","code":"result_assigner = ras(\"surrogate\")"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_tuners_mbo.html","id":null,"dir":"Reference","previous_headings":"","what":"TunerBatch using Model Based Optimization — mlr_tuners_mbo","title":"TunerBatch using Model Based Optimization — mlr_tuners_mbo","text":"TunerMbo class implements Model Based Optimization (MBO). minimal interface internally passing OptimizerMbo. additional information documentation see OptimizerMbo.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_tuners_mbo.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"TunerBatch using Model Based Optimization — mlr_tuners_mbo","text":"mlr3tuning::Tuner -> mlr3tuning::TunerBatch -> mlr3tuning::TunerBatchFromOptimizerBatch -> TunerMbo","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_tuners_mbo.html","id":"active-bindings","dir":"Reference","previous_headings":"","what":"Active bindings","title":"TunerBatch using Model Based Optimization — mlr_tuners_mbo","text":"loop_function (loop_function | NULL) Loop function determining MBO flavor. surrogate (Surrogate | NULL) surrogate. acq_function (AcqFunction | NULL) acquisition function. acq_optimizer (AcqOptimizer | NULL) acquisition function optimizer. args (named list()) arguments passed loop_function. example, random_interleave_iter. result_assigner (ResultAssigner | NULL) result assigner. param_classes (character()) Supported parameter classes optimizer can optimize. Determined based surrogate acq_optimizer. corresponds values given paradox::ParamSet's $class field. properties (character()) Set properties optimizer. Must subset bbotk_reflections$optimizer_properties. MBO principle flexible default assume optimizer properties. fully initialized, properties determined based loop_function surrogate. packages (character()) Set required packages. warning signaled prior optimization least one packages installed, loaded (attached) later -demand via requireNamespace(). Required packages determined based acq_function, surrogate acq_optimizer.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_tuners_mbo.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"TunerBatch using Model Based Optimization — mlr_tuners_mbo","text":"mlr3tuning::Tuner$format() mlr3tuning::Tuner$help() mlr3tuning::TunerBatchFromOptimizerBatch$optimize()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_tuners_mbo.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"TunerBatch using Model Based Optimization — mlr_tuners_mbo","text":"TunerMbo$new() TunerMbo$print() TunerMbo$reset() TunerMbo$clone()","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_tuners_mbo.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"TunerBatch using Model Based Optimization — mlr_tuners_mbo","text":"Creates new instance R6 class. information default values loop_function, surrogate, acq_function acq_optimizer, see ?mbo_defaults. Note parameters simply passed OptimizerMbo respective fields simply (settable) active bindings fields OptimizerMbo.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_tuners_mbo.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"TunerBatch using Model Based Optimization — mlr_tuners_mbo","text":"","code":"TunerMbo$new( loop_function = NULL, surrogate = NULL, acq_function = NULL, acq_optimizer = NULL, args = NULL, result_assigner = NULL )"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_tuners_mbo.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"TunerBatch using Model Based Optimization — mlr_tuners_mbo","text":"loop_function (loop_function | NULL) Loop function determining MBO flavor. surrogate (Surrogate | NULL) surrogate. acq_function (AcqFunction | NULL) acquisition function. acq_optimizer (AcqOptimizer | NULL) acquisition function optimizer. args (named list()) arguments passed loop_function. example, random_interleave_iter. result_assigner (ResultAssigner | NULL) result assigner.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_tuners_mbo.html","id":"method-print-","dir":"Reference","previous_headings":"","what":"Method print()","title":"TunerBatch using Model Based Optimization — mlr_tuners_mbo","text":"Print method.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_tuners_mbo.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"TunerBatch using Model Based Optimization — mlr_tuners_mbo","text":"","code":"TunerMbo$print()"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_tuners_mbo.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"TunerBatch using Model Based Optimization — mlr_tuners_mbo","text":"(character()).","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_tuners_mbo.html","id":"method-reset-","dir":"Reference","previous_headings":"","what":"Method reset()","title":"TunerBatch using Model Based Optimization — mlr_tuners_mbo","text":"Reset tuner. Sets following fields NULL: loop_function, surrogate, acq_function, acq_optimizer, args, result_assigner","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_tuners_mbo.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"TunerBatch using Model Based Optimization — mlr_tuners_mbo","text":"","code":"TunerMbo$reset()"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_tuners_mbo.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"TunerBatch using Model Based Optimization — mlr_tuners_mbo","text":"objects class cloneable method.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_tuners_mbo.html","id":"usage-3","dir":"Reference","previous_headings":"","what":"Usage","title":"TunerBatch using Model Based Optimization — mlr_tuners_mbo","text":"","code":"TunerMbo$clone(deep = FALSE)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_tuners_mbo.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"TunerBatch using Model Based Optimization — mlr_tuners_mbo","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/mlr_tuners_mbo.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"TunerBatch using Model Based Optimization — mlr_tuners_mbo","text":"","code":"# \\donttest{ if (requireNamespace(\"mlr3learners\") & requireNamespace(\"DiceKriging\") & requireNamespace(\"rgenoud\")) { library(mlr3) library(mlr3tuning) # single-objective task = tsk(\"wine\") learner = lrn(\"classif.rpart\", cp = to_tune(lower = 1e-4, upper = 1, logscale = TRUE)) resampling = rsmp(\"cv\", folds = 3) measure = msr(\"classif.acc\") instance = TuningInstanceBatchSingleCrit$new( task = task, learner = learner, resampling = resampling, measure = measure, terminator = trm(\"evals\", n_evals = 5)) tnr(\"mbo\")$optimize(instance) # multi-objective task = tsk(\"wine\") learner = lrn(\"classif.rpart\", cp = to_tune(lower = 1e-4, upper = 1, logscale = TRUE)) resampling = rsmp(\"cv\", folds = 3) measures = msrs(c(\"classif.acc\", \"selected_features\")) instance = TuningInstanceBatchMultiCrit$new( task = task, learner = learner, resampling = resampling, measures = measures, terminator = trm(\"evals\", n_evals = 5), store_models = TRUE) # required due to selected features tnr(\"mbo\")$optimize(instance) } #> cp learner_param_vals x_domain classif.acc selected_features #> #> 1: -1.319327902 0.8313559 2.000000 #> 2: -3.621912995 0.8370056 2.666667 #> 3: -0.000381697 0.3987759 0.000000 # }"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/ras.html","id":null,"dir":"Reference","previous_headings":"","what":"Syntactic Sugar Result Assigner Construction — ras","title":"Syntactic Sugar Result Assigner Construction — ras","text":"function complements mlr_result_assigners functions spirit mlr_sugar mlr3.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/ras.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Syntactic Sugar Result Assigner Construction — ras","text":"","code":"ras(.key, ...)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/ras.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Syntactic Sugar Result Assigner Construction — ras","text":".key (character(1)) Key passed respective dictionary retrieve object. ... (named list()) Named arguments passed constructor, set parameters paradox::ParamSet, set public field. See mlr3misc::dictionary_sugar_get() details.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/ras.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Syntactic Sugar Result Assigner Construction — ras","text":"ResultAssigner","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/ras.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Syntactic Sugar Result Assigner Construction — ras","text":"","code":"ras(\"archive\") #> "},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/srlrn.html","id":null,"dir":"Reference","previous_headings":"","what":"Syntactic Sugar Surrogate Construction — srlrn","title":"Syntactic Sugar Surrogate Construction — srlrn","text":"function allows construct SurrogateLearner SurrogateLearnerCollection spirit mlr_sugar mlr3. archive references one target variable cols_y contains one target variable single learner specified, learner replicated many times needed build SurrogateLearnerCollection.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/srlrn.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Syntactic Sugar Surrogate Construction — srlrn","text":"","code":"srlrn(learner, archive = NULL, cols_x = NULL, cols_y = NULL, ...)"},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/srlrn.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Syntactic Sugar Surrogate Construction — srlrn","text":"learner (mlr3::LearnerRegr | List mlr3::LearnerRegr)mlr3::LearnerRegr used within SurrogateLearner list mlr3::LearnerRegr used within SurrogateLearnerCollection. archive (NULL | bbotk::Archive)bbotk::Archive bbotk::OptimInstance used. Can also NULL. cols_x (NULL | character()) Column ids bbotk::Archive used features. Can also NULL case automatically inferred based archive. cols_y (NULL | character()) Column id(s) bbotk::Archive used target. list mlr3::LearnerRegr provided learner argument cols_y specified well, many column names learners must provided. Can also NULL case automatically inferred based archive. ... (named list()) Named arguments passed constructor, set parameters paradox::ParamSet.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/srlrn.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Syntactic Sugar Surrogate Construction — srlrn","text":"SurrogateLearner | SurrogateLearnerCollection","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/reference/srlrn.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Syntactic Sugar Surrogate Construction — srlrn","text":"","code":"library(mlr3) srlrn(lrn(\"regr.featureless\"), catch_errors = FALSE) #> : LearnerRegrFeatureless #> * Parameters: assert_insample_perf=FALSE, catch_errors=FALSE srlrn(list(lrn(\"regr.featureless\"), lrn(\"regr.featureless\"))) #> : (LearnerRegrFeatureless | LearnerRegrFeatureless) #> * Parameters: assert_insample_perf=FALSE, catch_errors=TRUE"},{"path":[]},{"path":"https://mlr3mbo.mlr-org.com/dev/news/index.html","id":"mlr3mbo-024","dir":"Changelog","previous_headings":"","what":"mlr3mbo 0.2.4","title":"mlr3mbo 0.2.4","text":"CRAN release: 2024-07-06 fix: Improve runtime AcqOptimizer setting check_values = FALSE.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/news/index.html","id":"mlr3mbo-023","dir":"Changelog","previous_headings":"","what":"mlr3mbo 0.2.3","title":"mlr3mbo 0.2.3","text":"CRAN release: 2024-07-01 compatibility: Work new bbotk mlr3tuning version 1.0.0.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/news/index.html","id":"mlr3mbo-022","dir":"Changelog","previous_headings":"","what":"mlr3mbo 0.2.2","title":"mlr3mbo 0.2.2","text":"CRAN release: 2024-03-01 refactor: compatibility upcoming paradox upgrade. feat: OptimizerMbo TunerMbo now update Surrogate final time optimization process finished ensure Surrogate correctly reflects state trained data seen optimization. fix: AcqFunction domain construction now respects Surrogate cols_x field. feat: support one candidate point result acquisition function optimization even non-batch acquisition functions. feat: added default_gp default_rf helpers allow construction default Gaussian Process random forest example used within default_surrogate. refactor: changed Gaussian Process random forest defaults (default_gp default_rf therefore also default_surrogate). Gaussian Process now uses \"matern5_2\" kernel. Random forest now uses 100 trees. number trees used fallback random forest reduced 10.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/news/index.html","id":"mlr3mbo-021","dir":"Changelog","previous_headings":"","what":"mlr3mbo 0.2.1","title":"mlr3mbo 0.2.1","text":"CRAN release: 2023-06-05 docs: updated references vignette. refactor: minor clean internal structure loop functions. perf: default initial design constructed based Sobol sequence loop functions. refactor: longer depend mlr3tuning import instead. refactor: srlrn sugar function now can construct SurrogateLearner SurrogateLearnerCollection; dropped srlrnc. feat: added AcqFunctionSD, AcqFunctionEHVI AcqFunctionEHVIGH, introduced bayesopt_emo loop function. feat: AcqFunctions now include $packages field stating required packages checked whether namespace can loaded prior optimization. fix: fixed bug fix_xdt_missing() helper function. BREAKING CHANGE: renaming default_loopfun -> default_loop_function, default_acqfun -> default_acqfunction, default_acqopt -> default_acqoptimizer. BREAKING CHANGE: result_functions now replaced ResultAssigners. BREAKING CHANGE: renamed $model field Surrogate classes $learner. BREAKING CHANGE: Surrogate AcquisitionFunction classes fields *_cols renamed cols_* (e.g., x_cols cols_x).","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/news/index.html","id":"mlr3mbo-012","dir":"Changelog","previous_headings":"","what":"mlr3mbo 0.1.2","title":"mlr3mbo 0.1.2","text":"CRAN release: 2023-03-02 refactor: adapt mlr3tuning 0.18.0. feat: Acquisition functions now assert whether surrogates match required predict type. fix: Unloading mlr3mbo removes optimizers tuners dictionaries. docs: faster examples. feat: characters surrogate regression tasks longer automatically converted factors. default_surrogate now respects gained appropriate pipeline step. feat: AcqFunctionAEI added. docs: fix docs, README bibentries.","code":""},{"path":"https://mlr3mbo.mlr-org.com/dev/news/index.html","id":"mlr3mbo-011","dir":"Changelog","previous_headings":"","what":"mlr3mbo 0.1.1","title":"mlr3mbo 0.1.1","text":"CRAN release: 2022-11-18 Initial upload CRAN.","code":""}]