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