Learn R Programming

mlr3 (version 0.23.0)

mlr3.holdout_task: Callback Holdout Task

Description

This CallbackResample predicts on an additional holdout task after training.

Arguments

task

(Task)
The holdout task.

Examples

Run this code
task = tsk("pima")
task_holdout = task$clone()
learner = lrn("classif.rpart")
resampling = rsmp("cv", folds = 3)
splits = partition(task, 0.7)

task$filter(splits$train)
task_holdout$filter(splits$test)

callback = clbk("mlr3.holdout_task", task = task_holdout)

rr = resample(task, learner, resampling = resampling, callbacks = callback)

rr$data_extra

Run the code above in your browser using DataLab