mosmafs (version 0.1.2)

clonetask: Replace Data in Task with new Data

Description

Create new task identical to the old one, but with newdata instead of old data. This should either preserve the orig.features of the original task, or should add new noise-features, in which case orig.features should mark the features that correspond to the full original task.

Usage

clonetask(
  task,
  newdata,
  newid,
  orig.features = rep(TRUE, ncol(newdata) - length(getTaskTargetNames(task)))
)

Value

Task

Arguments

task

[Task] mlr Task to use.

newdata

[data.frame] data to replace task data with; must include the target column with same name.

newid

[character(1)] ID to use for new Task.

orig.features

[logical] features that correspond to original task's data.

See Also

Other Artificial Datasets: create.hypersphere.data(), create.linear.data(), create.linear.toy.data(), create.regr.task(), task.add.permuted.cols(), task.add.random.cols()