Adds num new features sampled from dist to task. New features are inserted at random positions in the task and named RANDOM.1...RANDOM.[num]

The returned Task has a $orig.features which is a logical vector indicating the features that were originally in the Task.

If the $orig.features slot is already present in the input task, then the output will have added FALSE entries at appropriate positions.

task.add.random.cols(task, num, dist = rnorm)

Arguments

task

[Task] the input task.

num

[integer(1)] number of noise features to add.

dist

[function] function n -> numeric(n) that samples random noise features.

Value

Task

See also