clonetask: Replace Data in Task with new Data

View source: R/datagen.R

clonetaskR Documentation

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

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.

Value

Task

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


mosmafs documentation built on Nov. 3, 2022, 1:05 a.m.