Resample Context
A CallbackResample accesses and modifies data during resample()
and benchmark()
via the ContextResample
. See the section on fields for a list of modifiable objects. See callback_resample()
for a list of stages that access ContextResample
.
mlr3misc::Context
-> ContextResample
task
: (Task )
The task to be evaluated. The task is unchanged during the evaluation. The task is read-only.
learner
: (Learner )
The learner to be evaluated. The learner contains the models after stage `on_resample_before_train`.
resampling
: Resampling
The resampling strategy to be used. The resampling is unchanged during the evaluation. The resampling is read-only.
iteration
: (integer()
)
The current iteration. The iteration is read-only.
pdatas
: (List of PredictionData )
The prediction data. The data is available on stage `on_resample_end`.
data_extra
: (list())
Data saved in the ResampleResult or BenchmarkResult . Use this field to save results. Must be a `list()`.
new()
Creates a new instance of this R6 class.
ContextResample$new(task, learner, resampling, iteration)
task
: (Task )
The task to be evaluated.
learner
: (Learner )
The learner to be evaluated.
resampling
: (Resampling )
The resampling strategy to be used.
iteration
: (integer()
)
The current iteration.
clone()
The objects of this class are cloneable with this method.
ContextResample$clone(deep = FALSE)
deep
: Whether to make a deep clone.
Useful links