Splits data into a single training set and a test set. Parameter ratio determines the ratio of observation in the train set (default: 2/3).

ResamplingHoldout

## Format

R6::R6Class inheriting from Resampling.

See Resampling.

See Resampling.

## Examples

# Create a task with 10 observations
task = mlr_tasks$get("iris") task$filter(1:10)

# Instantiate Resampling
rho = mlr_resamplings$get("holdout") rho$instantiate(task)

# Individual sets:
rho$train_set(1)#> [1] 6 9 10 2 8 5 4rho$test_set(1)#> [1] 1 3 7intersect(rho$train_set(1), rho$test_set(1))#> integer(0)
# Internal storage:
rho$instance # simple list#>$train
#> [1]  6  9 10  2  8  5  4
#>
#> \$test
#> [1] 1 3 7
#>