Abstract surrogate model class.
A surrogate model is used to model the unknown objective function(s) based on all points evaluated so far.
Active bindings
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 viarequireNamespace().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 inmlr_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 inmlr_reflections$learner_properties.predict_type(
character(1))
Retrieves the currently active predict type, e.g."response".
Methods
Method new()
Creates a new instance of this R6 class.
Usage
Surrogate$new(learner, archive, cols_x, cols_y, param_set)Arguments
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.
Method update()
Train learner with new data.
Subclasses must implement private.update() and private.update_async().
Method predict()
Predict mean response and standard error. Must be implemented by subclasses.
Arguments
xdt(
data.table::data.table())
New data. One row per observation.