| default_surrogate | R Documentation |
This is a helper function that constructs a default Surrogate based on properties of the bbotk::OptimInstance.
For purely numeric (including integers) parameter spaces without any dependencies
a Gaussian Process is constricted via default_gp().
For mixed numeric-categorical parameter spaces, or spaces with conditional parameters
a random forest is constructed via default_rf().
In any case, learners are encapsulated using "evaluate", and a fallback learner is set,
in cases where the surrogate learner errors.
Currently, the following learner is used as a fallback:
lrn("regr.ranger", num.trees = 10L, keep.inbag = TRUE, se.method = "jack").
If additionally dependencies are present in the parameter space,
inactive conditional parameters are represented by missing NA values in the training design data.
We simply handle those with the internal NA handling method na.action = "na_learn of ranger.
If n_learner is 1, the learner is wrapped as a SurrogateLearner.
Otherwise, if n_learner is larger than 1,
multiple deep clones of the learner are wrapped as a SurrogateLearnerCollection.
default_surrogate(
instance,
learner = NULL,
n_learner = NULL,
force_random_forest = FALSE
)
instance |
(bbotk::OptimInstance) |
learner |
( |
n_learner |
( |
force_random_forest |
( |
Surrogate
Other mbo_defaults:
default_acqfunction(),
default_acqoptimizer(),
default_gp(),
default_loop_function(),
default_result_assigner(),
default_rf(),
mbo_defaults
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.