ContextResample function

Resample Context

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.

Super class

mlr3misc::Context -> ContextResample

Active bindings

  • 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()`.
    

Methods

Public methods

Method new()

Creates a new instance of this R6 class.

Usage

ContextResample$new(task, learner, resampling, iteration)

Arguments

  • 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.
    

Method clone()

The objects of this class are cloneable with this method.

Usage

ContextResample$clone(deep = FALSE)

Arguments

  • deep: Whether to make a deep clone.