Learn R Programming

SPOTMisc (version 1.19.52)

getMlrResample: Generate a fixed holdout instance for resampling

Description

Determines test/train split and applies makeFixedHoldoutInstance

Usage

getMlrResample(task, dataset, data.seed = 1, prop = NULL)

Value

list: an mlr resample generated with makeFixedHoldoutInstance

Arguments

task

mlr task

dataset

e.g., census data set

data.seed

seed

prop

proportion, e.g., 2/3 take 2/3 of the data for training and 1/3 for test

See Also

getMlrTask

Examples

Run this code
# \donttest{
## Example downloads OpenML data, might take some time:
dataset <- getDataCensus(
task.type="classif",
nobs = 1e3,
nfactors = "high",
nnumericals = "high",
cardinality = "high",
data.seed=1,
cachedir= "oml.cache",
target = "age")

taskdata <- getMlrTask(dataset,
task.type = "classif",
data.seed = 1)

rsmpl <- getMlrResample(task=taskdata,
dataset = dataset,
data.seed = 1,
prop = 2/3)
# }

Run the code above in your browser using DataLab