encodeMissing: Encode missing values in features

Description Usage Arguments Value Author(s) Examples

View source: R/encodeMissing.R

Description

Changes the way in which missing values are represented within features. Various systems uses different reserved values for missing data, this function uses the most common reserved values and replaces them with NA

Usage

1
2
encodeMissing(x, numEncode = NULL, charEncode = c("", " ", "UNKNOWN",
  "MISS", "MISSING", "UNK", "NA", "NULL", "N/A"), autoCode = TRUE)

Arguments

x

[data.frame | Required] Data.frame containing numeric features to transform

numEncode

[numeric vector | Optional] Numeric vector containing reserved values for missing data. Default of NULL

charEncode

[character vector | Optional] Character vector containing reserved values for missing data. Default of c(”,' ','UNKNOWN','MISS','MISSING','UNK','NA','NULL','N/A')

autoCode

[logical | Optional] Should code be generated when running the function

Value

List containing data.frame with encoded features as well as code when autoCode is TRUE

Author(s)

Xander Horn

Examples

1
res <- encodeMissing(x = iris[,1:4])

XanderHorn/autoML documentation built on Aug. 5, 2020, 11:45 a.m.