| Surrogate | R Documentation |
Abstract surrogate model class.
A surrogate model is used to model the unknown objective function(s) based on all points evaluated so far.
learner(learner)
Arbitrary learner object depending on the subclass.
print_id(character)
Id used when printing.
archive(bbotk::Archive | NULL)
bbotk::Archive of the bbotk::OptimInstance.
archive_is_async('bool(1)“)
Whether the bbotk::Archive is an asynchronous one.
n_learner(integer(1))
Returns the number of surrogate models.
cols_x(character() | NULL)
Column ids of variables that should be used as features.
By default, automatically inferred based on the archive.
cols_y(character() | NULL)
Column ids of variables that should be used as targets.
By default, automatically inferred based on the archive.
param_set(paradox::ParamSet)
Set of hyperparameters.
packages(character())
Set of required packages.
A warning is signaled if at least one of the packages is not installed, but loaded (not attached) later on-demand via requireNamespace().
feature_types(character())
Stores the feature types the surrogate can handle, e.g. "logical", "numeric", or "factor".
A complete list of candidate feature types, grouped by task type, is stored in mlr_reflections$task_feature_types.
properties(character())
Stores a set of properties/capabilities the surrogate has.
A complete list of candidate properties, grouped by task type, is stored in mlr_reflections$learner_properties.
predict_type(character(1))
Retrieves the currently active predict type, e.g. "response".
new()Creates a new instance of this R6 class.
Surrogate$new(learner, archive, cols_x, cols_y, param_set)
learner(learner)
Arbitrary learner object depending on the subclass.
archive(bbotk::Archive | NULL)
bbotk::Archive of the bbotk::OptimInstance.
cols_x(character() | NULL)
Column id's of variables that should be used as features.
By default, automatically inferred based on the archive.
cols_y(character() | NULL)
Column id's of variables that should be used as targets.
By default, automatically inferred based on the archive.
param_set(paradox::ParamSet)
Parameter space description depending on the subclass.
update()Train learner with new data.
Subclasses must implement private.update() and private.update_async().
Surrogate$update()
NULL.
reset()Reset the surrogate model.
Subclasses must implement private$.reset().
Surrogate$reset()
NULL
predict()Predict mean response and standard error. Must be implemented by subclasses.
Surrogate$predict(xdt)
xdt(data.table::data.table())
New data. One row per observation.
Arbitrary prediction object.
format()Helper for print outputs.
Surrogate$format()
(character(1)).
print()Print method.
Surrogate$print()
(character()).
clone()The objects of this class are cloneable with this method.
Surrogate$clone(deep = FALSE)
deepWhether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.