repeats times repeated folds-fold cross validation.

ResamplingRepeatedCV

Format

R6::R6Class() inheriting from Resampling.

Examples

# Create a task with 10 observations task = mlr_tasks$get("iris") task$filter(1:10) # Instantiate Resampling rrcv = mlr_resamplings$get("repeated_cv") rrcv$param_set$values = list(repeats = 2, folds = 3) rrcv$instantiate(task) rrcv$iters
#> [1] 6
# Individual sets: rrcv$train_set(1)
#> [1] 2 9 10 3 5 6
rrcv$test_set(1)
#> [1] 1 4 7 8
intersect(rrcv$train_set(1), rrcv$test_set(1))
#> integer(0)
# Internal storage: rrcv$instance # table
#> row_id rep fold #> 1: 1 1 1 #> 2: 2 1 2 #> 3: 3 1 3 #> 4: 4 1 1 #> 5: 5 1 3 #> 6: 6 1 3 #> 7: 7 1 1 #> 8: 8 1 1 #> 9: 9 1 2 #> 10: 10 1 2 #> 11: 1 2 3 #> 12: 2 2 3 #> 13: 3 2 2 #> 14: 4 2 2 #> 15: 5 2 1 #> 16: 6 2 3 #> 17: 7 2 1 #> 18: 8 2 1 #> 19: 9 2 1 #> 20: 10 2 2