| PipeOpSimulateMissings | R Documentation |
Generates MCAR missing values in mlr3 pipeline according to set parameters. Missings are inserted to task data once during first training.
Input and output channels are inherited from PipeOpTaskPreproc.
per_missings :: double(1)
Overall percentage of missing values generated in dataset [0, 100]. Must be set every time, default 50
per_instances_missings :: double(1)
Percentage of instances which will have missing values [0, 100].
per_variables_missings :: double(1)
Percentage of variables which will have missing values [0, 100].
variables_missings :: integer
Only when 'per_variables_missings' is 'NULL'. Vector of indexes of columns in which missings will be generated.
mlr3pipelines::PipeOp -> mlr3pipelines::PipeOpTaskPreproc -> PipeOpSimulateMissings
new()PipeOpSimulateMissings$new( id = "simulate_missings", param_vals = list(per_missings = 50) )
clone()The objects of this class are cloneable with this method.
PipeOpSimulateMissings$clone(deep = FALSE)
deepWhether to make a deep clone.
{
task_NA <- PipeOpSimulateMissings$new()$train(list(tsk("iris")))[[1]]
# check
sum(task_NA$missings()) > 0
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.