Skip to contents

Surrogate model containing a single mlr3::LearnerRegr.

Parameters

assert_insample_perf

logical(1)
Should the insample performance of the mlr3::LearnerRegr be asserted after updating the surrogate? If the assertion fails (i.e., the insample performance based on the perf_measure does not meet the perf_threshold), an error is thrown. Default is FALSE.

perf_measure

mlr3::MeasureRegr
Performance measure which should be use to assert the insample performance of the mlr3::LearnerRegr. Only relevant if assert_insample_perf = TRUE. Default is mlr3::mlr_measures_regr.rsq.

perf_threshold

numeric(1)
Threshold the insample performance of the mlr3::LearnerRegr should be asserted against. Only relevant if assert_insample_perf = TRUE. Default is 0.

catch_errors

logical(1)
Should errors during updating the surrogate be caught and propagated to the loop_function which can then handle the failed infill optimization (as a result of the failed surrogate) appropriately by, e.g., proposing a randomly sampled point for evaluation? Default is TRUE.

Super class

mlr3mbo::Surrogate -> SurrogateLearner

Active bindings

print_id

(character)
Id used when printing.

n_learner

(integer(1))
Returns the number of mlr3::Learners.

assert_insample_perf

(numeric(1))
Asserts whether the current insample performance meets the performance threshold.

packages

(character())
Set of required packages.

feature_types

(character())
Stores the feature types the learner 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 learner has. A complete list of candidate properties, grouped by task type, is stored in mlr_reflections$learner_properties.

Methods

Inherited methods


Method new()

Creates a new instance of this R6 class.

Usage

SurrogateLearner$new(learner, archive = NULL, x_cols = NULL, y_col = NULL)

Arguments

learner

(mlr3::LearnerRegr).

archive

(NULL | bbotk::Archive).

x_cols

(NULL | character()).

y_col

(NULL | character(1)).


Method predict()

Returns mean response and standard error.

Usage

SurrogateLearner$predict(xdt)

Arguments

xdt

(data.table::data.table())
New data.

Returns

data.table::data.table() with the columns mean and se.


Method clone()

The objects of this class are cloneable with this method.

Usage

SurrogateLearner$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.