getMlrResample: Generate a fixed holdout instance for resampling

View source: R/mlrTools.R

getMlrResampleR Documentation

Generate a fixed holdout instance for resampling

Description

Determines test/train split and applies makeFixedHoldoutInstance

Usage

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

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

Value

list: an mlr resample generated with makeFixedHoldoutInstance

See Also

getMlrTask

Examples


## 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)


SPOTMisc documentation built on Sept. 5, 2022, 5:06 p.m.