# Create a task with 10 observations
task = tsk("penguins")
task$filter(1:10)
# Instantiate Resampling
custom = rsmp("custom")
train_sets = list(1:5, 5:10)
test_sets = list(5:10, 1:5)
custom$instantiate(task, train_sets, test_sets)
custom$train_set(1)
custom$test_set(1)
Run the code above in your browser using DataLab