mlr3.holdout_task: Callback Holdout Task

mlr3.holdout_taskR Documentation

Callback Holdout Task

Description

This CallbackResample predicts on an additional holdout task after training.

Arguments

task

(Task)
The holdout task.

Examples

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

mlr3 documentation built on April 4, 2025, 5:08 a.m.