default_surrogate {mlr3mbo} | R Documentation |
Default Surrogate
Description
This is a helper function that constructs a default Surrogate based on properties of the bbotk::OptimInstance.
For numeric-only (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 an imputation method, added to the random forest, more
concretely we use po("imputesample")
(for logicals) and po("imputeoor")
(for anything else) from
package mlr3pipelines.
Characters are always encoded as factors via po("colapply")
.
Out of range imputation makes sense for tree-based methods and is usually hard to beat, see Ding et al. (2010).
In the case of dependencies, the following learner is used as a fallback:
lrn("regr.featureless")
.
If the instance is of class bbotk::OptimInstanceBatchSingleCrit the learner is wrapped as a SurrogateLearner.
If the instance is of class bbotk::OptimInstanceBatchMultiCrit multiple deep clones of the learner are wrapped as a SurrogateLearnerCollection.
Usage
default_surrogate(instance, learner = NULL, n_learner = NULL)
Arguments
instance |
(bbotk::OptimInstance) |
learner |
( |
n_learner |
( |
Value
References
Ding, Yufeng, Simonoff, S J (2010). “An Investigation of Missing Data Methods for Classification Trees Applied to Binary Response Data.” Journal of Machine Learning Research, 11(1), 131–170.
See Also
Other mbo_defaults:
default_acqfunction()
,
default_acqoptimizer()
,
default_gp()
,
default_loop_function()
,
default_result_assigner()
,
default_rf()
,
mbo_defaults