Learn R Programming

NADIA (version 0.4.2)

PipeOpMice_A: PipeOpMice_A

Description

Implements mice methods as mlr3 in A approach (training imputation model on training data and used a trained model on test data).

Arguments

Input and Output Channels

Input and output channels are inherited from PipeOpImpute.

Parameters

The parameters include inherited from [`PipeOpImpute`], as well as:

  • id :: character(1)
    Identifier of resulting object, default "imput_mice_A".

  • m :: integer(1)
    Number of datasets produced by mice, default 5.

  • maxit :: integer(1)
    Maximum number of iterations for mice, default 5.

  • set_corr :: double(1)
    Correlation or fraction of features used when optimize=FALSE. When correlation=FALSE, it represents a fraction of case to use in imputation for each variable, default 0.5.

  • random.seed :: integer(1)
    Random seed, default 123.

  • correlation :: logical(1)
    If set TRUE correlation is used, if set FALSE then fraction of case, default TRUE.

Super classes

mlr3pipelines::PipeOp -> mlr3pipelines::PipeOpImpute -> mice_A_imputation

Methods

Inherited methods


Method new()

Usage

PipeOpMice_A$new(
  id = "impute_mice_A",
  set_cor = 0.5,
  m = 5,
  maxit = 5,
  random.seed = 123,
  correlation = FALSE,
  methods = NULL
)


Method clone()

The objects of this class are cloneable with this method.

Usage

PipeOpMice_A$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Details

Code of used function was writen by https://github.com/prockenschaub more information aboute this aproche can be found here https://github.com/amices/mice/issues/32

Examples

Run this code
# \donttest{

 # Using debug learner for example purpose

  graph <- PipeOpMice_A$new() %>>% LearnerClassifDebug$new()
  graph_learner <- GraphLearner$new(graph)

  # Task with NA

  resample(tsk("pima"), graph_learner, rsmp("cv", folds = 3))
# }

Run the code above in your browser using DataLab