# NOT RUN {
# Create a task with 10 observations
task = tsk("penguins")
task$filter(1:10)
# Instantiate Resampling
bootstrap = rsmp("bootstrap", repeats = 2, ratio = 1)
bootstrap$instantiate(task)
# Individual sets:
bootstrap$train_set(1)
bootstrap$test_set(1)
# Disjunct sets:
intersect(bootstrap$train_set(1), bootstrap$test_set(1))
# Internal storage:
bootstrap$instance$M # Matrix of counts
# }
Run the code above in your browser using DataLab