Learn R Programming

NADIA (version 0.4.2)

PipeOpSoftImpute: PipeOpSoftImpute

Description

Implements SoftImpute methods as mlr3 pipeline, more about SoftImpute autotune_softImpute.

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

  • lambda :: integer(1)
    Nuclear-norm regularization parameter. If lambda=0, the algorithm reverts to "hardImpute", for which convergence is typically slower. If NULL lambda is set automatically at the highest possible value, default 0.

  • rank.max :: integer(1)
    This param restricts the rank of the solution. If set as NULL: rank.max=min(dim(X))-1, default 2.

  • type :: character(1)
    Two algorithms are implemented: type="svd" or the default type="als". The "svd" algorithm repeatedly computes the svd of the completed matrix, and soft thresholds its singular values. Each new soft-thresholded svd is used to re-impute the missing entries. For large matrices of class "Incomplete", the svd is achieved by an efficient form of alternating orthogonal ridge regression. The "als" algorithm uses the same alternating ridge regression, but updates the imputation at each step, leading to quite substantial speedups in some cases. The "als" approach does not currently have the same theoretical convergence guarantees as the "svd" approach, default 'als'.

  • thresh :: double(1)
    Threshold for convergence, default 1e-5

  • maxit :: integer(1)
    Maximum number of iterations, default 100.

  • cat_Fun :: function(){}
    Function for aggregating the k Nearest Neighbors in case of categorical variables. It can be any function with input=not_numeric_vector and output=atomic_object, default VIM::maxCat.

  • out_fill :: character(1)
    Output log file location. If file already exists log message will be added. If NULL no log will be produced, default NULL.

Super classes

mlr3pipelines::PipeOp -> mlr3pipelines::PipeOpImpute -> softImpute_imputation

Methods

Inherited methods


Method new()

Usage

PipeOpSoftImpute$new(
  id = "impute_softImpute_B",
  cat_Fun = VIM::maxCat,
  lambda = 0,
  rank.max = 2,
  type = "als",
  thresh = 1e-05,
  maxit = 100,
  out_file = NULL
)


Method clone()

The objects of this class are cloneable with this method.

Usage

PipeOpSoftImpute$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

Run this code
{
  graph <- PipeOpAmelia$new() %>>% mlr3learners::LearnerClassifGlmnet$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