autoImpute: Automatic imputation of missing values

Description Usage Arguments

View source: R/autoImpute.R

Description

Checks a task to see if it has missing values, then checks a learner to see if it is unable to handle missing values. If both are true, returns the learner wrapped with makeImputeWrapper which sets missing values to zero and creates a 0/1 dummy column for each column on which missings were present performed, where 1 indicates that the observation was missing in the original column.

Usage

1
2
autoImpute(wl, task, classes = NULL, dummy.classes = c("numeric", "integer",
  "factor"), dummy.type = "numeric", ...)

Arguments

wl

(WrappedLearner) An ezmlr WrappedLearner object.

task

(Task) An mlr Task.

classes

(list) Named list containing imputation techniques for classes of columns. Default is list(numeric = imputeConstant(0), integer = imputeConstant(0), factor = imputeConstant(0)).

dummy.classes

(character) Feature types to consider for imputation. Default is c("numeric", "integer", "factor"). See makeImputeWrapper.

dummy.type

(character(1)) How to encode dummy variables. Default is "numeric". See makeImputeWrapper.

...

Additional arguments to pass to makeImputeWrapper


Prometheus77/ezmlr documentation built on May 17, 2019, 6:34 p.m.