Learn R Programming

SPOTMisc (version 1.19.52)

getMlrTask: Generate an mlr task from Census KDD data set (+variation)

Description

Prepares the Census data set for mlr. Performs imputation via: factor = imputeMode(), integer = imputeMedian(), numeric = imputeMean()

Usage

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

Value

an mlr task with the respective data set. Generated with makeClassifTask or makeRegrTask for classification and regression repectively.

Arguments

dataset

census data set

task.type

character, either "classif" or "regr".

data.seed

seed

See Also

getDataCensus

Examples

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

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

Run the code above in your browser using DataLab