Learn R Programming

NADIA (version 0.4.2)

PipeOpMice: PipeOpMice

Description

Implements mice methods as mlr3 pipeline more about mice autotune_mice

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".

  • 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.

  • set_method :: character(1)
    Method used if optimize=FALSE. If NULL default method is used (more in methods_random section), default 'pmm'.

  • low_corr :: double(1)
    Double between 0-1. Lower boundary of correlation used in inner optimization (used only when optimize=TRUE), default 0.

  • up_corr :: double(1)
    Double between 0-1. Upper boundary of correlation used in inner optimization (used only when optimize=TRUE). Both of these parameters work the same for a fraction of case if correlation=FALSE,default 1.

  • methods_random :: character(1)
    set of methods to chose. Avalible methods "pmm", "midastouch", "sample", "cart", "rf" Default 'pmm'. If seted on NULL this methods are used predictive mean matching (numeric data) logreg, logistic regression imputation (binary data, factor with 2 levels) polyreg, polytomous regression imputation for unordered categorical data (factor > 2 levels) polr, proportional odds model for (ordered, > 2 levels).

  • iter :: integer(1)
    Number of iteration for random search, default 5.

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

  • optimize :: logical(1)
    If set TRUE, function will optimize parameters of imputation automatically. If parameters will be tuned by other method, should be set to FALSE, default FALSE.

  • 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_imputation

Methods

Inherited methods


Method new()

Usage

PipeOpMice$new(
  id = "impute_mice_B",
  m = 5,
  maxit = 5,
  set_cor = 0.5,
  set_method = "pmm",
  low_corr = 0,
  up_corr = 1,
  methods_random = c("pmm"),
  iter = 5,
  random.seed = 123,
  optimize = FALSE,
  correlation = FALSE,
  out_file = NULL
)


Method clone()

The objects of this class are cloneable with this method.

Usage

PipeOpMice$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

Run this code
# \donttest{

# Using debug learner for example purpose

  graph <- PipeOpMice$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